Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: re: time variable with gaps


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: time variable with gaps
Date   Mon, 24 Dec 2007 09:07:50 -0500

country year var 1 var 2 var 3 var 4
. .
. .
AUS 1986 4.621401 3.546704 2.339785 -.0403954
AUS 1993 1.197454 3.683009 2.367061 .0228291
AUT 1987 2.860833 4.249761 2.049111 .0111748
AUT 1994 1.087343 4.330157 2.086045 -.04415
BEL 1979 5.283737 4.885247 2.109486 -.0124152
BEL 1985 3.148579 4.909156 2.149084 .0037365
BEL 1992 2.223942 4.897898 2.208274 -.0008712
BGD 1963 11.59548 3.013667 -.1875351 -.0035743
BGD 1973 31.88276 2.874345 .247641 -.00466


this is just part of my dataset. How can I solve and reshape data in order
to apply DPD?



bysort country: gen t = _n
tsset country t
xtabond2 ...

assuming you're willing to consider subsequent observations to be 'evenly spaced' in some sense of the term.



Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index