Programming the statistical procedures from SAS

proc glimmix joint hypothesis test for continuous variable?

Reply
Occasional Contributor
Posts: 9

proc glimmix joint hypothesis test for continuous variable?

Hi,

Trying to wade through estimate and contrast in proc glimmix. I have a model with a binomial response that I am modelling with 2 continuous variables, 1 categorical variable, and the interaction between the 2 continuous variables and the 1 categorical variable. The categorical variable has only two levels. I would like to perform a joint hypothesis test that all slope coefficients for the interactions are equal to 0. Here's sample code.

PROC GLIMMIX Data=sas3 empirical=df initglm;
class cl1;
MODEL devchng (event='1') =

agricden
grassden
CL1
agricden*cl1
grassden*cl1
/link=logit dist=binomial ddfm=none s stdcoef cl;
run;

Another variation on this model will contain a random effect (this is why I am using glimmix). Hopefully this will not change things too much.

Can someone jot a simple code that tests whether the slope coefficients associated with the two interactions are equal to 0?

Thanks,

Seth
Respected Advisor
Posts: 2,655

Re: proc glimmix joint hypothesis test for continuous variable?

I won't guarantee this will work, but it should test what you want. By specifying 'NOINT', you should get estimates for each slope, and the tests will be in the fixed effects solution. Try:
PROC GLIMMIX Data=sas3 empirical=df initglm;
class cl1;
MODEL devchng (event='1') =

agricden
grassden
CL1
agricden*cl1
grassden*cl1
/link=logit dist=binomial ddfm=none s stdcoef cl NOINT;
run;


Good luck,

SteveDenham
Regular Contributor
Posts: 169

Re: proc glimmix joint hypothesis test for continuous variable?

There are a couple of ways that you could test the joint hypothesis regarding all of the interaction effects. You could construct a likelihood ratio test by removing the interaction terms and refitting the model, The change in -2LL follows an approximate chi-square distribution with df equal to the number of parameters which have been removed from the model (2 in this case). A likelihood ratio test can be employed even when you have random effects in the model if you specify use of quadrature or laplace methods for approximating the integration of the random effects.

Alternatively, you can use a CONTRAST statement to test the joint null hypothesis. In this case, the CONTRAST statement would be:

contrast "Interaction joint null"
  agricden*cl1   -1 1,
  grassden*cl1   -1 1;
Occasional Contributor
Posts: 9

Re: proc glimmix joint hypothesis test for continuous variable?

Thanks everyone. I will be using the empirical procedure option with a spatial covariance random effect which fits a GEE-type model. In that case, likelihood estimation is not used and likelihood based fit statistics are not returned. Instead, pseudo-likelihood takes its place, which from the SAS documentation disallows model comparison using things like pseudo-AIC, and by extension I would assume would disallow likelihood ratio tests involving the full and reduced models. If I were to use a contrast statement with random effects, am I correct to assume that the spatial covariance structure used in the contrasts are those from the full model? Otherwise, the model would need to be fit twice. When fit separately, the full (with interaction) and reduced models have slightly different covariance structures. Is this a potential issue with a fix by setting some procedure options?

Seth
Regular Contributor
Posts: 169

Re: proc glimmix joint hypothesis test for continuous variable?

You are correct that likelihood ratio tests are not available when using a pseudo-likelihood estimation technique. In that case, a test of the joint effects using a CONTRAST statement is really your only option.

I really don't understand your comment at the end of your follow-up post in which you suggest fitting the model twice, even when using a CONTRAST statement. A CONTRAST statement only operates on the parameter estimates and associated covariance structure from the model which generated the point estimates.
Occasional Contributor
Posts: 9

Re: proc glimmix joint hypothesis test for continuous variable?

Thanks Dale. I was taking the idea of a likelihood ratio test and applying it to a joint hypothesis test on the parameter estimates. With the likelihood ratio test, you would fit two models and so there would be two different covariance structures. This would not be the case with a joint hypothesis test, as they work on different concepts (as far as my current level of understanding). So, my last bit was indeed nonsensical!

Seth
Ask a Question
Discussion stats
  • 5 replies
  • 265 views
  • 0 likes
  • 3 in conversation