- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
class hospid month;
model B = A ;
random month / residual subject = hospid type=ar(1);
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;