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: question about ivreg2
From
Christopher Baum <[email protected]>
To
Aida Paskeviciute <[email protected]>
Subject
st: Re: question about ivreg2
Date
Fri, 12 Nov 2010 10:49:52 -0500
<>
On Nov 12, 2010, at 10:23 AM, Aida Paskeviciute wrote:
> Dear Professor Baum,
>
> I am writing because I've been recently working with your -ivreg2- command, and was wondering if I could ask you a quick question about it. Is there a way to generate marginal effects with 95% confidence intervals after -ivreg2-? Unfortunately, neither -prvalue- or -prchange- seem to work, and I was wondering if there are any other alternatives to obtain confidence bands for predicted effects after these estimations.
>
> Thank you in advance for your help.
>
> With kind regards,
> Aida Paskeviciute
>
sysuse auto,clear
ivreg2 price length (mpg = weight turn)
margins, dydx(_all)
mata
b = st_matrix("r(b)")
se = sqrt(diagonal(st_matrix("r(V)")))'
dydxci = (b - 1.96 :* se \ b + 1.96 :* se)'
st_matrix("dydxci",dydxci)
end
mat li dydxci
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* 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/