Programming the statistical procedures from SAS

longitudinal proc mixed

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

longitudinal proc mixed

Hi - I am using PROC MIXED to estimate a longitudinal  model. Below is a sample code

 

PROC MIXED DATA=TEST3 COVTEST NOCLPRINT NOITPRINT METHOD=ML;

CLASS SUBID RACE;

MODEL=TMA PRAC CAGE  RACE|CAGE/SOLUTION DDFM=BETWITHIN  OUTP=P ;

RANDOM INTERCEPT CAGE/SOLUTION TYPE=UN SUBJECT=SUBID;

RUN;

 

TMA is a continous outcome variable, PRAC is a cumumlative continous exposure variable (cumulative exposure to a toxic drug) and CAGE is a grand mean centered age variable, RACE is a three categroical level race variable.  My main predictor of interest is PRAC. My question is in order to estimate the association between PRAC and TMA - over duration of study, I include PRAC|CAGE interaction in the model?

 

Thank you for your help

 


Accepted Solutions
Solution
‎07-05-2016 02:45 PM
Respected Advisor
Posts: 2,655

Re: longitudinal proc mixed

it would certainly let you know if the relationship between PRAC and TMA differed due to CAGE.  I did notice what is probably a typo in your model statement--the equals sign should follow TMA, not precede it.

 

Steve Denham

View solution in original post


All Replies
Solution
‎07-05-2016 02:45 PM
Respected Advisor
Posts: 2,655

Re: longitudinal proc mixed

it would certainly let you know if the relationship between PRAC and TMA differed due to CAGE.  I did notice what is probably a typo in your model statement--the equals sign should follow TMA, not precede it.

 

Steve Denham

New Contributor
Posts: 3

Re: longitudinal proc mixed

Thank you for the correction.

New Contributor
Posts: 3

Re: longitudinal proc mixed

I have another related question for the cumumlative continous exposure variable PRAC. How can I query PROC MIXED to produce estimates of slopes at various points on the association curve between PRAC and the outcome. For instance, if I wanted to know the slopes of the outcome when PRAC = 50?

 

Thank you

 

Respected Advisor
Posts: 2,655

Re: longitudinal proc mixed

This looks like you need to use an ESTIMATE statement with a SUBJECT option to set up random-effect contrasts.

 

Or use the LSMEANS statement with an AT option.  However, that wouldn't give you a slope, but rather a point estimate at, for instance, PRAC = 50.

 

The thing here is that the random intercept and slope are independent of the value of PRAC, so maybe I am completely misinterpreting your question.

 

Steve Denham

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 324 views
  • 0 likes
  • 2 in conversation