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]

Re: st: -gmm- substitutable expression with an AR process


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: -gmm- substitutable expression with an AR process
Date   Fri, 12 Aug 2011 13:36:46 -0500

On Wed, Aug 10, 2011 at 9:55 AM, Daniel Borowczyk Martins
<[email protected]> wrote:
> 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".

Use a different equation name for the second xb term.

For example:

sysuse sp500,clear
tsset date
gmm (close-  {xb:volume high} - {xb2: low change}), instruments(l(1/3).vol)

Scott

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index