Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: xtmixed: How replicate a SAS example in Stata11


From   Amado David Quezada Sanchez <amado.quezada@correo.insp.mx>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: xtmixed: How replicate a SAS example in Stata11
Date   Fri, 12 Feb 2010 19:14:50 -0600

Dear statalisters,

I have been using xtmixed to replicate some examples from
Fitzmaurice/Laird/Ware book "Applied Logitudinal Analysis" 

Those examples require a specified covariance. I have had 
no problem with unstructured and with ar(1) covariance
structures. For example, in order to replicate the following
SAS code

PROC MIXED;
 CLASS id group time;
 MODEL y=group time group*time/S CHISQ;
 REPEATED time/TYPE=UN SUBJECT=id R RCORR;

I executed this in Stata 11:

xi: xtmixed y i.gpo*i.t || id:, nocons var residuals(unstructured, t(t))

I obtained the very same results as the book. Now I'm trying
to replicate an example for which an exponential covariance
structure has to be specified:

PROC MIXED;
 CLASS id group time;
 MODEL y=group time group*time/S CHISQ;
 REPEATED time/TYPE=SP(EXP)(ctime) SUBJECT=id R RCORR;

Where ctime is a copy from the variable time. As the authors say, 
this variable is used to construct "distances" or time separation 
between repeated measures. 

How could I fit this in Stata11? 


For the exponential covariance model, we have:

Corr(Yj,Yk)=rho?(tj-tk)	   

That is, correlation between responses depend on time separation. The feature that distinguishes an exponential covariance model from the autoregressive one is its
ability to be used with unequally spaced responses. In this example we have that
characteristic since time=0,4,6,8,12.

This structure can be expressed so it includes an exponential component, that's
the reason for its name.

Thank you,
Dave Q.

 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index