tools.tools.unsqueeze()

statsmodels.tools.tools.unsqueeze statsmodels.tools.tools.unsqueeze(data, axis, oldshape) [source] Unsqueeze a collapsed array >>> from numpy import mean >>> from numpy.random import standard_normal >>> x = standard_normal((3,4,5)) >>> m = mean(x, axis=1) >>> m.shape (3, 5) >>> m = unsqueeze(m, 1, x.shape) >>> m.shape (3, 1, 5) >>>

TransfTwo_gen.mean()

statsmodels.sandbox.distributions.transformed.TransfTwo_gen.mean TransfTwo_gen.mean(*args, **kwds) Mean 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: mean : float the mean of the distribution

CountModel.score()

statsmodels.discrete.discrete_model.CountModel.score CountModel.score(params) Score vector of model. The gradient of logL with respect to each parameter.

PHReg.baseline_cumulative_hazard_function()

statsmodels.duration.hazard_regression.PHReg.baseline_cumulative_hazard_function PHReg.baseline_cumulative_hazard_function(params) [source] Returns a function that calculates the baseline cumulative hazard function for each stratum. Parameters: params : ndarray The model parameters. Returns: A dict mapping stratum names to the estimated baseline : cumulative hazard function. :

GLMResults.remove_data()

statsmodels.genmod.generalized_linear_model.GLMResults.remove_data GLMResults.remove_data() [source] 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

static ProbitResults.resid_generalized()

statsmodels.discrete.discrete_model.ProbitResults.resid_generalized static ProbitResults.resid_generalized() [source] Generalized residuals Notes The generalized residuals for the Probit model are defined

static ProbitResults.resid_pearson()

statsmodels.discrete.discrete_model.ProbitResults.resid_pearson static ProbitResults.resid_pearson() Pearson residuals Notes Pearson residuals are defined to be where and is the total number of observations sharing the covariate pattern . For now is always set to 1.

stats.weightstats.ztest()

statsmodels.stats.weightstats.ztest statsmodels.stats.weightstats.ztest(x1, x2=None, value=0, alternative='two-sided', usevar='pooled', ddof=1.0) [source] test for mean based on normal distribution, one or two samples In the case of two samples, the samples are assumed to be independent. Parameters: x1, x2 : array_like, 1-D or 2-D two independent samples value : float In the one sample case, value is the mean of x1 under the Null hypothesis. In the two sample case, value is the differenc

ProbitResults.predict()

statsmodels.discrete.discrete_model.ProbitResults.predict ProbitResults.predict(exog=None, transform=True, *args, **kwargs) Call self.model.predict with self.params as the first argument. Parameters: exog : array-like, optional The values for which you want to predict. transform : bool, optional If the model was fit via a formula, do you want to pass exog through the formula. Default is True. E.g., if you fit a model y ~ log(x1) + log(x2), and transform is True, then you can pass a data

ProbitResults.save()

statsmodels.discrete.discrete_model.ProbitResults.save ProbitResults.save(fname, remove_data=False) save a pickle of this instance Parameters: fname : string or filehandle fname can be a string to a file path or filename, or a filehandle. remove_data : bool If False (default), then the instance is pickled without changes. If True, then all arrays with length nobs are set to None before pickling. See the remove_data method. In some cases not all arrays will be set to None. Notes If remo