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 on April 23, and its replacement, is already up and running.

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

Re: st: Easy N-equation GMM syntax

From   Gulsum Akarsu <>
To   "" <>
Subject   Re: st: Easy N-equation GMM syntax
Date   Mon, 18 Feb 2013 04:05:22 -0800 (PST)


For OLS estimation, to repeat the estimation for all the countries one by one, I have used the following loop;

forvalues i = 1(1)29 { 
display "OLS regression for group " `i' 
regress y x1 x2 x3 x4 if countdum==`i'

But, first you need to generate a variable (here, countdum) that takes value 1 for the first country, 2 for the second country,...and so on.
Maybe, you can also use such a loop.


----- Original Message -----
From: "Whelan, Paul" <>
To: "<>" <>
Sent: Friday, February 15, 2013 3:49 PM
Subject: st: Easy N-equation GMM syntax


I would like to estimate N linear equations in a GMM framework in order
to test the significance of some subset of parameters across equations. i.e., 
on a country by country basis individually I would do:

by country: ivreg2 Y X1 X2, bw(12) kernel(bartlett) robust

If N = 2, I would create individual Y's and X's for each N=1,2 and do :

gmm (eq1: Y_1 - {alpha01} - {beta11}*X11 - {beta12}*X12}), ///
(eq2: Y_2 - {alpha02} - {beta21}*X21 - {beta22}*X22}), ///
instruments(eq1: X11 X12) ///
instruments(eq2: X21 X22) ///

However, if N = 20 ... what is the efficient way of doing this ?

Many thanks
*   For searches and help try:

*   For searches and help try:

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