Other Models miscmodels

Other Models miscmodels statsmodels.miscmodels contains model classes and that do not yet fit into any other category, or are basic implementations that are not yet polished and will most likely still change. Some of these models were written as examples for the generic maximum likelihood framework, and there will be others that might be based on general method of moments. The models in this category have been checked for basic cases, but might be more exposed to numerical problems than the com

tools.eval_measures.meanabs()

statsmodels.tools.eval_measures.meanabs statsmodels.tools.eval_measures.meanabs(x1, x2, axis=0) [source] mean absolute error Parameters: x1, x2 : array_like The performance measure depends on the difference between these two arrays. axis : int axis along which the summary statistic is calculated Returns: meanabs : ndarray or float mean absolute difference along given axis. Notes If x1 and x2 have different shapes, then they need to broadcast. This uses numpy.asanyarray to convert t

ACSkewT_gen.var()

statsmodels.sandbox.distributions.extras.ACSkewT_gen.var ACSkewT_gen.var(*args, **kwds) Variance of the distribution Parameters: arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution (see docstring of the instance object for more information) loc : array_like, optional location parameter (default=0) scale : array_like, optional scale parameter (default=1) Returns: var : float the variance of the distribution

ExpTransf_gen.freeze()

statsmodels.sandbox.distributions.transformed.ExpTransf_gen.freeze ExpTransf_gen.freeze(*args, **kwds) Freeze the distribution for the given arguments. Parameters: arg1, arg2, arg3,... : array_like The shape parameter(s) for the distribution. Should include all the non-optional arguments, may include loc and scale. Returns: rv_frozen : rv_frozen instance The frozen distribution.

GMM.from_formula()

statsmodels.sandbox.regression.gmm.GMM.from_formula classmethod GMM.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 ar

Nested.covariance_matrix_solve()

statsmodels.genmod.cov_struct.Nested.covariance_matrix_solve Nested.covariance_matrix_solve(expval, index, stdev, rhs) Solves matrix equations of the form covmat * soln = rhs and returns the values of soln, where covmat is the covariance matrix represented by this class. Parameters: expval: array-like : The expected value of endog for each observed value in the group. index: integer : The group index. stdev : array-like The standard deviation of endog for each observation in the group.

ARIMAResults.load()

statsmodels.tsa.arima_model.ARIMAResults.load classmethod ARIMAResults.load(fname) load a pickle, (class method) Parameters: fname : string or filehandle fname can be a string to a file path or filename, or a filehandle. Returns: unpickled instance :

discrete.discrete_model.MultinomialModel()

statsmodels.discrete.discrete_model.MultinomialModel class statsmodels.discrete.discrete_model.MultinomialModel(endog, exog, **kwargs) [source] Methods cdf(X) The cumulative distribution function of the model. cov_params_func_l1(likelihood_model, xopt, ...) Computes cov_params on a reduced parameter space corresponding to the nonzero parameters resulting from the l1 regularized fit. fit([start_params, method, maxiter, ...]) Fit the model using maximum likelihood. fit_regularized([start_p

tools.numdiff.approx_hess3()

statsmodels.tools.numdiff.approx_hess3 statsmodels.tools.numdiff.approx_hess3(x, f, epsilon=None, args=(), kwargs={}) [source] Calculate Hessian with finite difference derivative approximation Parameters: x : array_like value at which function derivative is evaluated f : function function of one array f(x, *args, **kwargs) epsilon : float or array-like, optional Stepsize used, if None, then stepsize is automatically chosen according to EPS**(1/4)*x. args : tuple Arguments for functio

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