Friday, March 17, 2017

panel data, excel file coding example

http://forums.eviews.com/viewtopic.php?t=74

type 1

Year Country GDP Unemployment Inflation
1990         USA 45.18521 71.83384877 71.1575
1991         USA 23.04601 78.76719258 56.60289
1992         USA 29.69415 46.21706091 70.55974
1993         USA 53.55889 78.60050714 77.54319
1994        USA 19.47274 31.85681226 76.86575
1995        USA 91.50116 98.91007925 63.9196
1996         USA 24.84979 40.67420505 58.7951
1997         USA 53.52124 45.11429455 18.41375
1990         UK 85.98417 2.065408081 79.77445
1991        UK 87.49779 96.39854289 39.46303
1992         UK 68.00752 53.67362608 10.63008
1993          UK 89.58283 36.18780323 24.06416
1994         UK 36.88112 14.28218606 95.576
1995          UK 13.51797 39.154493 75.34766
1996          UK 44.41815 69.83427487 46.24098
1997         UK 15.82823 63.36841282 26.53226

type 2
A second type of format that is used in Excel, is where the columns represent dates, then the rows represent both cross-sections and variables

State Variable Yr1940 Yr1941 Yr1942 Yr1943
Alabama GDP 0.442658 0.315485 0.109414 0.411838
Alabama Unemp 0.652004 0.171815 0.929798 0.878353
Alabama House Price 0.818003 0.2169 0.487288 0.155818
Alabama Prisons 0.636364 0.458292 0.946148 0.352237
Alabama School Budget 0.578769 0.90547 0.277085 0.417637
Alabama Police Budget 0.745779 0.159693 0.150518 0.310762
Alaska GDP 0.51315 0.239402 0.690371 0.902755
Alaska Unemp 0.047899 0.329383 0.039415 0.261495
Alaska House Price 0.430723 0.457658 0.688661 0.359665
Alaska Prisons 0.031685 0.376072 0.836634 0.534889
Alaska School Budget 0.665001 0.99451 0.525446 0.998323
Alaska Police Budget 0.461253 0.327956 0.373816 0.797453
Arkansas GDP 0.751544 0.405693 0.252975 0.160238
Arkansas Unemp 0.592959 0.467335 0.360323 0.411224
Arkansas House Price 0.605316 0.236436 0.824262 0.488503
Arkansas Prisons 0.826649 0.613368 0.100428 0.197751
Arkansas School Budget 0.038491 0.358908 0.020196 0.373979
Arkansas Police Budget 0.362473 0.253577 0.393876 0.126115

No comments: