在 statsmodels 中自举混合效应回归系数
bootstrapping mixed effect regression coefficients in statsmodels
我有一个看起来像这样的混合效果模型:
import statsmodels.formula.api as smf
formula = "revised_error ~ C(condition, Treatment('solo_feedback'))*round_index"
model = smf.mixedlm(forumla, data=data, groups=data['player_id']).fit()
现在 model.conf_int()
得到了基于标准正态分布的拟合参数的置信区间。但是,我想要自举系数和置信度,但 model.boostrap()
抛出错误:
AttributeError: 'MixedLMResults' object has no attribute 'endog'
我有一个看起来像这样的混合效果模型:
import statsmodels.formula.api as smf
formula = "revised_error ~ C(condition, Treatment('solo_feedback'))*round_index"
model = smf.mixedlm(forumla, data=data, groups=data['player_id']).fit()
现在 model.conf_int()
得到了基于标准正态分布的拟合参数的置信区间。但是,我想要自举系数和置信度,但 model.boostrap()
抛出错误:
AttributeError: 'MixedLMResults' object has no attribute 'endog'