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]

Antwort: st: AW: a question on sample after xtabond command


From   Johannes Geyer <JGeyer@diw.de>
To   statalist@hsphsun2.harvard.edu
Subject   Antwort: st: AW: a question on sample after xtabond command
Date   Wed, 23 Jun 2010 15:16:14 +0200

Maybe that relates to my question, posted earlier 
http://www.stata.com/statalist/archive/2010-06/msg01229.html 

Now I have a guess why this happens, check the following:

****************************************
webuse abdata
xtabond n l(0/1).w l(0/1).(k ys) yr1980-yr1984, lags(2)
corr n  w if e(sample)
xtdpd l(0/2).n l(0/1).(w ys k) yr1980-yr1984, dgmmiv(n) div(l(0/1).(w ys 
k) yr1980-yr1984)
corr n  w if e(sample)
***************************************

1) both e(sample) agree on 751 observations
2) -xtabond- and -xtdpd- disagree about "number of obs" in the table: 751 
vs. 611
3) Arellano-Bond estimator takes first differences and thus loses the 
years 1976,1977 and(!) 1978 in our example because the equation includes a 
second lag of the left hand side variable
4) the estimation commands report the e(sample) of the starting equation 
and not of the first differenced equation
5) -xtabond- has an idea of thos observations used in the estimation and 
has the "correct" number of observations in its output table
6) shouldn't that be the standard e(sample) for these commands.

I tried -xtabond2- and found the same behaviour

Am I missing something?

Johannes



owner-statalist@hsphsun2.harvard.edu schrieb am 23/06/2010 14:37:47:

> 
> <> 
> 
> Looks like the number of groups and the number of obs reported add up to 
the
> count of -e(sample)-:
> 
> 
> *************
> webuse abdata, clear
> xtdes
> bys id: keep if _N==7
> xtabond n l(0/1).w l(0/2).(k ys) yr1980-yr1984, lags(2)
> cou if e(sample)
> *************
> 
> 
> 
> HTH
> Martin
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Le Manh Duc
> Gesendet: Mittwoch, 23. Juni 2010 14:28
> An: statalist@hsphsun2.harvard.edu
> Betreff: st: a question on sample after xtabond command
> 
> Hi all,
> 
> I ran a dynamic panel data model using xtabond command on a unbalanced
> panel. I got a result with 7395 obs of 1568 groups.
> 
> Now I want to produce a correlation table of the variable in my model
> using if e(sample). However, I get a correlation table with 9315 obs.
> Why the number of obs from e(sample) is different from the one I got
> before (7395 obs) ?
> 
> The command as below:
> 
> *****
> 
> xtabond tecdiv L.firmsize L.rdint L.adsint L.capint L.leverage
> L.current L.new_q north_america dyear1990-dyear2000 if year>=1989 &
> year<=2000, endogenous(Lpdiv, lag(1,.)) endogenous(Lpdiv_sq, lag(1,.))
> twostep vce(robust)
> 
> corr tecdiv L.firmsize L.rdint L.adsint L.capint L.leverage L.current
> L.new_q north_america dyear1990-dyear2000 Lpdiv Lpdiv_sq if e(sample)
> 
> *****
> 
> Could you give me some suggestion?
> 
> Regards,
> Duc
> *
> *   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/
> 
> 
> *
> *   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/


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