Gaussian.resid_dev()

statsmodels.genmod.families.family.Gaussian.resid_dev Gaussian.resid_dev(endog, mu, scale=1.0) [source] Gaussian deviance residuals Parameters: endog : array-like Endogenous response variable mu : array-like Fitted mean response variable scale : float, optional An optional argument to divide the residuals by scale Returns: resid_dev : array Deviance residuals as defined below Notes resid_dev = (endog - mu)/sqrt(variance(mu))

Gaussian.resid_anscombe()

statsmodels.genmod.families.family.Gaussian.resid_anscombe Gaussian.resid_anscombe(endog, mu) [source] The Anscombe residuals for the Gaussian exponential family distribution Parameters: endog : array Endogenous response variable mu : array Fitted mean response variable Returns: resid_anscombe : array The Anscombe residuals for the Gaussian family defined below Notes resid_anscombe = endog - mu

Gaussian.predict()

statsmodels.genmod.families.family.Gaussian.predict Gaussian.predict(mu) Linear predictors based on given mu values. Parameters: mu : array The mean response variables Returns: lin_pred : array Linear predictors based on the mean response variables. The value of the link function at the given mu.

Gaussian.loglike()

statsmodels.genmod.families.family.Gaussian.loglike Gaussian.loglike(endog, mu, scale=1.0) [source] Loglikelihood function for Gaussian exponential family distribution. Parameters: endog : array-like Endogenous response variable mu : array-like Fitted mean response variable scale : float, optional Scales the loglikelihood function. The default is 1. Returns: llf : float The value of the loglikelihood function evaluated at (endog,mu,scale) as defined below. Notes If the link is th

Gaussian.fitted()

statsmodels.genmod.families.family.Gaussian.fitted Gaussian.fitted(lin_pred) Fitted values based on linear predictors lin_pred. Parameters: lin_pred : array Values of the linear predictor of the model. dot(X,beta) in a classical linear model. Returns: mu : array The mean response variables given by the inverse of the link function.

Gaussian.deviance()

statsmodels.genmod.families.family.Gaussian.deviance Gaussian.deviance(endog, mu, scale=1.0) [source] Gaussian deviance function Parameters: endog : array-like Endogenous response variable mu : array-like Fitted mean response variable scale : float, optional An optional scale argument Returns: deviance : float The deviance function at (endog,mu) as defined below. Notes deviance = sum((endog-mu)**2)

Gamma.weights()

statsmodels.genmod.families.family.Gamma.weights Gamma.weights(mu) Weights for IRLS steps Parameters: mu : array-like The transformed mean response variable in the exponential family Returns: w : array The weights for the IRLS steps Notes w = 1 / (link?(mu)**2 * variance(mu))

Gamma.starting_mu()

statsmodels.genmod.families.family.Gamma.starting_mu Gamma.starting_mu(y) Starting value for mu in the IRLS algorithm. Parameters: y : array The untransformed response variable. Returns: mu_0 : array The first guess on the transformed response variable. Notes Only the Binomial family takes a different initial value.

Gamma.resid_dev()

statsmodels.genmod.families.family.Gamma.resid_dev Gamma.resid_dev(endog, mu, scale=1.0) [source] Gamma deviance residuals Parameters: endog : array-like Endogenous response variable mu : array-like Fitted mean response variable scale : float, optional An optional argument to divide the residuals by scale Returns: resid_dev : array Deviance residuals as defined below Notes resid_dev is defined

Gamma.resid_anscombe()

statsmodels.genmod.families.family.Gamma.resid_anscombe Gamma.resid_anscombe(endog, mu) [source] The Anscombe residuals for Gamma exponential family distribution Parameters: endog : array Endogenous response variable mu : array Fitted mean response variable Returns: resid_anscombe : array The Anscombe residuals for the Gamma family defined below Notes resid_anscombe = 3*(endog**(1/3.)-mu**(1/3.))/mu**(1/3.)