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 on April 23, and its replacement, statalist.org is already up and running.


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

st: Using mi estimate with xtmixed and accounting for sampling weights


From   Justina Kamiel Grayman <justina.grayman@nyu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Using mi estimate with xtmixed and accounting for sampling weights
Date   Fri, 13 Jul 2012 14:35:07 -0400

Hi everyone,

I am attempting to estimate a two-level model with a random intercept.
I am using xtmixed. My data was also imputed, using MI ICE. I now have
10 imputed datasets. Lastly, I am trying to include sampling weights
at both levels of the model. So basically I need to include sampling
weights in a two-level model estimated on imputed data.

The problem: When I perform the analysis (syntax below), it runs fine
on the original data.  It also runs when I use an if statement to run
the analysis on only one of the imputed datasets. However, when I try
to use mi estimate as a prefix, the model does not run. Is there some
incompatibility between mi estimate and using pweights in xtmixed?
Does anyone know why this is occurring?

Thanks!


Syntax That Does Not Work:

mi estimate: ///
xtmixed studeff ///
classclimmeanc classclimvarc ///
pctnonwhitec ///
educc female usborn ///
black latino asian other multi ///
btgtaugc wrkshpcntc someba  ///
bcna9c urban rural northeast southeast west privateschl [pw = totwgt] ///
|| idschool: , covariance(unstructured) pweight(schwgt) , mle pwscale(size)


Syntax That Does Work

xtmixed studeff ///
classclimmeanc classclimvarc ///
pctnonwhitec ///
educc female usborn ///
black latino asian other multi ///
btgtaugc wrkshpcntc someba  ///
bcna9c urban rural northeast southeast west privateschl [pw = totwgt] ///
if  _mi_m==1 ///
|| idschool:  , covariance(unstructured) pweight(schwgt) , mle pwscale(size)
--
Justina Kamiel Grayman
Doctoral Student, Psychology & Social Intervention
New York University
*
*   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