Statalist


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

st: Re: nested xtmixed variance component model syntax


From   "Steve" <[email protected]>
To   <[email protected]>
Subject   st: Re: nested xtmixed variance component model syntax
Date   Wed, 28 Jan 2009 03:22:54 -0600

Simple is always better. Best to tackle new projects first thing in the morning instead of late at night.

Thanks for opening my eyes, Joseph.

Steve Rothenberg

Date: Wed, 28 Jan 2009 12:03:55 +0900
From: "Joseph Coveney" <[email protected]>
Subject: st: Re: nested xtmixed variance component model syntax

- --------------------------------------------------------------------------------

Steve Rothenberg wrote (excerpted):

I am trying to model these data:

DepVar = weight
fixed IndVars:
time
geolocation
treatment

I observe the weight of subjects given 1 of 4 different fractions of a
complex contaminant (control [saline], soluble, insoluble and total).  This
variable is called treatment.  The contaminant was taken from three
different geographical locations (variable: geolocation).  The subjects are
observed over two different time periods before weighing, each subject
belonging to one or the other time periods (variable: time).

The design assigns four subjects to the control treatment condition of each
geolocation and time and six subjects to each other
treatment-geolocation-time condition.

As I see it, I have subjects nested within treatment, treatment nested
within geolocation and geolocation nested within time.  There are no
repeated measurements on subjects.

[excerpted]  I keep running
into non-convergence problems with my various formulations of the random
effects.

[remainder redacted]

- --------------------------------------------------------------------------------

If each animal is observed at only one of the two time periods, then this is a
factorial ANOVA:  all of the factors are crossed, and there's a single error
term, the residual.  Each animal is is assigned at random only once to each
combination of factors:  treatment group, time group and geographic location
group.

First, balance your design by assigining an equal number of animals to each
cell (combination of predictors), and then use -anova- (or -regress-).

anova weight treatment time treatment*time geolocation ///
 treatment*geolocation time*geolocation treatment*time*geolocation

Joseph Coveney


*
*   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/



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