regression.linear_model.GLSAR()

statsmodels.regression.linear_model.GLSAR class statsmodels.regression.linear_model.GLSAR(endog, exog=None, rho=1, missing='none', **kwargs) [source] A regression model with an AR(p) covariance structure. Parameters: endog : array-like 1-d endogenous response variable. The dependent variable. exog : array-like A nobs x k array where nobs is the number of observations and k is the number of regressors. An intercept is not included by default and should be added by the user. See statsmodel

regression.linear_model.GLS()

statsmodels.regression.linear_model.GLS class statsmodels.regression.linear_model.GLS(endog, exog, sigma=None, missing='none', hasconst=None, **kwargs) [source] Generalized least squares model with a general covariance structure. Parameters: endog : array-like 1-d endogenous response variable. The dependent variable. exog : array-like A nobs x k array where nobs is the number of observations and k is the number of regressors. An intercept is not included by default and should be added by

Regression with Discrete Dependent Variable

Regression with Discrete Dependent Variable Regression models for limited and qualitative dependent variables. The module currently allows the estimation of models with binary (Logit, Probit), nominal (MNLogit), or count (Poisson) data. See Module Reference for commands and arguments. Examples # Load the data from Spector and Mazzeo (1980) spector_data = sm.datasets.spector.load() spector_data.exog = sm.add_constant(spector_data.exog) # Logit Model logit_mod = sm.Logit(spector_data.endog, spe

Regression Plots

Regression Diagnostics and Specification Tests

Regression Diagnostics and Specification Tests Introduction In many cases of statistical analysis, we are not sure whether our statistical model is correctly specified. For example when using ols, then linearity and homoscedasticity are assumed, some test statistics additionally assume that the errors are normally distributed or that we have a large sample. Since our results depend on these statistical assumptions, the results are only correct of our assumptions hold (at least approximately).

Regression diagnostics

Regression diagnostics Link to Notebook GitHub This example file shows how to use a few of the statsmodels regression diagnostic tests in a real-life context. You can learn about more tests and find out more information abou the tests here on the Regression Diagnostics page. Note that most of the tests described here only return a tuple of numbers, without any annotation. A full description of outputs is always included in the docstring and in the online statsmodels documentation. For pres

RamsayE.weights()

statsmodels.robust.norms.RamsayE.weights RamsayE.weights(z) [source] Ramsay?s Ea weighting function for the IRLS algorithm The psi function scaled by z Parameters: z : array-like 1d array Returns: weights : array weights(z) = exp(-a*|z|)

RamsayE.rho()

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|))

RamsayE.psi_deriv()

statsmodels.robust.norms.RamsayE.psi_deriv RamsayE.psi_deriv(z) [source] The derivative of Ramsay?s Ea psi function. Notes Used to estimate the robust covariance matrix.

RamsayE.psi()

statsmodels.robust.norms.RamsayE.psi RamsayE.psi(z) [source] The psi function for Ramsay?s Ea estimator The analytic derivative of rho Parameters: z : array-like 1d array Returns: psi : array psi(z) = z*exp(-a*|z|)