BookmarkSubscribeRSS Feed
LizfromPurdue
Calcite | Level 5

I'm running a repeated measures analysis in proc glimmix, but the analysis keeps is incorrectly assigning the number of observations per subject. 

 

The experiment measured survival of individual blocks from four different geographic locations that were all grown in one location. I measured whether an individual plant was still alive (survival 1, 0 dead) every week over the summer until all plants died naturally. 

Factors: 

 Home site - geographic locations a plant is from (fixed effect)

 Block - one of four locations at the site an individual was grown at (random effect)

 Genotype - family that a seed came from (family structure) - (random effect)

 Visit - week 1 through 11 that I took a census of each plant (random repeated measure effect)

 Tag - unique id for each individual plant

 

This is a sample of the data:

homsitegenotypeindtagblockvisitsurvival
HF13563411
HF14381211
HF156111
HF17195311
HF1042231311
HF1043578411
HF104761111
HF1048444211
HF1053584411

 

 PROC GLIMMIX  data = survival;

CLASS homesite genotype block visit tag;

MODEL survival(event='1') = homesite /dist=binary ddfm = kr;

RANDOM genotype(homesite) block homesite*block;

RANDOM visit/subject=tag type=vc residual;

RUN;

QUIT;

 

When I run the above code and include a random statement for the repeated measures factor of visit with tag as the subject, the output shows that proc glimmix is only registering one subject which has 6512 observations. There should be 11 observations per 592 subjects. Furthermore the random effects (covariance parameters) do not have any significance level only estimates/se. 

 

Dimensions

G-side Cov. Parameters

3

R-side Cov. Parameters

1

Columns in X

15

Columns in Z

168

Subjects (Blocks in V)

1

Max Obs per Subject

6512

 

 

thank you for any help!

2 REPLIES 2
SteveDenham
Jade | Level 19

I am going to start with the last problem first and work back from there.

 

Furthermore the random effects (covariance parameters) do not have any significance level only estimates/se. 

 

If you wanted to, you could create asymptotic tests from the estimates and standard errors.  I would strongly recommend against doing so, as you have no evidence that the estimates come from a normal, or even asymptotically normal, distribution.  This is one of the reasons that the p values were removed as default output for the covariance parameters in PROC MIXED.

 

When I run the above code and include a random statement for the repeated measures factor of visit with tag as the subject, the output shows that proc glimmix is only registering one subject which has 6512 observations. There should be 11 observations per 592 subjects.

 

Look at the degrees of freedom associated with the fixed effect parameter estimates and least squares means to get an idea of how many observations are being attributed.  The output presented merely indicates that you have not included visit and homesite*visit as fixed effects in the model, which they are if they are modeled with the residual option in the RANDOM statement.

 

Try including those effects in the MODEL statement and see what happens to Max Obs. you might also get something that looks like what you expect if you changed the subject= to subject=tag*block*homesite.

 

Steve Denham

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Just to add to Steve's comments....  You have two random statements, but only the second one (for residual) is written with explicit subject= syntax. Thus, for the overall model fit, observations are not processed by subject, because there is no unique (single) subject designation (there are, implicitly, different levels of subjects). In the output table under these circumstances, you get the number of subjects you mentioned. But your results should be correct.

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
  • 2 replies
  • 1350 views
  • 2 likes
  • 3 in conversation