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.
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.
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.
Hi Steven
that is awesome!
i was looking into that and you confirmed all.
many thanks
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.