Hi,
I am trying to decide which model would best be suited for my study. I have two continuous variables A (independent) and B (response). We are measuring these for 20 hospitals for each month across the year 2020 - so each hospital has 12 values for each month for each variable. I am currently using proc genmod with the repeated statement to account for clustering within each hospital. Wondering what might be a good way to account for time in this case? Sharing my code below:
proc genmod data = dataset;
class hospid;
model B = A ;
repeated subject = hospid;
run;
You can specify your Month variable in the WITHIN= option in the REPEATED statement and then, if desired, use a correlation structure such as TYPE=AR that allow the correlation strength to diminish with time.
You can specify your Month variable in the WITHIN= option in the REPEATED statement and then, if desired, use a correlation structure such as TYPE=AR that allow the correlation strength to diminish with time.
What exactly do you want to estimate for A?
Depends on what you want to estimate, you might use the S option in the MODEL statement to get the slope estimate for A, or use the ESTIMATE statement. For example,
proc glimmix data = dataset;
class hospid month;
model B = A ;
random month / residual subject = hospid type=ar(1);
estimate 'response when A=5' int 1 A 5;
run;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.