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: Subgroup mean imputation
From
Barbara Romano <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Subgroup mean imputation
Date
Sat, 16 Nov 2013 09:01:59 +0100
Thanks Fernando,
unfortunately it’s not working. I’m stuck with my missing .
I never used looping, but do you think a loop could be a solution?
Something that says stata for each missing in the variable classmean impute the value of classmean of another observation with the same classroom_id…
Thanks again
Barbara
Il giorno 15/nov/2013, alle ore 16:11, Fernando Rios Avila <[email protected]> ha scritto:
> What I usually do is to add the following command to what you already have:
> egen classmean_imputed = max(classmean), by(CODICE_CLASSE)
> HTH.
> Fernando
>
> On Fri, Nov 15, 2013 at 10:02 AM, Barbara Romano <[email protected]> wrote:
>> Dear all,
>> I’d like to contrast the results I get the mi imputation and the old fashioned mean imputation.
>> I’ve a huge dataset of student test scores with a variable for classroom id.
>>
>> I used the egen command to create the subgroup mean for each classroom
>> egen classmean = mean(score), by(CODICE_CLASSE)
>>
>> this create for each student with the same classroom code, BUT for the the students with a missing value for the score.
>> I’d like to impute that classroom subgroup mean for the “missing students”.
>> What should I do?
>> Thank you very much
>> Barbara
>>
>>
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>> * http://www.ats.ucla.edu/stat/stata/
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/