Generalized Linear Models (Formula)

Generalized Linear Models (Formula) Link to Notebook GitHub This notebook illustrates how you can use R-style formulas to fit Generalized Linear Models. To begin, we load the Star98 dataset and we construct a formula and pre-process the data: In [1]: from __future__ import print_function import statsmodels.api as sm import statsmodels.formula.api as smf star98 = sm.datasets.star98.load_pandas().data formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT + \

CDFLink.inverse()

statsmodels.genmod.families.links.CDFLink.inverse CDFLink.inverse(z) [source] The inverse of the CDF link Parameters: z : array-like The value of the inverse of the link function at p Returns: p : array Mean probabilities. The value of the inverse of CDF link of z Notes g^(-1)(z) = dbn.cdf(z)

RegressionResults.load()

statsmodels.regression.linear_model.RegressionResults.load classmethod RegressionResults.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 :

sandbox.distributions.extras.NormExpan_gen()

statsmodels.sandbox.distributions.extras.NormExpan_gen class statsmodels.sandbox.distributions.extras.NormExpan_gen(args, **kwds) [source] Gram-Charlier Expansion of Normal distribution class follows scipy.stats.distributions pattern but with __init__ Methods cdf(x, *args, **kwds) Cumulative distribution function of the given RV. entropy(*args, **kwds) Differential entropy of the RV. est_loc_scale(*args, **kwds) est_loc_scale is deprecated! expect([func, args, loc, scale, lb, ub, ...])

SkewNorm2_gen.est_loc_scale()

statsmodels.sandbox.distributions.extras.SkewNorm2_gen.est_loc_scale SkewNorm2_gen.est_loc_scale(*args, **kwds) est_loc_scale is deprecated! This function is deprecated, use self.fit_loc_scale(data) instead.

static VARResults.bse()

statsmodels.tsa.vector_ar.var_model.VARResults.bse static VARResults.bse() Standard errors of coefficients, reshaped to match in size

ArmaFft.spdmapoly()

statsmodels.sandbox.tsa.fftarma.ArmaFft.spdmapoly ArmaFft.spdmapoly(w, twosided=False) [source] ma only, need division for ar, use LagPolynomial

ARIMAResults.t_test()

statsmodels.tsa.arima_model.ARIMAResults.t_test ARIMAResults.t_test(r_matrix, cov_p=None, scale=None, use_t=None) Compute a t-test for a each linear hypothesis of the form Rb = q Parameters: r_matrix : array-like, str, tuple array : If an array is given, a p x k 2d array or length k 1d array specifying the linear restrictions. It is assumed that the linear combination is equal to zero. str : The full hypotheses to test can be given as a string. See the examples. tuple : A tuple of arrays i

TLinearModel.jac()

statsmodels.miscmodels.tmodel.TLinearModel.jac TLinearModel.jac(*args, **kwds) jac is deprecated, use score_obs instead! Use score_obs method. jac will be removed in 0.7. Jacobian/Gradient of log-likelihood evaluated at params for each observation.

sandbox.stats.multicomp.ccols

statsmodels.sandbox.stats.multicomp.ccols statsmodels.sandbox.stats.multicomp.ccols = array([ 2, 3, 4, 5, 6, 7, 8, 9, 10])