turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- GLIMMIX repeated measures - observations per subje...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-25-2016 11:59 AM - edited 07-25-2016 12:00 PM

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:

homsite | genotype | ind | tag | block | visit | survival |

HF | 1 | 3 | 563 | 4 | 1 | 1 |

HF | 1 | 4 | 381 | 2 | 1 | 1 |

HF | 1 | 5 | 6 | 1 | 1 | 1 |

HF | 1 | 7 | 195 | 3 | 1 | 1 |

HF | 104 | 2 | 231 | 3 | 1 | 1 |

HF | 104 | 3 | 578 | 4 | 1 | 1 |

HF | 104 | 7 | 61 | 1 | 1 | 1 |

HF | 104 | 8 | 444 | 2 | 1 | 1 |

HF | 105 | 3 | 584 | 4 | 1 | 1 |

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.

| |

| 3 |

| 1 |

| 15 |

| 168 |

| 1 |

| 6512 |

thank you for any help!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-24-2016 07:36 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-24-2016 09:20 AM

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.