BookmarkSubscribeRSS Feed
nerea10
Calcite | Level 5

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

 

1 REPLY 1
SteveDenham
Jade | Level 19

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

 

 

 

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1094 views
  • 0 likes
  • 2 in conversation