From: Debian Science Maintainers Date: Tue, 4 Feb 2020 00:34:03 +0000 (+0000) Subject: Include offset and exposure in GEEResults.fittedvalues X-Git-Tag: archive/raspbian/0.11.1-2+rpi1~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=066e7b90041ab5fc811a7eb262070ee658ecd9d5;p=statsmodels.git Include offset and exposure in GEEResults.fittedvalues and remove misleading documentation from GLMResults.fittedvalues Author: Rebecca N. Palmer Bug: https://github.com/statsmodels/statsmodels/issues/5253 Forwarded: https://github.com/statsmodels/statsmodels/issues/5253#issuecomment-578980169 Gbp-Pq: Name up5253_gee_offset.patch --- diff --git a/statsmodels/genmod/generalized_estimating_equations.py b/statsmodels/genmod/generalized_estimating_equations.py index 6a7ccf1..7ae36a6 100644 --- a/statsmodels/genmod/generalized_estimating_equations.py +++ b/statsmodels/genmod/generalized_estimating_equations.py @@ -1975,8 +1975,7 @@ class GEEResults(base.LikelihoodModelResults): """ Returns the fitted values from the model. """ - return self.model.family.link.inverse(np.dot(self.model.exog, - self.params)) + return self.model.predict(self.params) def plot_added_variable(self, focus_exog, resid_type=None, use_glm_weights=True, fit_kwargs=None, diff --git a/statsmodels/genmod/generalized_linear_model.py b/statsmodels/genmod/generalized_linear_model.py index e20d2df..00451b3 100644 --- a/statsmodels/genmod/generalized_linear_model.py +++ b/statsmodels/genmod/generalized_linear_model.py @@ -1563,8 +1563,7 @@ class GLMResults(base.LikelihoodModelResults): @cache_readonly def fittedvalues(self): """ - Linear predicted values for the fitted model. - dot(exog, params) + Predicted values for the fitted model. """ return self.mu