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: -gmm- substitutable expression with an AR process
From
Daniel Borowczyk Martins <[email protected]>
To
[email protected]
Subject
st: -gmm- substitutable expression with an AR process
Date
Wed, 10 Aug 2011 15:55:13 +0100
Hello stata users,
I have a question regarding the use of -gmm-'s substitutable expression option.
Consider a 3 year time series data set, with monthly observations and
variables "y x year"
I want to run the following model " y = xb year2 year3" where year#
are year dummies.
I assume the residual is AR(1) with autoregressive parameter rho and
therefore take quasi-differences to the model.
x is assumed endogenous and I therefore use its own and y's second lag
as instruments.
I use stata's -gmm- to implement my estimation procedure.
tab year, gen(year)
local yd "year2 year3"
gmm (y - l.y - (1 - {rho})*{b0} - (x1*{b1} - l.x1*{rho}*{b1}) - ({xb:
`yd'} - {rho}*{xb: l.(`yd')})), instruments(`yd' l(1/2).(y x))
I get the following error message "xb already declared a linear combination".
I can get -gmm- to do what I want but it requires writing the model
expression without the xb option, which is a bit of a pain, esp. with
a higher order AR process.
gmm (y - l.y - (1-{rho})*{b0} - (x1*{b1} - l.x1*{rho}*{b1}) -
({tau2}*year2 + {tau3}*year3 - {rho}*{tau2}*l.year2 -
{rho}*{tau3}*l.year3)), instruments(`yd' l(1/2).(y x))
Is there anyway to use xb, or the moment evaluator expressions to do
what I want in a parse fashion?
Thanks in advance.
Daniel
*
* 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/