Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: specifying linear mixed-effects covariance structure


From   David Airey <[email protected]>
To   [email protected]
Subject   Re: st: specifying linear mixed-effects covariance structure
Date   Fri, 19 Oct 2007 07:45:17 -0500

There is not the wide array of covariance structures available in Stata xtmixed as in SAS Proc Mixed. But your documentation should make this clear. There are four currently available:

vartype description
------------------------------------------------------------------------ ---------------
independent one variance parameter per random effect, all covariances
zero; the default unless a factor variable is specified
exchangeable equal variances for random effects, and one common pairwise
covariance
identity equal variances for random effects, all covariances zero; the
default for factor variables
unstructured all variances-covariances distinctly estimated
------------------------------------------------------------------------ ---------------

You can combine these, but I don't see how useful that is. Stata Corp did say more can be expected, but I think they made categorical dependent variable mixed models a priority.

-Dave


On Oct 18, 2007, at 4:05 PM, jwegelin wrote:


The purpose of this email is to enquire regarding the capabilities of
Stata for specifying the covariance structure in linear mixed-effects
models. The email starts with a fairly detailed description of the
problem and a sketch of how one approaches it in SAS. We end with a set
of questions regarding Stata, marked by asterisks *********.

The bottom line is, "Can I do this all in Stata, or do I need to use SAS
for such analyses?"

EXPOSITION / PROBLEM DESCRIPTION.

Suppose you have a longitudinal outcome (K repeated measures on N units)
and are fitting a linear mixed-effects model. Suppose you have specified
random intercepts and random slopes.

For instance, in Stata this might look like

xi: xtmixed Size i.Tribe*Day || Mouse: Day, cov(un)

where Tribe is dichotomous ("case" or "control"), Day goes from zero to
ten, and each Mouse, belonging to one of the Tribes, is measured each
day. You want to know whether the growth patterns differ between Tribes.

(1) One might consider the possibility of autocorrelation of residuals
within unit (within Mouse) over time, for instance an AR(1)
autoregressive model; or one might want to try conjugate symmetry as
another alternative to independence of the within-Mouse residuals.

In SAS PROC MIXED it is possible to specify AR(1), exchangeable,
conjugate symmetry and other kinds of variances of the within-Mouse
residuals under the REPEATED statement, TYPE=AR(1), etc.

(2) One might suspect---e.g., from initial exploratory graphics---that
the variance of the "case" Tribe exceeds that of the "control" Tribe.
Furthermore, one might be curious whether this difference in variance is
in the intercept and slope random effects only, in the residuals only,
or in both.

In SAS PROC MIXED one can allow different variances of the random slopes
and intercepts in the two Tribes by saying "GROUP=TRIBE" under the
RANDOM statement.

Separately, one can allow different variances of the within-Mouse
residuals by saying the same thing under the REPEATED statement.

(3) Further, one can separately specify the covariance structures of the
between-mouse random effects (the slope and intercept random effects) on
one hand and the within-mouse residuals on the other hand.

When I used SAS, I specified unrestricted ("unstructured" in SAS- speak)
covariance of the slopes and intercepts within each Tribe. This used
three degrees of freedom per Tribe and permitted the random Mouse
intercept to be correlated with the random Mouse slope. But I specified
a much more restricted structure for the within-mouse residuals, since
that matrix is 10 by 10.

**************************
QUESTIONS REGARDING STATA:

Am I correct in believing that there is no procedure or option in Stata
by which one can readily do either of (1) or (2) described above?

If this is correct, are there any plans, either in Stata proper or among
people making well-documented add-ons (see for instance the work of
Rabe-Hesketh), to add these features?

In current xtmixed, we can specify the between-Mouse variance of
the random effects as "independent", "exchangeable", "identity" or
"unstructured". (See http://www.stata.com/help.cgi?xtmixed for lucid
definitions.) Regarding the within-Mouse residual variance, am I correct
in guessing that it is always specified as "identity" when one runs xtmixed?

In Stata, the xtreg procedure allows us to specify the within-group
(within-Mouse) correlation structure as autoregressive, exchangeable, or
conjugate symmetry, but only with the "pa" (population average) option,
I believe. One does this with the "corr" option. But I think there is no
"corr" option in xtmixed. Furthermore, I think that one can only specify
random intercepts, not other random effects, under xtreg.

Thanks in advance for any information or correction.

Jacob A. Wegelin
Assistant Professor
Department of Biostatistics
Virginia Commonwealth University
730 East Broad Street Room 3006
P. O. Box 980032
Richmond VA 23298-0032
U.S.A.
http://www.people.vcu.edu/~jwegelin
[email protected]


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
--
David C. Airey, Ph.D.
Pharmacology Research Assistant Professor
Center for Human Genetics Research Member

Department of Pharmacology
School of Medicine
Vanderbilt University
Rm 8158A Bldg MR3
465 21st Avenue South
Nashville, TN 37232-8548

TEL   (615) 936-1510
FAX   (615) 936-3747
EMAIL [email protected]
URL   http://people.vanderbilt.edu/~david.c.airey/dca_cv.pdf
URL   http://www.vanderbilt.edu/pharmacology


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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