BookmarkSubscribeRSS Feed
DIHS
Calcite | Level 5

Say you have families of individuals, within each family some individuals are reared on high food and others low. Size is measured for each individual. For each family the measurements for the two treatments come from different individuals. Essentially, I would like to treat the measurement for survival for each treatment as a different trait, and then look at the covariance parameters (with family as the subject) for the ‘different’ traits.

If this were data for two traits which could both be measured on the same individual the code would look something like:

proc glimmix data=mylib.mydata;

class family trait number;

model y=trait;

random trait / subject=family type = un;

random residual/ subject=number(family) type=un;

run;

Where y is the value of the trait and number is the id of the individual. My questions is, what would the code be when the traits are measured on different individuals?

Many thanks.

1 REPLY 1
SteveDenham
Jade | Level 19

I may be misunderstanding,but my first change would be in the first random statement:

random intercept/subject=family ;

If you have 10 families, then type=un means estimating 45 variance-covariance parameters.  Why not just estimate a variance component due to family?

How would the following work?

proc glimmix data=mylib.mydata;

class family trait number;

model y=trait;

random intercept / subject=family ;

random _residual_/ subject=number(family) group=trait;

run;

I would expect this to give me a variance component due to family, and fit a separate variance component for each trait at the individual level.  The only part I have trouble with is the overdispersion (random _residual_) calculated at the individual subject level with type=un, so I went with this simpler format.  If the data are rich enough (large enough sample size, with adequate variability), more complex approaches could be modeled.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 1282 views
  • 0 likes
  • 2 in conversation