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]

st: RE: descriptive statistics of imputed data using by


From   "David Radwin" <[email protected]>
To   <[email protected]>
Subject   st: RE: descriptive statistics of imputed data using by
Date   Fri, 5 Apr 2013 11:18:30 -0700 (PDT)

Caitlin,

I can't speak to the imputation aspect, but the correct syntax for -mean-
over multiple subgroups is

mean mathf, over(pov_stat)

That may be the reason for the error message.

The -by- and -bysort- prefix is a separate method to execute -mean- and
other commands by subgroup, but the syntax is different. 

David
--
David Radwin
Senior Research Associate
MPR Associates, Inc.
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-849-4942
Fax: 510-849-0794

www.mprinc.com


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Caitlin Hamrock
> Sent: Friday, April 05, 2013 11:11 AM
> To: [email protected]
> Subject: st: descriptive statistics of imputed data using by
> 
> .
> Hello,
> I am trying to create a table of descriptive statistics using imputed
> data, however I want to calculate the mean math score (my dependent
> variable) by poverty level (an ordinal independent variable which is
> also imputed) across all of my imputed data sets collectively.  I've
> tried using the following code:
> 
> mi estimate: mean mathf, by pov_stat
> 
> Stata doesn't like this and gives me an error message.  Since the
> poverty status variable is imputed, an individual coded 1 in the first
> imputed data set might be coded 2 in the second.  So then I tried
> this:
> 
> mi xeq: by pov_stat, sort: sum mathf
> 
> This gives me the mean math scores by poverty status independently for
> each imputed data set (I have one original data set and five imputed
> copies and thus 6 sets of means).
> 
> I have two questions:
> First, Is there a stata command that can give me means and standard
> deviations by poverty status across all of my imputed data sets
> simultatneously?
> Second, is it incorrect to calculate the average of the mean math
> scores across all my imputed data sets (exluding the incomplete data
> set _mi_m=0)?  how about the standard deviations?
> 
> Thank you,
> Caitlin
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index