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
In many cases when working with linear models, one has a model like y ~ 1 + a + b:c and you want to test a hypothesis like "y at a = a1 is significantly different from y at a = a2 (with the other predictors set to arbitrary values)". In this particular case, for a linear model, this is a well-defined and can be expressed as a linear hypothesis test. By contrast, a hypothesis like "y at b = b1 is significantly different from y at b = b2", because the difference between these is undefined without knowing c. OTOH, a hypothesis like "y at b = b1 and c = c1 is significantly different from y at b = b2 and c = c2" is also well-defined.
So we want some way for users to request a "prediction" of the difference between the design matrices at these sorts of partially-specified locations, and then patsy would (a) check that this actually makes sense, and (b) figure it out.
Initially, for simplicity, this should probably be done for "factor prediction" (so #63 would be a precondition). It would be nice to have it for "data-level prediction" too, but this will require more metadata about which data variables are referred to in which factors. Possibly we will get that soon because we need somewhat similar information to allow pickling (#25).
The text was updated successfully, but these errors were encountered:
Basically lets you create a DesignMatrixBuilder (the thing you use to get predictions) that contains only a subset of the originaly terms. So this is pretty reasonable data-level partial prediction. It would still be useful to have factor-level partial prediction, and (if easy) more metadata about which factors depend on which data variables.
In many cases when working with linear models, one has a model like
y ~ 1 + a + b:c
and you want to test a hypothesis like "y
ata = a1
is significantly different fromy
ata = a2
(with the other predictors set to arbitrary values)". In this particular case, for a linear model, this is a well-defined and can be expressed as a linear hypothesis test. By contrast, a hypothesis like "y
atb = b1
is significantly different fromy
atb = b2
", because the difference between these is undefined without knowingc
. OTOH, a hypothesis like "y
atb = b1
andc = c1
is significantly different fromy
atb = b2
andc = c2
" is also well-defined.So we want some way for users to request a "prediction" of the difference between the design matrices at these sorts of partially-specified locations, and then patsy would (a) check that this actually makes sense, and (b) figure it out.
Initially, for simplicity, this should probably be done for "factor prediction" (so #63 would be a precondition). It would be nice to have it for "data-level prediction" too, but this will require more metadata about which data variables are referred to in which factors. Possibly we will get that soon because we need somewhat similar information to allow pickling (#25).
The text was updated successfully, but these errors were encountered: