I would like to specify the cov_struct attribute when calling the method MixedLM (statsmodels package) but it doesn't work.
On the contrary, when specifying this parameter to the method GEE (statsmodels), it works!
More precisely :
sm.GEE.from_formula("Y ~ X1 + X2 - 1", data=data,groups=Xg, cov_struct=sm.genmod.cov_struct.Exchangeable()).fit()
works.
But
sm.MixedLM.from_formula("Y ~ X1 + X2 - 1", data=data,groups=Xg, cov_struct=sm.genmod.cov_struct.Exchangeable()).fit()
Does not Work
The error I get is :
{AttributeError}'Exchangeable' object has no attribute 'ndim'
Also, I don t really understand the groups attribute.
**kwargs
and treated as a data array.