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: RE: re: 3sls and fixed effects


From   Clive Nicholas <clivelists@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: re: 3sls and fixed effects
Date   Sat, 16 Oct 2010 19:19:56 +0100

Biljana Dlab wrote:

> That example works for me as well.
>
> Have stata 10.
>
> I have some lagged values in regression - could that be the problem?
>
> This is what I have & get:
>
>
> . xi: reg3 (DeltaDebt CashFlow dQ size DeltaCashHold debt_lag1 i.gvkey_n
> i.fyear) (DeltaCashHold CashFlow dQ size DeltaDebt cashhold_lag2
> i.gvkey_n i.fyear), endog(DeltaDebt DeltaCashHold)
>
> i.gvkey_n         _Igvkey_n_1017-103307(naturally coded; _Igvkey_n_1017
> omitted)
> i.fyear           _Ifyear_1971-2001   (naturally coded; _Ifyear_1971
> omitted)

Sorry, but your posts are starting to get vexatious.

***************************************************************************************************
Please run -sysuse auto-, -webuse grunfeld- or some other example
dataset available
via Stata to check your code before posting your question to the list!
***************************************************************************************************

If you'd read any of our previous posts, you would surely have known
this would work:

. xi: reg3 (invest l.invest mvalue kstock i.company) (kstock l.kstock
time i.company), endog(invest kstock)
i.company         _Icompany_1-10      (naturally coded; _Icompany_1 omitted)

Three-stage least-squares regression
----------------------------------------------------------------------
Equation          Obs  Parms        RMSE    "R-sq"       chi2        P
----------------------------------------------------------------------
invest            190     12    38.47947    0.9694    6053.14   0.0000
kstock            190     11    41.45475    0.9814   10004.66   0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
invest       |
      invest |
         L1. |   .7060392   .0584213    12.09   0.000     .5915356    .8205428
      mvalue |   .1018234   .0091482    11.13   0.000     .0838932    .1197536
      kstock |   .1085806   .0219963     4.94   0.000     .0654686    .1516926
 _Icompany_2 |   191.0379   24.16269     7.91   0.000     143.6799    238.3959
 _Icompany_3 |   85.41543   31.36261     2.72   0.006     23.94584     146.885
 _Icompany_4 |   240.5187    36.9807     6.50   0.000     168.0378    312.9995
 _Icompany_5 |   236.9491   44.54761     5.32   0.000     149.6374    324.2609
 _Icompany_6 |   260.7295   39.51204     6.60   0.000     183.2873    338.1717
 _Icompany_7 |   261.4689   43.66928     5.99   0.000     175.8787    347.0591
 _Icompany_8 |   229.9195   37.68334     6.10   0.000     156.0615    303.7775
 _Icompany_9 |   241.5072   42.23223     5.72   0.000     158.7335    324.2808
_Icompany_10 |   288.5765   42.38755     6.81   0.000     205.4985    371.6546
       _cons |  -295.4404   42.01234    -7.03   0.000     -377.783   -213.0977
-------------+----------------------------------------------------------------
kstock       |
      kstock |
         L1. |   1.164028   .0207343    56.14   0.000     1.123389    1.204666
        time |  -1.369257   .7488219    -1.83   0.067    -2.836921    .0984072
 _Icompany_2 |  -36.99928   14.73424    -2.51   0.012    -65.87787   -8.120697
 _Icompany_3 |  -44.06792   14.01972    -3.14   0.002    -71.54607   -16.58977
 _Icompany_4 |   -20.3549   16.48295    -1.23   0.217    -52.66089    11.95109
 _Icompany_5 |  -68.66219   13.59364    -5.05   0.000    -95.30522   -42.01915
 _Icompany_6 |  -28.01087   16.58642    -1.69   0.091    -60.51967    4.497921
 _Icompany_7 |  -52.61446   14.49528    -3.63   0.000    -81.02469   -24.20424
 _Icompany_8 |  -26.08811   16.81131    -1.55   0.121    -59.03767    6.861449
 _Icompany_9 |  -55.57685   14.61953    -3.80   0.000     -84.2306   -26.92309
_Icompany_10 |  -24.67148   17.76636    -1.39   0.165    -59.49289    10.14994
       _cons |   39.34851   12.81644     3.07   0.002     14.22875    64.46828
------------------------------------------------------------------------------
Endogenous variables:  invest kstock
Exogenous variables:   L.invest mvalue _Icompany_2 _Icompany_3 _Icompany_4
     _Icompany_5 _Icompany_6 _Icompany_7 _Icompany_8 _Icompany_9
     _Icompany_10 L.kstock time
------------------------------------------------------------------------------

So, in answer to your question: there are _no_ problems in running
lagged variables in -reg3- (why would there be?). Again, output from
my Stata 9.2.

-- 
Clive Nicholas

[Please DO NOT mail me personally here, but at
<clivenicholas@hotmail.com>. Please respond to contributions I make in
a list thread here. Thanks!]

"My colleagues in the social sciences talk a great deal about
methodology. I prefer to call it style." -- Freeman J. Dyson.

*
*   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