🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 09-01-2021 01:16 PM
(1179 views)
Hi all. this is a general question i'm afraid. I have data that repeat over time for each individuals and I want to compute a repeatability coefficient as r = variance within individual / (variance within individual + variance across individuals). Is there a way to get those parameters with SAS proc mixed? Thanks.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You might try:
proc mixed data=have;
class time subjid;
model response = time;
random time/subject=subjid <if you want to structure the relationship over time you would insert a type= here> solution;
ods output covparms=covparms;
run;
data covparms2;
set covparms;
totalvar=estimate+lag(estimate);
repeatability=lag(estimate)/(estimate + lag(estimate));
run;
it is actually quite a bit harder to do using a REPEATED statement, but this should get you started.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You might try:
proc mixed data=have;
class time subjid;
model response = time;
random time/subject=subjid <if you want to structure the relationship over time you would insert a type= here> solution;
ods output covparms=covparms;
run;
data covparms2;
set covparms;
totalvar=estimate+lag(estimate);
repeatability=lag(estimate)/(estimate + lag(estimate));
run;
it is actually quite a bit harder to do using a REPEATED statement, but this should get you started.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steven
that is awesome!
i was looking into that and you confirmed all.
many thanks