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
It's just a pass-through for array and makes it easier to support both ways of specifying the test without having a complicated signature. Users still never need to know about patsy under the hood.
using patsy is another detour with imports and code that I don't need to know for the simple case.
If it's just a pass-through, then it's better just to skip it ourselves.
(I'm starting to think more that we need lm and lm.fit as separate objects as in R, if we make bootstrap and other loops expensive.)
a few milliseconds and an extra import here and some there, and it starts to add up, I think.
(bootstrap with f_test for RLM with LTS starting values and scale makes a few thousand calls to OLS and WLS ?)
I'm not doing serious timing yet, but just want to avoid unnecessary cases and detours.
I opened an issue because I haven't looked at it yet. (I'm late reviewing Alexandre's code and just wanted to compare terminology/names for restriction matrices.)
I think it's likely we have t_test in a bootstrap loop, but I don't know about whether a f_test loop will be common.
Come to think of it:
Grangecausalitytests uses the f_test, also several of the other diagnostic tests use f_test.
So bootstrap for those tests will require f_test for each bootstrap sample.
There might be more permutation tests that might be easy to implement with OLS and also require f_test or t_test. Just guessing for the last part.
For pass-throughs I worry more about import times and code readability.
Well imports only happen once, and I worry that special casing for when to use patsy would be just as heavy in a loop - since patsy does this check anyway. Mainly I got tired of discussing and coding around where certain packages end and others begin. Somewhat relatedly, I still think we can ship patsy since this code will hopefully be a slow-moving target.
On windows imports happen once per process that is started, with multiprocessing/joblib.
To the relately:
If it's fast moving, we might have to ship it to keep a compatible version.
Including patsy might also make it easier to get through the Linux distribution channels, although I don't know if that's really relevant.
And, if L1 penalization/Lasso with Jonathan's code turns out to be successful, I thought, we could also include it in an external directory in the statsmodels distribution.
Just saw this while checking sandbox example under python 3.2.3
Traceback (most recent call last):
File "E:\Josef\testing\tox\py323a\Lib\site-packages\statsmodels\sandbox\examples\ex_mixed_lls_re.py", line 152, in <module>
print(res.t_test([1]))
File "E:\Josef\testing\tox\py323a\lib\site-packages\statsmodels\base\model.py", line 1178, in t_test
LC = DesignInfo(self.model.exog_names).linear_constraint(r_matrix)
AttributeError: 'OneWayMixed' object has no attribute 'exog_names'
Activity
jseabold commentedon Aug 20, 2012
It's just a pass-through for array and makes it easier to support both ways of specifying the test without having a complicated signature. Users still never need to know about patsy under the hood.
josef-pkt commentedon Aug 20, 2012
using patsy is another detour with imports and code that I don't need to know for the simple case.
If it's just a pass-through, then it's better just to skip it ourselves.
(I'm starting to think more that we need
lmandlm.fitas separate objects as in R, if we make bootstrap and other loops expensive.)a few milliseconds and an extra import here and some there, and it starts to add up, I think.
(bootstrap with f_test for RLM with LTS starting values and scale makes a few thousand calls to OLS and WLS ?)
I'm not doing serious timing yet, but just want to avoid unnecessary cases and detours.
jseabold commentedon Aug 20, 2012
I agree in general, but this seems pretty harmless. Do you anticipate using f_test in a loop?
josef-pkt commentedon Aug 20, 2012
I opened an issue because I haven't looked at it yet. (I'm late reviewing Alexandre's code and just wanted to compare terminology/names for restriction matrices.)
I think it's likely we have t_test in a bootstrap loop, but I don't know about whether a f_test loop will be common.
Come to think of it:
Grangecausalitytests uses the f_test, also several of the other diagnostic tests use f_test.
So bootstrap for those tests will require f_test for each bootstrap sample.
There might be more permutation tests that might be easy to implement with OLS and also require f_test or t_test. Just guessing for the last part.
For pass-throughs I worry more about import times and code readability.
jseabold commentedon Aug 20, 2012
Well imports only happen once, and I worry that special casing for when to use patsy would be just as heavy in a loop - since patsy does this check anyway. Mainly I got tired of discussing and coding around where certain packages end and others begin. Somewhat relatedly, I still think we can ship patsy since this code will hopefully be a slow-moving target.
josef-pkt commentedon Aug 20, 2012
On windows imports happen once per process that is started, with multiprocessing/joblib.
To the relately:
If it's fast moving, we might have to ship it to keep a compatible version.
Including patsy might also make it easier to get through the Linux distribution channels, although I don't know if that's really relevant.
And, if L1 penalization/Lasso with Jonathan's code turns out to be successful, I thought, we could also include it in an external directory in the statsmodels distribution.
josef-pkt commentedon Oct 15, 2012
Just saw this while checking sandbox example under python 3.2.3
josef-pkt commentedon Feb 6, 2013
I updated issue header, I was searching for this with term
t_testI tried to see if it works (OneWayMixed), if we just delegate to pandas if r_matrix is a string. It works, but I'm not sure we handle all cases.
josef-pkt commentedon Aug 14, 2013
Right now we have the requirement that exog_names have to be defined.
Keeping this open as "design" issue, because I'm still not happy about it.
same question when we get the normal or chisquare based Wald tests.
josef-pkt commentedon Sep 20, 2014
postponed for another day.
new SUMMary issue #1970