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: margins, dydx for systems


From   Christopher Baum <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: margins, dydx for systems
Date   Mon, 12 Nov 2012 12:29:21 +0000

Dear tech support,

I am using Stata 12.1, fully updated, s/n  5012041613. Please see the code fragment below. I would like to test that the effect of mvalue1 in the first equation is equal to the effect of mvalue2 in the second equation, given the interaction term involving the latter. In example 14 of [R] margins, it illustrates how one can test that the predictive mean is equal across equations, but I want to test an expression involving the derivative, which in turn involves an interaction term. The below code does not work because expression is not a repeatable option. I know how to compute the average marginal effect 'by hand' from the second equation, but wondered whether the margins apparatus was capable of doing so itself, as it is in many other circumstances. 

webuse grunfeld,clear
keep if company<3
reshape wide invest mvalue kstock, i(year) j(company)
sureg (invest1 kstock1 mvalue1) (invest2 c.kstock2##c.mvalue2)
margins, dydx(_all) expression(predict(equation(invest1))) expression(predict(equation(invest2))) post

Thanks, and happy Veterans' Day! It is not a holiday where I work, but there were ceremonies over the weekend on campus.

Best wishes
Kit  

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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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