Quantile regression

Quantile regression Link to Notebook GitHub This example page shows how to use statsmodels' QuantReg class to replicate parts of the analysis published in Koenker, Roger and Kevin F. Hallock. "Quantile Regressioin". Journal of Economic Perspectives, Volume 15, Number 4, Fall 2001, Pages 143?156 We are interested in the relationship between income and expenditures on food for a sample of working class Belgian households in 1857 (the Engel data). Setup We first need to load some modules and

NegativeBinomialResults.cov_params()

statsmodels.discrete.discrete_model.NegativeBinomialResults.cov_params NegativeBinomialResults.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.

NonlinearIVGMM.fititer()

statsmodels.sandbox.regression.gmm.NonlinearIVGMM.fititer NonlinearIVGMM.fititer(start, maxiter=2, start_invweights=None, weights_method='cov', wargs=(), optim_method='bfgs', optim_args=None) iterative estimation with updating of optimal weighting matrix stopping criteria are maxiter or change in parameter estimate less than self.epsilon_iter, with default 1e-6. Parameters: start : array starting value for parameters maxiter : int maximum number of iterations start_weights : array (nmom

ARIMAResults.f_test()

statsmodels.tsa.arima_model.ARIMAResults.f_test ARIMAResults.f_test(r_matrix, cov_p=None, scale=1.0, invcov=None) Compute the F-test for a joint linear hypothesis. This is a special case of wald_test that always uses the F distribution. Parameters: r_matrix : array-like, str, or tuple array : An r x k array where r is the number of restrictions to test and k is the number of regressors. It is assumed that the linear combination is equal to zero. str : The full hypotheses to test can be giv

IRAnalysis.cum_effect_cov()

statsmodels.tsa.vector_ar.irf.IRAnalysis.cum_effect_cov IRAnalysis.cum_effect_cov(orth=False) [source] Compute asymptotic standard errors for cumulative impulse response coefficients Parameters: orth : boolean Notes eq. 3.7.7 (non-orth), 3.7.10 (orth)

GLS.fit()

statsmodels.regression.linear_model.GLS.fit GLS.fit(method='pinv', cov_type='nonrobust', cov_kwds=None, use_t=None, **kwargs) Full fit of the model. The results include an estimate of covariance matrix, (whitened) residuals and an estimate of scale. Parameters: method : str Can be ?pinv?, ?qr?. ?pinv? uses the Moore-Penrose pseudoinverse to solve the least squares problem. ?qr? uses the QR factorization. Returns: A RegressionResults class instance. : See also regression.RegressionResu

GLS.from_formula()

statsmodels.regression.linear_model.GLS.from_formula classmethod GLS.from_formula(formula, data, subset=None, *args, **kwargs) Create a Model from a formula and dataframe. Parameters: formula : str or generic Formula object The formula specifying the model data : array-like The data for the model. See Notes. subset : array-like An array-like object of booleans, integers, or index values that indicate the subset of df to use in the model. Assumes df is a pandas.DataFrame args : extra a

static QuantRegResults.condition_number()

statsmodels.regression.quantile_regression.QuantRegResults.condition_number static QuantRegResults.condition_number() Return condition number of exogenous matrix. Calculated as ratio of largest to smallest eigenvalue.

genmod.cov_struct.Autoregressive()

statsmodels.genmod.cov_struct.Autoregressive class statsmodels.genmod.cov_struct.Autoregressive(dist_func=None) [source] An autoregressive working dependence structure. The dependence is defined in terms of the time component of the parent GEE class. Time represents a potentially multidimensional index from which distances between pairs of observations can be determined. The correlation between two observations in the same cluster is dep_params^distance, where dep_params is the autocorrelati

BinaryResults.summary()

statsmodels.discrete.discrete_model.BinaryResults.summary BinaryResults.summary(yname=None, xname=None, title=None, alpha=0.05, yname_list=None) [source] Summarize the Regression Results Parameters: yname : string, optional Default is y xname : list of strings, optional Default is var_## for ## in p the number of regressors title : string, optional Title for the top table. If not None, then this replaces the default title alpha : float significance level for the confidence intervals