Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   Justina Kamiel Grayman <[email protected]>
To   [email protected], [email protected]
Subject   Re: st: Using mi estimate with xtmixed and accounting for sampling weights
Date   Mon, 23 Jul 2012 09:01:41 -0400

Hi everyone (and Stas),

It seems as though it should be possible to use weights in xtmixed AND
use the "mi estimate" command. There is even syntax to do so and I
have not read any official STATA documents saying that you cannot do
this. I think it is a syntax error unless someone can explain to me
why exactly I wouldn't be able to use "mi estimate" with an xtmixed
command that uses pweights. Can anyone explain?

Thanks,
Justina



On Sat, Jul 14, 2012 at 2:49 PM, Stas Kolenikov <[email protected]> wrote:
> To do this statistically properly, you need to follow Shao & Sitter
> (1996; http://www.citeulike.org/user/ctacmo/article/1269394). Namely:
>
> 1. pull a bootstrap sample;
> 2. run the imputation procedure once on the imputed sample;
> 3. compute the point estimates of interest;
> 4. repeat 1-3 a large number of times (bootstrap-large, hundreds, not
> the MI-large, which is five)
> 5. combine the results using the bootstrap rules: point estimate =
> average of the results, variance estimate = variance over the
> bootstrap samples.
>
> 1-3 require a custom-written estimation command, but it should not be
> too difficult to compose.
>
> On Fri, Jul 13, 2012 at 1:35 PM, Justina Kamiel Grayman
> <[email protected]> wrote:
>> 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/
>
>
>
> --
> ---- Stas Kolenikov
> -- http://stas.kolenikov.name
> ---- Senior Survey Statistician, Abt SRBI
> -- Opinions stated in this email are mine only, and do not reflect the
> position of my employer
> *
> *   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/

-- 
Justina Kamiel Grayman
Doctoral Student, Psychology & Social Intervention
New York University

"...The Earth was flat if you went too far you would fall off
Now the Earth is round if the shape change again everybody woulda start laugh
The average man can’t prove of most of the things that he chooses to speak of
And still won’t research and find out the root of the truth that you seek of
Scholars teach in Universities and claim that they’re smart and cunning
Tell them find a cure when we sneeze and that’s when their nose start running"

- Nas/Damian Marley, Patience

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