Glm Residual In Python Statsmodel
How to generate residuals for all 303 observations in Python: from statsmodels.stats.outliers_influence import OLSInfluence OLSInfluence(resid) or res.resid() I am trying to gene
Solution 1:
statsmodels does not have a default resid
for GLM
, but it has the following
resid_anscombe Anscombe residuals.
resid_anscombe_scaled Scaled Anscombe residuals.
resid_anscombe_unscaled Unscaled Anscombe residuals.
resid_deviance Deviance residuals.
resid_pearson Pearson residuals.
resid_response Response residuals.
resid_working Working residuals.
The residual y - E(y|x)
are the response residuals resid_response
Those residuals are available as attributes of the results instance that is returned by the fit
method.
Post a Comment for "Glm Residual In Python Statsmodel"