statsmodels.genmod.families.family.Family.resid_dev Family.resid_dev(endog, mu, scale=1.0) [source] The deviance residuals Parameters: endog : array The endogenous response variable mu : array The inverse of the link function at the linear predicted values. scale : float, optional An optional argument to divide the residuals by scale Returns: Deviance residuals. : Notes The deviance residuals are defined for each family.
statsmodels.genmod.generalized_linear_model.GLMResults.resid_deviance static GLMResults.resid_deviance() [source]
statsmodels.regression.mixed_linear_model.MixedLMResults.bse_re static MixedLMResults.bse_re() [source] Returns the standard errors of the variance parameters. Note that the sampling distribution of variance parameters is strongly skewed unless the sample size is large, so these standard errors may not give meaningful confidence intervals of p-values if used in the usual way.
statsmodels.regression.mixed_linear_model.MixedLMResults.random_effects_cov static MixedLMResults.random_effects_cov() [source] Returns the conditional covariance matrix of the random effects for each group given the data. Returns: random_effects_cov : dict A dictionary mapping the distinct values of the group variable to the conditional covariance matrix of the random effects given the data.
statsmodels.duration.hazard_regression.PHRegResults.cov_params PHRegResults.cov_params(r_matrix=None, column=None, scale=None, cov_p=None, other=None) Returns the variance/covariance matrix. The variance/covariance matrix can be of a linear contrast of the estimates of params or all params multiplied by scale which will usually be an estimate of sigma^2. Scale is assumed to be a scalar. Parameters: r_matrix : array-like Can be 1d, or 2d. Can be used alone or with other. column : array-lik
statsmodels.discrete.discrete_model.NegativeBinomial.fit NegativeBinomial.fit(start_params=None, method='bfgs', maxiter=35, full_output=1, disp=1, callback=None, cov_type='nonrobust', cov_kwds=None, use_t=None, **kwargs) [source]
Discrete Choice Models Overview Link to Notebook GitHub In [1]: from __future__ import print_function import numpy as np import statsmodels.api as sm Data Load data from Spector and Mazzeo (1980). Examples follow Greene's Econometric Analysis Ch. 21 (5th Edition). In [2]: spector_data = sm.datasets.spector.load() spector_data.exog = sm.add_constant(spector_data.exog, prepend=False) Inspect the data: In [3]: print(spector_data.exog[:5,:]) print(spector_d
statsmodels.robust.norms.RamsayE.rho RamsayE.rho(z) [source] The robust criterion function for Ramsay?s Ea. Parameters: z : array-like 1d array Returns: rho : array rho(z) = a**-2 * (1 - exp(-a*|z|)*(1 + a*|z|))
statsmodels.regression.mixed_linear_model.MixedLM.initialize MixedLM.initialize() Initialize (possibly re-initialize) a Model instance. For instance, the design matrix of a linear model may change and some things must be recomputed.
statsmodels.stats.weightstats.DescrStatsW.var_ddof DescrStatsW.var_ddof(ddof=0) [source] variance of data given ddof Parameters: ddof : int, float degrees of freedom correction, independent of attribute ddof Returns: var : float, ndarray variance with denominator sum_weights - ddof
Page 200 of 224