Statalist The Stata Listserver


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

Re: st: mixed models -- possibility to fix elements of the error ...


From   [email protected] (Roberto G. Gutierrez, StataCorp)
To   [email protected]
Subject   Re: st: mixed models -- possibility to fix elements of the error ...
Date   Tue, 12 Jun 2007 10:08:36 -0500

Jake Felson <[email protected]> asks:

> I'm wondering about whether Stata 9.0, or the upcoming Stata 10.0 allows the
> user to fix elements of the error variance matrix in the mixed model
> setting.  This is required for behavior genetic models described by Guang
> Guo (2002: behavior genetics).  Say, for example, with xtmixed or a related
> command, is it possible to do the following:
> Take the multi-level model:
> Yij = B0 + u_j + e_ij
> where Yij is the observed linear outcome for individual i in cluster j.
> Can this model be specified so as to deal with particular types of clusters,
> so that we could model:
> Yij(t) = B0 + u_j(t) + e_ij(t)
> where t indicates the type of genetic related ness within the clusters of
> individuals, e.g. MZ twin, DZ twin, full sibling, etc.
> The variance of e_ij would be allowed to vary by genetic relatedness (t)
> since "genetic theory expects the within-cluster variance for more
> genetically related clusters to be smaller."

In response, Anders Alexandersson <[email protected]> gives a reference
that appears to be very much on point.  I would only add that the key to
getting these types of heteroskedastic errors for discrete categories in
-xtmixed- is to define a level as the observartions themselves, and let random
coefficients on indicator variables represent "added variability" over a base
category, whose variance is represented by the residual standard error.

Suppose I have three "types", identified by indicator variables -type1-,
-type2- and -type3-.  Then, using Type 1 as the base category, I would
generate a level variable for the observations

    . gen obs = _n

and include the random-effects specification

    . xtmixed ... || <spec. for higher level> || obs: type2 type3, nocons

So that the variance components defined at the "obs" level by type2 and type3
represent added variability over type1, whose variability is represented by
the residual variance.

Of course, this requires knowing a priori which variance of three is smallest
and should thus be the base category, but Jacob seems to have an idea of which
one that would be for his model.  The worst that will happen if you pick the
wrong base category is that you'll estimate a variance component as zero, 
which indicates that you should pick another base category.

Jacob should feel free to email me privately if he'd like to discuss
specifics.

--Bobby
[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/



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