Programming the statistical procedures from SAS

How to run proc GLIMMIX for repeated measures

Reply
Contributor
Posts: 20

How to run proc GLIMMIX for repeated measures

Hello,

 

I use SAS 9.4 and I have a data set like this:

ID     pcs        year        disease

1       45          1            1

1       47          2            1

1       50          3            1

2       42          1            0

2       43          2            0

2       46          3            0

3       40          1            0

3       40          2            0

3       49          3            0

...

 

I want to see how the presence or absence of disease affect the PCS scores rate of change from year 1 to year 3 for each subject. I run the following codes:

 

proc glimmix data=have;
class disease (ref='0');
model pcs = disease year disease*year / cl;
run;

 

Then I got the results but I do not think it is correct, since the estimate for intercept is around 12, but the average pcs at year 1 is over 40 instead of 12. Does anyone can help me figure out the problem?

 

Thank you!

Super User
Posts: 9,775

Re: How to run proc GLIMMIX for repeated measures

In GLIMMIX , use RANDOM to get repeated measures ( R- side random effect).

proc glimmix data=have;
class disease (ref='0')  id year ;
model pcs = disease year disease*year / cl;
random year/subject=id type=ar(1) residual;
run;



Contributor
Posts: 20

Re: How to run proc GLIMMIX for repeated measures

Thank you for the reply! When I run your codes I met another problem. 

 

I can get parameter estimates for intercept, disease, year, and disease*year. But when I add some other covariates into the model, i found that the estimates for intercept and disease changed but the estimate for disease*year remained the same. I am not quite sure if this is correct? (I think the estimate for disease*year should change and the estimates for intercept and disease should remain the same).

Ask a Question
Discussion stats
  • 2 replies
  • 140 views
  • 0 likes
  • 2 in conversation