[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Jeph Herrin <junk@spandrel.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: specifying random effects in -xtmixed- for pretest/posttest clustered design |

Date |
Thu, 02 Apr 2009 20:07:12 -0400 |

Try, xtmixed y cond t tc || g: cond t tc this tells -xtmixed- to estimate random effects across group for cond, t, and tc. I don't know what murray means by including M as a random effect (and don't feel like pulling his book off the shelf to check), but I'm pretty sure you don't want that unless you have multiple records per person per time point. hth, Jeph Michael I. Lichter wrote:

I am having difficulties figuring out how to specify the random effectsin -xtmixed- for my study design, and I haven't been able to findanything helpful in the archives or the manual.My study is a standard cluster-randomized, two-condition, two-time-pointtrial with balanced allocation of clusters to conditions and onlymoderate variation in cluster size, with no stratification, crossing,matching, or anything else. Suppose I have one record per time point perperson with variables:c - study condition (control or intervention) t - time point (pretest or post-test) m - ID # for individual enrolled in trial g - group # y - study resultI am taking my guidance from David Murray's DESIGN AND ANALYSIS OFGROUP-RANDOMIZED TRIALS and trying to follow his example for what hecalls an "unadjusted time x condition analysis" for "nested cohortdesigns" (pp. 296-311). The model, with subscripts omitted, looks likethis: Y = mu + c + t + tc + G + M + TG + MT + e, where mu is the grandmean, tc is the interaction effect t*c (same for TG and MT), and G, M,TG, and MT are random effects.Is any of these correct given the model?xtmixed y cond t tc || G: || M: || TG: || MT: xtmixed y cond t tc || G:TG || M: MT xtmixed y cond t tc || G: M TG MTNone of the above converge successfully with my data, but that doesn'tmean they're all wrong ... Obviously, I'm unclear on how thespecification of random effects works.FWIW, Murray provides the following SAS code (with my variable names;and "ddf = 4,4,4" is for a specific example):proc mixed info order=internal noclprint; class C G M T; model Y = C T C*T /ddf = 4,4,4 ddfm = res; repeated T /type = cs subject = M(G*C) r = 1 to 3 rcorr = 1 to 3; random G(C) TG(C); lsmeans C*T /slice=C slice=T c1 e; estimate `(I3 - I0)-(C3-C0)' C*T 1 -1 -1 1/cl e; run;I can run this in SAS, but the value of doing so is diminished by thefact that Murray's commands and annotations are about 10 years out ofdate; I'd rather do it in Stata if possible.Thanks.

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: specifying random effects in -xtmixed- for pretest/posttest clustered design***From:*"Michael I. Lichter" <mlichter@buffalo.edu>

**References**:**st: specifying random effects in -xtmixed- for pretest/posttest clustered design***From:*"Michael I. Lichter" <mlichter@buffalo.edu>

- Prev by Date:
**Re: st: Re: add results of lincom postestimation command to a table using outreg2** - Next by Date:
**Re: st: Re: using "keep if"** - Previous by thread:
**st: specifying random effects in -xtmixed- for pretest/posttest clustered design** - Next by thread:
**Re: st: specifying random effects in -xtmixed- for pretest/posttest clustered design** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |