BookmarkSubscribeRSS Feed
mtaetntan
Calcite | Level 5

Hello,

I am using PROC GLIMMIX to perform a multilevel logistic regression.  I am interested in a number of interaction effects.  Breaking down interactions for categorical*categorical terms is relatively straightforward with LSMEANS; however, I have not been able to find a resource which details how to break down custom hypotheses for continuous*categorical interaction terms.   Does anyone have suggestions for resources that may detail how to explore these types of interactions for a PROC GLIMMIX logit model?

Thanks!

6 REPLIES 6
SteveDenham
Jade | Level 19

Do whatever it takes to get a copy of Walt Stroup's Generalized Linear Mixed Models. Then turn to page 220 where he starts a section on Analysis of Covariance.  This will walk you through how to handle covariate(continuous) by treatment(categorical) interactions and specific tests at various levels of the continuous variable.

Steve Denham

SpanishPhD
Calcite | Level 5

Hello,

I'm sorry to use this section to my own interest. But I have the same question and I can not find the right command ...

This is my model on avian reproduction. Where age1 is a continuous variable(1, 2, 3)  and sex is categorical (1= male, 2= female).

proc glimmix data=Reproduction INFOCRIT=PQ  noreml;

class Sex nest Age2 ring;

model Reproduction (Event="1") = Sex Age1 Sex*Age1/dist= binomial link=logit solution cl;

random Age2/ subject=ring (nest) type=cs residual;

ESTIMATE 'sex 1 vs 2 at age  1 in' sex -1 1 0 Sex*Age1 -1 1 0 ;

ESTIMATE 'sex 1 vs 2 at age  2 in' sex -1 1 0 Sex*Age1 -2 2 0 ;

ESTIMATE 'sex 1 vs 2 at age  3 in' sex -1 1 0 Sex*Age1 -3 3 0 ;

run;

Could you tell me the correct command to see estimates of the interaction "Sex*Age1"? The estimates that I have shown in my model, showed me only sex differences for each age, but I need male differences along age. I'm sorry for my limited knowledge of SAS.


Thank you very much.


All the best,

Jaime

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Search some old posts. This has come up several times in the past. Here is one place to start:

SpanishPhD
Calcite | Level 5

I'm sorry but I can not understand how this works. In my case it is an interaction between a continuous and categorical variable, and I also used proc GLIMMIX with dist= binomial link=logit. Although the method could be similar (continuous*continuous), it is difficult to understand because my little knowledge in SAS. In my particular model, what should I use?

Thank you very much,

Jaime

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

THis was just an example. Search this website for interaction of continuous and categorical. There are several posts.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

I don't quite understand your question, but I think you want to know the mean difference between age1 of 1 and 3 (for example) for males. The third contrast will do this, but I show the first two so you can see the steps.

estimate 'm age 1' int 1 sex 1 0 age1  1  sex*age1 1;

estimate 'm age 3' int 1 sex 1 0 age1  3  sex*age1 3;

estimate 'm, age 3-1               ' age1  2  sex*age1 2;

Note the the last estimate is the difference between the first two (which give you means for age 1 and age 3, both for males only [the first level of sex]). WIth the difference, terms like the intercept and sex main effect cancel.

By the way, there are only two levels to your sex*age1 interaction, so your estimate statements will not work.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2612 views
  • 0 likes
  • 4 in conversation