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, is already up and running.

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

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

From   Scott Merryman <>
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
<> 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)


*   For searches and help try:

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