Programming the statistical procedures from SAS

GLIMMIX for repeated measures

Reply
Learner
Posts: 1

GLIMMIX for repeated measures

Hello to everybody,

 

I´ve recently started working with SAS and PROC MIXED and there are some things I don´t have clear.

 

I have collected information from some shops for three years; there are shops with 3 observations, others one with 2 and others one with only 1. The variable response (Y) is if the shop has internet conession or not (YES=1, NO=0). I have also complementary information for each shop: the shop´s size (small,medium,big), the distrit to which the shop belongs (classified as 1,2,...,7) and the shop´s activity (classified as 1,2,...27).

 

I have created a model with shop´s size (SIZE) as fixed effect and with 2 random effects: the distrit (distr) and te activity (ACT). AS I have repeated measures, I introuce the time variable (YEAR) for each shop (ID) as random also.

 

So, this is the model I´m running:

 

proc glimmix data=datos method=laplace;
class SIZE DIST ACT ID  YEAR;
model Y(event="1")= SIZE / cl dist=binary link=logit solution;
random intercept / subject=DISTR solution cl;
random intercept / subject=ACT solution cl;
random YEAR / subject=ID type=ar(1);
covtest / wald;
run;

 

It needs too much time and finally it doesn´t work.

 

Could you hel pe?

 

I apologize for my English.

 

Thanks,

 

Nerea

 

Respected Advisor
Posts: 2,655

Re: GLIMMIX for repeated measures

You may want to look at the marginal values over year, using an R side model.  Consider:

 

proc glimmix data=datos ;
class SIZE DIST ACT ID  YEAR;
model Y(event="1")= SIZE YEAR SIZE*YEAR/ cl dist=binary link=logit solution;
random intercept / subject=DISTR solution cl;
random intercept / subject=ACT solution cl;
random YEAR /residual subject=ID type=ar(1);
covtest / wald;
run;

You may need to add an NLOPTIONS statement to facilitate convergence.

 

Steve Denham

 

 

 

 

 

Ask a Question
Discussion stats
  • 1 reply
  • 90 views
  • 0 likes
  • 2 in conversation