Programming the statistical procedures from SAS

Using glimmix to estimate covariance parameters for two variables when measurements are taken from different individuals

Reply
Occasional Contributor
Posts: 6

Using glimmix to estimate covariance parameters for two variables when measurements are taken from different individuals

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.

Respected Advisor
Posts: 2,655

Re: Using glimmix to estimate covariance parameters for two variables when measurements are taken from different individuals

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

Ask a Question
Discussion stats
  • 1 reply
  • 222 views
  • 0 likes
  • 2 in conversation