Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MrTh
Obsidian | Level 7

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
SteveDenham
Jade | Level 19

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.

 

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

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.

 

MrTh
Obsidian | Level 7

Hi Steven

that is awesome! 

i was looking into that and you confirmed all. 

many thanks

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 2 replies
  • 1180 views
  • 1 like
  • 2 in conversation