MixedLM.hessian()

statsmodels.regression.mixed_linear_model.MixedLM.hessian MixedLM.hessian(params) [source] Returns the Hessian matrix of the profile log-likelihood. Notes The Hessian matrix that is returned is computed with respect to the parameterization defined by this model?s use_sqrt attribute. The input value params can be with respect to any parameterization.

MixedLM.group_list()

statsmodels.regression.mixed_linear_model.MixedLM.group_list MixedLM.group_list(array) [source] Returns array split into subarrays corresponding to the grouping structure.

MixedLM.from_formula()

statsmodels.regression.mixed_linear_model.MixedLM.from_formula classmethod MixedLM.from_formula(formula, data, re_formula=None, subset=None, *args, **kwargs) [source] 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. re_formula : string A one-sided formula defining the variance structure of the model. The default gives a random intercept for each group.

MixedLM.fit_regularized()

statsmodels.regression.mixed_linear_model.MixedLM.fit_regularized MixedLM.fit_regularized(start_params=None, method='l1', alpha=0, ceps=0.0001, ptol=1e-06, maxit=200, **fit_kwargs) [source] Fit a model in which the fixed effects parameters are penalized. The dependence parameters are held fixed at their estimated values in the unpenalized model. Parameters: method : string of Penalty object Method for regularization. If a string, must be ?l1?. alpha : array-like Scalar or vector of penal

MixedLM.get_scale()

statsmodels.regression.mixed_linear_model.MixedLM.get_scale MixedLM.get_scale(fe_params, cov_re) [source] Returns the estimated error variance based on given estimates of the slopes and random effects covariance matrix. Parameters: fe_params : array-like The regression slope estimates cov_re : 2d array Estimate of the random effects covariance matrix (Psi). Returns: scale : float The estimated error variance.

MixedLM.fit()

statsmodels.regression.mixed_linear_model.MixedLM.fit MixedLM.fit(start_params=None, reml=True, niter_em=0, niter_sa=0, do_cg=True, fe_pen=None, cov_pen=None, free=None, full_output=False, **kwargs) [source] Fit a linear mixed model to the data. Parameters: start_params: array-like or MixedLMParams : If a MixedLMParams the state provides the starting value. If array-like, this is the packed parameter vector, assumed to be in the same state as this model. reml : bool If true, fit accordin

MixedLM.Estep()

statsmodels.regression.mixed_linear_model.MixedLM.Estep MixedLM.Estep(fe_params, cov_re, scale) [source] The E-step of the EM algorithm. This is for ML (not REML), but it seems to be good enough to use for REML starting values. Parameters: fe_params : 1d ndarray The current value of the fixed effect coefficients cov_re : 2d ndarray The current value of the covariance matrix of random effects scale : positive scalar The current value of the error variance Returns: m1x : 1d ndarray s

miscmodels.tmodel.TLinearModel()

statsmodels.miscmodels.tmodel.TLinearModel class statsmodels.miscmodels.tmodel.TLinearModel(endog, exog=None, loglike=None, score=None, hessian=None, missing='none', extra_params_names=None, **kwds) [source] Maximum Likelihood Estimation of Linear Model with t-distributed errors This is an example for generic MLE. Except for defining the negative log-likelihood method, all methods and results are generic. Gradients and Hessian and all resulting statistics are based on numerical differentiati

MixedLM.EM()

statsmodels.regression.mixed_linear_model.MixedLM.EM MixedLM.EM(fe_params, cov_re, scale, niter_em=10, hist=None) [source] Run the EM algorithm from a given starting point. This is for ML (not REML), but it seems to be good enough to use for REML starting values. Returns: fe_params : 1d ndarray The final value of the fixed effects coefficients cov_re : 2d ndarray The final value of the random effects covariance matrix scale : float The final value of the error variance Notes This use

miscmodels.count.PoissonOffsetGMLE()

statsmodels.miscmodels.count.PoissonOffsetGMLE class statsmodels.miscmodels.count.PoissonOffsetGMLE(endog, exog=None, offset=None, missing='none', **kwds) [source] Maximum Likelihood Estimation of Poisson Model This is an example for generic MLE which has the same statistical model as discretemod.Poisson but adds offset Except for defining the negative log-likelihood method, all methods and results are generic. Gradients and Hessian and all resulting statistics are based on numerical differe