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]

Re: st: Average marginal effects for a multiply imputed complex survey


From   icanette@stata.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Average marginal effects for a multiply imputed complex survey
Date   Mon, 15 Mar 2010 08:53:56 -0500

Elke <Elke.Luedemann@campus.lmu.de> had a question on how to combine average
marginal effects from multiply-imputed data:

> ...
>
> My question is: how can the estimates of the average marginal effects for
> several continuous and/or discrete independent variables (as well as their
> standard errors) be combined across the different imputed datasets?
>
> Similar questions have been asked to the Statalist before, but I was
> wondering whether either the new Stata 11 module MI (i.e., the mi estimate
> command) or the user-written commands mim/mim2 are capable of estimating
> these statistics.

To answer Elke's question, we need to consider the more general question of
how to combine results other than those stored in e(b) for multiply-imputed
data using -mi estimate-.  For some results, such as R2 or standardized
coefficients, the user-written command -mibeta- can be used to obtain the
combined estimates.  Also, the user-written -mim, category(combine)- can be
used to combine estimation results that come from a single command.  There
are, however, cases where you will need to write your own wrapper in order to
apply Rubin's rules to your results.  We will describe this general approach
and show how Elke can adopt it to combine the desired quantities.

Setting the issue of when Rubin's rules can be applied aside for a moment, we
focus on the technical details of using -mi estimate- for combining the
desired results.

The general idea is to write a wrapper command that will save the results to
e() in the way -mi estimate- expects them and then use this wrapper with 
-mi estimate:-.  The following Statalist post,

	http://www.stata.com/statalist/archive/2009-08/msg00479.html

describes what needs to be saved in e() for -mi estimate- to work with the
command; also see "Writing programs for use with -mi-" in [P] program
properties.  Often this amounts to simply re-posting the desired estimates to
e(b) and their VCE to e(V).

Elke would like to combine results produced by the -margins- command.
-margins- is an r-class command and, by default, -margins- saves estimates in
-r(b)- and VCEs in -r(V)-.  However, we can use -margins-'s -post- option to
save the estimates in -e(b)- and -e(V)-.  So our wrapper command, say,
-emargins-, may look like this:

/******* begin -emargins- *************/
  program emargins, eclass properties(mi)
	version 11
	args outcome
	svy: mlogit depvar var1 i.var2 var3 i.var4
	margins, vce(unconditional) dydx(*) predict(outcome(`outcome')) post
  end
/******** end -emargins- *************/

Then, Elke can use -mi estimate- on -mi- data as follows:

 forvalues j=1/3 {
	mi estimate: emargins `j'
 }

Notice that by specifying -properties(mi)- with -emargins-, we notified 
-mi estimate- that it is OK to call -emargins-.  Alternatively, if we did not
set the -mi- property we could have used the -cmdok- option with 
-mi estimate-:

  . mi estimate, cmdok: emargins ...

Returning to the issue of when Rubin's rules are applicable, the main
requirements are that the quantities of interest are 1) population parameters
or some functions of them that do not depend on sample size, sampling design,
etc., and 2) their corresponding complete-data estimators are asymptotically
normal.  See, for example, Rubin (1996) for more detail.

Average marginal effects satisfy assumptions 1) and also 2), provided the
sample size is large enough for 2) to hold.  Because marginal effects on the
probabilities of an outcome after -mlogit- are nonlinear quantities, a
sufficiently large sample size is needed for 2) to hold.  When normality is
not a reasonable assumption for the results to be combined, then a suitable
transformation should be used, such that the transformed data is approximately
normal.  The corresponding inverse transformation can be applied to the
combined results to obtain final results in the original metric.


Reference:

Rubin, D. B. 1996. Multiple imputation after 18+ years. Journal of the
American Statistical Association, 91: 473-489.


-- Isabel                       -- Yulia
icanette@stata.com              ymarchenko@stata.com
*
*   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