You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t_test, f_test and wald_test raise the same exception
>>> res.wald_test(np.eye(3,5))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-all-new2_py27\statsmodels\statsmodels\base\model.py", line 1367, in wald_test
LC = DesignInfo(names).linear_constraint(r_matrix)
File "build\bdist.win32\egg\patsy\design_info.py", line 87, in __init__
ValueError: bad term slices
>>> len(res.params)
5
>>> res.cov_params().shape
(5, 5)
based on example for #2099 without including #2097
import pandas as pd
import statsmodels.api as sm
import statsmodels.formula.api as smf
data = sm.datasets.get_rdataset('dietox', 'geepack').data
mod = smf.mixedlm('Weight ~ Time', data, groups = 'Pig')
modf = mod.fit()
print modf.summary()
#When I try to include a random slope, the model runs and gets fitted:
mod = smf.mixedlm('Weight ~ Time', data, groups = 'Pig', re_formula = '~Time')
modf = mod.fit()
#but I get the following error:
modf.model.data.param_names += ['r']
print modf.summary()
see #436
my guess: patsy is way to restricted and limited whenever we add a new model type.
Things don't work automatically if patsy is in the code path, on the other hand it was useful to discover where we need to refactor.
Activity
josef-pkt commentedon Nov 20, 2014
see #436
my guess: patsy is way to restricted and limited whenever we add a new model type.
Things don't work automatically if patsy is in the code path, on the other hand it was useful to discover where we need to refactor.
jseabold commentedon Nov 20, 2014
Try with #2097. Works for me.
jseabold commentedon Nov 20, 2014
This should work in master now. Your script isn't fully reproducible, so I'll let you close it if confirmed.
josef-pkt commentedon Jan 11, 2015
I need to check and close for 0.7
josef-pkt commentedon Feb 6, 2015
Ok, it works, at least the code is doing what it is supposed to be doing.
see #2231 for interpretation and wald tests that include random effects parameters
josef-pkt commentedon Feb 6, 2015
Skipper's fix was backported to 0.6.1 (not 0.7 milestone)