Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- proc glimmix joint hypothesis test for continuous ...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-11-2011 09:35 PM

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-12-2011 06:28 AM

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-12-2011 12:19 PM

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;

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-12-2011 03:21 PM

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

Seth

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-13-2011 12:24 PM

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.

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-13-2011 12:51 PM

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

Seth