Skip to content
Prev 244088 / 398506 Next

waldtest and nested models - poolability (parameter stability)

On Mon, 6 Dec 2010, Roberto Patuelli wrote:

            
Yes. Because waldtest() needs to figure out which contrasts to apply to 
go from the unrestricted model to the restricted model. The current 
implementation can only do so by looking at the names of the coefficients. 
It assumes that unrestricted model has all coefficients from the 
restricted model plus some more (which are set to zero under the null 
hypothesis).

When you use interactions (as you do below), this only works if you use 
the *-coding but not the /-coding.

In pseudo code:

fm0  <- glm(y ~ x, family = binomial)
fm1a <- glm(y ~ a * x, family = binomial)
fm1b <- glm(y ~ a / x, family = binomial)

The restricted model is fm0 and the unrestricted model is fm1a/fm1b. Both 
are equivalent in terms of fitted values. With waldtest() you can compare

   waldtest(fm0, fm1a)

but

   waldtest(fm0, fm1b)

fails because the models do not fulfill the restriction above. So, only 
for the inference with waldtest() you need to compute fm1a as well. If 
significant, you can go on and interpret fm1b.

Hope that helps,
Z