MultinomialModel.pdf()

statsmodels.discrete.discrete_model.MultinomialModel.pdf MultinomialModel.pdf(X) The probability density (mass) function of the model.

Logit.fit_regularized()

statsmodels.discrete.discrete_model.Logit.fit_regularized Logit.fit_regularized(start_params=None, method='l1', maxiter='defined_by_method', full_output=1, disp=1, callback=None, alpha=0, trim_mode='auto', auto_trim_tol=0.01, size_trim_tol=0.0001, qc_tol=0.03, **kwargs) Fit the model using a regularized maximum likelihood. The regularization method AND the solver used is determined by the argument method. Parameters: start_params : array-like, optional Initial guess of the solution for the

Robust Linear Models

Robust Linear Models 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 Estimation Load data: In [2]: data = sm.datasets.stackloss.load() data.exog = sm.add_constant(data.exog) Huber's T norm with the (default) median absolute deviation scaling In [3]: huber_t = sm.RLM(data.endog, data.e

tsa.filters.hp_filter.hpfilter()

statsmodels.tsa.filters.hp_filter.hpfilter statsmodels.tsa.filters.hp_filter.hpfilter(X, lamb=1600) [source] Hodrick-Prescott filter Parameters: X : array-like The 1d ndarray timeseries to filter of length (nobs,) or (nobs,1) lamb : float The Hodrick-Prescott smoothing parameter. A value of 1600 is suggested for quarterly data. Ravn and Uhlig suggest using a value of 6.25 (1600/4**4) for annual data and 129600 (1600*3**4) for monthly data. Returns: cycle : array The estimated cycle i

CountModel.fit()

statsmodels.discrete.discrete_model.CountModel.fit CountModel.fit(start_params=None, method='newton', maxiter=35, full_output=1, disp=1, callback=None, **kwargs) [source] Fit the model using maximum likelihood. The rest of the docstring is from statsmodels.base.model.LikelihoodModel.fit Fit method for likelihood based models Parameters: start_params : array-like, optional Initial guess of the solution for the loglikelihood maximization. The default is an array of zeros. method : str, opti

PoissonGMLE.score_obs()

statsmodels.miscmodels.count.PoissonGMLE.score_obs PoissonGMLE.score_obs(params, **kwds) Jacobian/Gradient of log-likelihood evaluated at params for each observation.

ARResults.remove_data()

statsmodels.tsa.ar_model.ARResults.remove_data ARResults.remove_data() remove data arrays, all nobs arrays from result and model This reduces the size of the instance, so it can be pickled with less memory. Currently tested for use with predict from an unpickled results and model instance. Warning Since data and some intermediate results have been removed calculating new statistics that require them will raise exceptions. The exception will occur the first time an attribute is accessed that

sandbox.regression.try_catdata.labelmeanfilter()

statsmodels.sandbox.regression.try_catdata.labelmeanfilter statsmodels.sandbox.regression.try_catdata.labelmeanfilter(y, x) [source]

Distributions

Distributions This section collects various additional functions and methods for statistical distributions. Empirical Distributions ECDF(x[, side]) Return the Empirical CDF of an array as a step function. StepFunction(x, y[, ival, sorted, side]) A basic step function. Distribution Extras Skew Distributions SkewNorm_gen() univariate Skew-Normal distribution of Azzalini SkewNorm2_gen([momtype, a, b, xtol, ...]) univariate Skew-Normal distribution of Azzalini ACSkewT_gen() univariate Skew-

PoissonGMLE.nloglike()

statsmodels.miscmodels.count.PoissonGMLE.nloglike PoissonGMLE.nloglike(params)