Programming the statistical procedures from SAS

GLIMMIX repeated measures - observations per subject issue

Reply
New Contributor
Posts: 2

GLIMMIX repeated measures - observations per subject issue

[ Edited ]

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!

Respected Advisor
Posts: 2,655

Re: GLIMMIX repeated measures - observations per subject issue

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

Valued Guide
Valued Guide
Posts: 679

Re: GLIMMIX repeated measures - observations per subject issue

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.

Ask a Question
Discussion stats
  • 2 replies
  • 173 views
  • 2 likes
  • 3 in conversation