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: average marginal effect with multiple imputed datasets after IVPROBIT
From
Alex Lexus <[email protected]>
To
[email protected]
Subject
st: average marginal effect with multiple imputed datasets after IVPROBIT
Date
Wed, 8 Dec 2010 14:23:12 +0000
Dear All,
I am fitting an IVPROBIT to multiple imputed data. I have 5 imputed
datasets and my command line is the following:
xi: mi estimate, cmdok esampvaryok : ivprobit y i.var1 var2 var 3
(var4 =var5 ) , first ro cl(hhintid)
Following your advice about emargins I wrote:
/******* begin -emargins- *************/
program emargins, eclass properties(mi)
version 11
args outcome
ivprobit y i.var1 var2 var 3 (var4 =var5 ) , first ro cl(hhintid)
margins, vce(unconditional) dydx(*) predict(outcome(`outcome')) post
end
/******** end -emargins- *************/
forvalues j=1/5 {
mi estimate, cmdok: emargins `j'
}
But I get an error:
equation 1 not found
an error occurred when mi estimate executed emargins on m=1
Any advice on how to compute average marginal effects after
instrumental variable probit models and how to write the correct
syntax for it?
Thanks in advance,
Alex
*
* 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/