regression.quantile_regression.QuantRegResults()

statsmodels.regression.quantile_regression.QuantRegResults class statsmodels.regression.quantile_regression.QuantRegResults(model, params, normalized_cov_params=None, scale=1.0, cov_type='nonrobust', cov_kwds=None, use_t=None) [source] Results instance for the QuantReg model Methods HC0_se() HC1_se() HC2_se() HC3_se() aic() bic() bse() centered_tss() compare_f_test(restricted) use F test to test whether restricted model is correct compare_lm_test(restricted[, demean, use_lr

QuantRegResults.compare_lm_test()

statsmodels.regression.quantile_regression.QuantRegResults.compare_lm_test QuantRegResults.compare_lm_test(restricted, demean=True, use_lr=False) Use Lagrange Multiplier test to test whether restricted model is correct Parameters: restricted : Result instance The restricted model is assumed to be nested in the current model. The result instance of the restricted model is required to have two attributes, residual sum of squares, ssr, residual degrees of freedom, df_resid. demean : bool Fl

static DiscreteResults.prsquared()

statsmodels.discrete.discrete_model.DiscreteResults.prsquared static DiscreteResults.prsquared() [source]

static DiscreteResults.bse()

statsmodels.discrete.discrete_model.DiscreteResults.bse static DiscreteResults.bse()

stats.diagnostic.het_arch()

statsmodels.stats.diagnostic.het_arch statsmodels.stats.diagnostic.het_arch(resid, maxlag=None, autolag=None, store=False, regresults=False, ddof=0) Engle?s Test for Autoregressive Conditional Heteroscedasticity (ARCH) Parameters: resid : ndarray, (nobs,) residuals from an estimation, or time series maxlag : int highest lag to use autolag : None or string If None, then a fixed number of lags given by maxlag is used. store : bool If true then the intermediate results are also returned

static QuantRegResults.bic()

statsmodels.regression.quantile_regression.QuantRegResults.bic static QuantRegResults.bic() [source]

stats.sandwich_covariance.se_cov()

statsmodels.stats.sandwich_covariance.se_cov statsmodels.stats.sandwich_covariance.se_cov(cov) get standard deviation from covariance matrix just a shorthand function np.sqrt(np.diag(cov)) Parameters: cov : array_like, square covariance matrix Returns: std : ndarray standard deviation from diagonal of cov

StataReader.variables()

statsmodels.iolib.foreign.StataReader.variables StataReader.variables() [source] Returns a list of the dataset?s StataVariables objects.

TLinearModel.expandparams()

statsmodels.miscmodels.tmodel.TLinearModel.expandparams TLinearModel.expandparams(params) expand to full parameter array when some parameters are fixed Parameters: params : array reduced parameter array Returns: paramsfull : array expanded parameter array where fixed parameters are included Notes Calling this requires that self.fixed_params and self.fixed_paramsmask are defined. developer notes: This can be used in the log-likelihood to ... this could also be replaced by a more gener

Ordinary Least Squares

Ordinary Least Squares Link to Notebook GitHub In [1]: from __future__ import print_function import numpy as np import statsmodels.api as sm import matplotlib.pyplot as plt from statsmodels.sandbox.regression.predstd import wls_prediction_std np.random.seed(9876789) OLS estimation Artificial data: In [2]: nsample = 100 x = np.linspace(0, 10, 100) X = np.column_stack((x, x**2)) beta = np.array([1, 0.1, 10]) e = np.random.normal(size=nsample) Our model needs an i