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 at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re:st: is it possible to write explicit equation, GMM estimation with constraints ??


From   Christopher Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   re:st: is it possible to write explicit equation, GMM estimation with constraints ??
Date   Wed, 17 Mar 2010 14:12:03 -0400

<>
Halit said

Is there any way to write down explicit equation for GMM estimation in
Stata10? The equation I like to estimate has constraints in it so I couldn't
really figure out how to run this using GMM or LIML (limited information
max. likelihood). I specifically wanted to GMM estimate the following
equation (it's a version of IS curve):
x{t}=alpha*E{t}(x{t+1})-delta*[r-E{t}(pi{t+1})]
Where alpha and delta are coefficients, X{t} is output gap measure at time
t, r is nominal interest rate, E{t}(pi{t+1}) is expectation of future
inflation rate in t+1. I am assuming rational expectations so expectational
terms can be dropped and future values can be substituted in with future
error terms which then makes r the only exogenous variable, expectational
variables are endogenous. I want to use 4 lagged output gap and inflation
variables as instruments to consistently estimate the expectational
variables' coefficients. Here is what I have difficulty in doing in Stata10:
---Note that the second expectational term and r has the same coefficient,
how do I tell Stata10 to recognize that?
---Is there any way to tell Stata10 to explicitly write down to equation I
like to estimate?
---can I do summation or subtraction in the instrument list that I specified
in stata10 inside the parenthesis? 
 
I tried running:
ivreg28 x{t} ( x{t+1} r-pi{t+1} = ( L2.x{t+1} L3.x{t+1} L4.x{t+1} L1.pi{t+1}
L2.pi{t+1} L3.pi{t+1} L4.pi{t+1} ), liml (which gives a syntax error)
ivreg28 x{t} r ( x{t+1} pi{t+1} = ( L2.x{t+1} L3.x{t+1} L4.x{t+1} L1.pi{t+1}
L2.pi{t+1} L3.pi{t+1} L4.pi{t+1} ), liml (which runs well but then
coefficients for r and pi{t+1} are different.)
 

First of all if you are using Stata 10 there is no reason to use ivreg28. Download and use up-to-date ivreg2.  I don't understand what you are doing
with all those curly braces {t}, as they are not acceptable syntax in Stata. Also, if you want to talk about a future value, use the F. time series operator.

Second, the constraint is merely that the coefficient on r (exog) equal the coeff on future pi (endog). That is a linear restriction which you can just impose in the estimation. You might want to test its validity by estimating them separately and testing for equal and opposite signed values.

I believe the following will do something very similar to what you're thinking of, employing 2-step IV-GMM with HAC standard errors.

--------------------
use http://fmwww.bc.edu/ec-p/data/wooldridge/phillips, clear
su
tsset year
g r = 5 in 1
replace r = 5 +0.9 * L.r + rnormal(0,0.01) in 2/l
// create interest rate net of inflation
g realr = r - F.inf
// use unem instead of output gap
ivreg2 unem (F.unem realr = L(1/4).(unem inf)), noco gmm2s robust bw(4)
--------------------

And no, you cannot do arithmetic nor apply functions in a varlist. Create the variables first with generate, replace or egen.


Kit Baum   |   Boston College Economics and 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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index