Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: DV trap


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: DV trap
Date   Thu, 9 Jun 2005 08:45:22 -0400

I don't see what unbalanced panels have to do with generating a set of dummies that add up to one. The dummy means _in the sample_ of an unbalanced panel will sum up to 1.0, even though they do not represent 100% of a balanced panel:

. webuse grunfeld,clear

. tsset
panel variable: company, 1 to 10
time variable: year, 1935 to 1954
. drop in 14
(1 observation deleted)

. drop in 29
(1 observation deleted)

. drop in 101
(1 observation deleted)

. xtdes

company: 1, 2, ..., 10 n = 10
year: 1935, 1936, ..., 1954 T = 20
Delta(year) = 1; (1954-1935)+1 = 20
(company*year uniquely identifies each observation)

Distribution of T_i: min 5% 25% 50% 75% 95% max
19 19 19 20 20 20 20

Freq. Percent Cum. | Pattern
---------------------------+----------------------
7 70.00 70.00 | 11111111111111111111
1 10.00 80.00 | 11.11111111111111111
1 10.00 90.00 | 111111111.1111111111
1 10.00 100.00 | 1111111111111.111111
---------------------------+----------------------
10 100.00 | XXXXXXXXXXXXXXXXXXXX

. tab year,gen(Y)

year | Freq. Percent Cum.
------------+-----------------------------------
1935 | 10 5.08 5.08
1936 | 10 5.08 10.15
1937 | 9 4.57 14.72
1938 | 10 5.08 19.80
1939 | 10 5.08 24.87
1940 | 10 5.08 29.95
1941 | 10 5.08 35.03
1942 | 10 5.08 40.10
1943 | 10 5.08 45.18
1944 | 9 4.57 49.75
1945 | 10 5.08 54.82
1946 | 10 5.08 59.90
1947 | 10 5.08 64.97
1948 | 9 4.57 69.54
1949 | 10 5.08 74.62
1950 | 10 5.08 79.70
1951 | 10 5.08 84.77
1952 | 10 5.08 89.85
1953 | 10 5.08 94.92
1954 | 10 5.08 100.00
------------+-----------------------------------
Total | 197 100.00

. egen rr=rsum(Y*)

. su rr

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
rr | 197 1 0 1 1


Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

On Jun 9, 2005, at 2:33 AM, Michael wrote:



If your panels are unbalanced, then xtreg may not need to drop any of the
time dummies because they will not always sum to 1 and so will not be
perfectly collinear.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index