MixedLM.fit()

statsmodels.regression.mixed_linear_model.MixedLM.fit

MixedLM.fit(start_params=None, reml=True, niter_sa=0, do_cg=True, fe_pen=None, cov_pen=None, free=None, full_output=False, method='bfgs', **kwargs) [source]

Fit a linear mixed model to the data.

Parameters:

start_params: array-like or MixedLMParams

Starting values for the profile log-likelihood. If not a MixedLMParams instance, this should be an array containing the packed parameters for the profile log-likelihood, including the fixed effects parameters.

reml : bool

If true, fit according to the REML likelihood, else fit the standard likelihood using ML.

cov_pen : CovariancePenalty object

A penalty for the random effects covariance matrix

fe_pen : Penalty object

A penalty on the fixed effects

free : MixedLMParams object

If not None, this is a mask that allows parameters to be held fixed at specified values. A 1 indicates that the correspondinig parameter is estimated, a 0 indicates that it is fixed at its starting value. Setting the cov_re component to the identity matrix fits a model with independent random effects. Note that some optimization methods do not respect this constraint (bfgs and lbfgs both work).

full_output : bool

If true, attach iteration history to results

method : string

Optimization method.

Returns:

A MixedLMResults instance.

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.regression.mixed_linear_model.MixedLM.fit.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部