Hi guys,
i have some unbalanced panel data that I need some guidelines /help with please.
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
Listed 100 out of 248 observations
Use the count() option to list more
result from xtfisher ( unit root test using adf for unbalanced panel data):
Fisher Test for panel unit root using an augmented Dickey-Fuller test (0 lags)
Ho: unit root
chi2(0) = 0.0000
Prob > chi2 = .
.
At first I thought taking the first difference would simplify this and leave me with the variables that would not contain unit roots.
Fisher Test for panel unit root using an augmented Dickey-Fuller test (0 lags)
Ho: unit root
chi2(0) = 0.0000
Prob > chi2 = .
.
this left me mildy sad.
q: what can I do in order to " get rid" of these unit roots , since differencing does not seem to help?
different note:
I am currently refreshing some econometrics thus will respond on this thread myself with a possible solution for these types of dataset. however any help would be nice
i have some unbalanced panel data that I need some guidelines /help with please.
. dataex
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str8 SQLDATE long MonthYear byte(IsRootevent Quadclass) double GoldsteinScale long NumMentions double AvgTone long EventRootCode str3(Source Target) float(ERC11 ERC12 first_difference time_id second_difference) "20020619" 200206 0 4 -9.2 5 3.4833091436865 18 "REB" "USA" 189 1094 -72 1 . "20050401" 200504 0 3 -4 21 9.03426791277258 13 "NGO" "USA" 192 979 -95 2 . "20050125" 200501 0 4 -9.5 2 4.01476115941366 20 "IRQ" "USA" 220 1036 -8 3 31 "20050222" 200502 1 3 -2 1 9.60365853658537 12 "BUS" "USA" 227 1144 -26 4 35 "20050802" 200508 0 4 -9.5 5 3.6745406824147 19 "CVL" "USA" 228 973 -148 5 8 "20051022" 200510 1 4 -5 2 3.49206349206349 18 "JUD" "USA" 228 1212 -132 6 1 "20041230" 200412 0 4 -5 1 5.08474576271187 18 "ECU" "USA" 232 1100 -45 7 4 "20020504" 200205 1 3 -2 2 6.25 12 "YEM" "USA" 235 1243 -278 8 7 "20051115" 200511 1 3 -2 1 6.07476635514019 12 "UZB" "USA" 253 1289 64 9 21 "20040814" 200408 1 4 -10 2 6.2093435836783 20 "IRQ" "USA" 259 1380 -57 10 24 "20051215" 200512 1 4 -5 3 5.30973451327434 18 "LEG" "USA" 261 1198 -32403 11 8 "20010308" 200103 0 4 -5 6 5.76131687242798 18 "USA" "USA" 269 1710 -51 12 10 "20041001" 200410 1 3 -2 6 8.03571428571429 12 "USA" "USA" 273 1595 -26 13 12 "20040704" 200407 0 4 -10 5 3.38835794960904 20 "IRQ" "USA" 277 1433 -41 14 8 "20041110" 200411 1 3 -2 9 3.73134328358209 12 "MIL" "USA" 278 1230 19 15 5 "20010121" 200101 1 4 -9.5 3 6.31136044880785 20 "BUS" "USA" 279 958 -47113 16 2 "20020410" 200204 1 3 -5 9 4.16666666666667 11 "RUS" "USA" 280 1480 11 17 2 "20050518" 200505 1 3 -2 3 4.74254742547426 12 "USA" "USA" 286 1266 -73 18 7 "20050608" 200506 1 4 -10 6 6.56692835629289 20 "USA" "USA" 287 1088 60 19 7 "20050729" 200507 1 3 -2 7 5.44 12 "MIL" "USA" 287 1118 -82 20 1 "20010222" 200102 0 3 -2 1 5.08474576271187 12 "RUS" "USA" 291 1643 -44285 21 4 "20021009" 200210 0 3 -2 4 4.9597855227882 12 "MOS" "USA" 292 1725 60 22 5 "20010818" 200108 0 3 -5 4 6.09981515711645 13 "KOR" "USA" 296 1235 17 23 5 "20021130" 200211 1 3 -4 2 3.82293762575453 13 "DEU" "USA" 299 1955 21 24 7 "20011230" 200112 0 3 -2 2 4.69107551487414 12 "IMG" "USA" 307 1713 -86 25 11 "20050902" 200509 0 4 -9.5 8 7.48299319727891 20 "MIL" "USA" 311 1072 -55 26 12 "20040908" 200409 1 4 -10 2 0 20 "IRQ" "USA" 316 1557 -58 27 9 "20020329" 200203 1 3 -4 2 10.8 13 "CUB" "USA" 318 1711 -61 28 7 "20010724" 200107 0 3 -4 2 5.11309571577608 13 "GOV" "USA" 320 1399 29 29 4 "20010611" 200106 1 4 -5 4 2.72479564032698 18 "MED" "USA" 331 1446 96 30 13 "20020914" 200209 1 4 -10 9 1.48809523809524 20 "PAK" "USA" 337 1901 50 31 17 "20050320" 200503 1 4 -5 4 3.71747211895911 18 "NPL" "USA" 355 1382 135 32 24 "20040220" 200402 0 3 -5 4 5.62293274531422 11 "IRQ" "USA" 359 1679 48 33 22 "20010512" 200105 1 4 -5 4 2.18340611353712 18 "COP" "USA" 360 1747 29 34 5 "20020223" 200202 0 4 -5 2 5.64295183384887 18 "PSE" "USA" 366 2036 29 35 7 "20020824" 200208 1 4 -10 4 .823045267489712 20 "USA" "USA" 369 1708 177 36 9 "20040124" 200401 1 4 -9.5 2 3.76344086021505 20 "" "USA" 374 1619 -65 37 8 "20020706" 200207 0 3 -2 1 5.71030640668524 12 "AFG" "USA" 376 1836 90 38 7 "20021226" 200212 1 3 -2 1 4.60122699386503 12 "MIL" "USA" 379 1852 24 39 5 "20031111" 200311 0 4 -10 7 4.93735163608681 20 "" "USA" 382 1715 -13 40 6 "20040317" 200403 1 4 -10 2 4.45269016697588 19 "IRQ" "USA" 389 2426 -56 41 10 "20020103" 200201 0 4 -10 6 5.74018126888217 20 "SAU" "USA" 393 1861 120 42 11 "20011109" 200111 1 3 -5 16 2.35813370969382 11 "INT" "USA" 395 1998 -205 43 6 "20031214" 200312 0 3 -5 9 4.99075785582255 11 "USA" "USA" 402 1668 -55 44 9 "20031003" 200310 0 4 -10 1 7.87746170678337 20 "SEA" "USA" 404 2011 22 45 9 "20030606" 200306 1 4 -10 2 1.19047619047619 20 "AFG" "USA" 425 2001 -55 46 23 "20030818" 200308 1 4 -10 2 .274725274725275 20 "IRQ" "USA" 428 1623 3 47 24 "20030202" 200302 1 4 -7.2 5 5.54245283018868 16 "GOV" "USA" 439 2585 147 48 14 "20030911" 200309 0 4 -5 3 5.86245772266065 18 "UAF" "USA" 445 2010 43 49 17 "20030131" 200301 1 4 -10 4 6.92024295529224 20 "JPN" "USA" 457 2219 29 50 18 "20040629" 200406 0 3 -4.4 1 5.50639134709931 14 "USA" "USA" 469 1815 -97 51 24 "20030528" 200305 0 3 -4 9 6.16621983914209 13 "USA" "USA" 480 1916 173 52 23 "20011016" 200110 1 3 -2 2 3.51288056206089 12 "SYR" "USA" 492 3626 -245 53 23 "20010410" 200104 1 3 -5 25 4.38911823859426 11 "CHN" "USA" 513 2116 233 54 33 "20040413" 200404 1 4 -5 2 2.29885057471264 18 "FRA" "USA" 534 2191 65 55 42 "20040505" 200405 0 4 -10 8 3.76138314799665 20 "" "USA" 566 2427 162 56 53 "20160609" 201606 0 4 -5 3 -1.29611166500498 18 "USA" "USA" 578 507 -27891 57 44 "20030724" 200307 1 4 -10 6 2.80701754385965 20 "UAF" "USA" 600 2106 211 58 34 "19970226" 199702 1 4 -9 5 3.26340326340326 18 "SEP" "USA" 644 271 -554 59 66 "20030318" 200303 0 3 -2 2 4.8728813559322 12 "RUS" "USA" 648 4128 114 60 48 "19970725" 199707 0 3 -4 3 7.36301369863014 12 "USA" "USA" 668 321 24 61 24 "20010924" 200109 1 4 -4 8 4.54545454545455 17 "CVL" "USA" 695 3479 47 62 47 "19970122" 199701 1 3 -2 2 3.6231884057971 11 "ISR" "USA" 733 344 -2530 63 65 "20030416" 200304 0 3 -5 27 8.82554941762654 11 "" "USA" 737 3091 42 64 42 "19980724" 199807 1 3 -2 2 8.62068965517241 11 "SRB" "USA" 752 348 19 65 19 "19970802" 199708 0 3 -2 3 9.98702983138781 11 "FRA" "USA" 754 393 . 66 17 "19970506" 199705 1 4 -10 1 3.21888412017167 19 "UAF" "USA" 769 377 -10403 67 17 "19970409" 199704 1 4 -7 2 5.13595166163142 16 "USA" "USA" 787 366 -7537 68 33 "19970924" 199709 0 3 -7 4 6.16113744075829 13 "GOV" "USA" 796 419 -4331 69 27 "19980623" 199806 0 3 -2 3 4.31309904153355 11 "PRK" "USA" 831 485 -8828 70 44 "19971231" 199712 0 4 -9 1 5.79710144927536 18 "PER" "USA" 882 416 -143 71 86 "19990627" 199906 1 3 -2 5 3.42465753424658 11 "USA" "USA" 921 514 -7857 72 90 "20000530" 200005 0 4 -10 2 4.11124546553809 19 "MIL" "USA" 938 306 -297 73 56 "19980415" 199804 1 4 -10 8 2.95566502463054 19 "ZAF" "USA" 944 570 190 74 23 "19971017" 199710 0 4 -4 9 8.05755395683453 16 "GOV" "USA" 961 448 -3793 75 23 "19981016" 199810 0 3 -4 16 13.2645123480957 12 "GOV" "USA" 961 483 -7351 76 17 "20000630" 200006 0 3 -4.4 9 3.88768898488121 13 "ISR" "USA" 974 470 -299 77 13 "20000707" 200007 0 4 -5 1 7.39972337482711 17 "PRK" "USA" 1014 461 40 78 53 "19990808" 199908 1 3 -4.4 2 7.58293838862559 13 "PAK" "USA" 1024 431 -5960 79 50 "19970304" 199703 0 3 -5 4 6.93481276005548 12 "COL" "USA" 1025 505 -1110 80 11 "20060805" 200608 0 3 -7 3 3.29268292682927 13 "USA" "USA" 1030 515 -511 81 6 "19970623" 199706 1 4 -5 1 0 17 "COP" "USA" 1050 418 281 82 25 "20000104" 200001 0 3 -2 2 3.76984126984127 11 "RUS" "USA" 1067 571 -31 83 37 "20000930" 200009 1 3 -6.5 5 8.3676268861454 14 "CHN" "USA" 1077 556 -57 84 27 "19990701" 199907 0 4 -5 4 4.55978282207901 17 "USA" "USA" 1098 524 137 85 31 "19990923" 199909 0 4 -10 2 1.90839694656489 19 "LKA" "USA" 1114 512 -49 86 37 "20000308" 200003 0 4 -10 2 5.90955806783145 19 "LEG" "USA" 1126 439 -18060 87 28 "20060716" 200607 1 3 -4 8 4.6541439090601 12 "USA" "USA" 1130 512 -994 88 16 "20000412" 200004 0 3 -5 15 5.14434889434889 10 "" "USA" 1134 537 347 89 8 "19991016" 199910 0 4 -5 2 6.47773279352227 17 "LEG" "USA" 1143 681 -24 90 13 "19990203" 199902 1 4 -5 2 5.85106382978723 17 "TUR" "USA" 1163 572 113 91 29 "19980517" 199805 1 3 -2 1 5.73476702508961 11 "CAN" "USA" 1167 752 285 92 24 "20001226" 200012 0 3 -4 1 9.21843687374749 12 "ISR" "USA" 1198 559 -155 93 35 "19990526" 199905 0 3 -2 1 5.50621669626998 11 "CHN" "USA" 1210 500 -302 94 43 "19990428" 199904 0 4 -7.2 1 2.46734397677794 15 "RUS" "USA" 1215 538 -14824 95 17 "19971126" 199711 0 3 -5 4 4.86381322957198 10 "ARG" "USA" 1222 545 554 96 12 "20000828" 200008 0 4 -5 1 5.96669750231267 17 "REB" "USA" 1229 481 215 97 14 "19980917" 199809 0 3 -2 4 4.16666666666667 11 "SYR" "USA" 1235 455 -405 98 13 "20001006" 200010 1 4 -5 5 .366300366300366 17 "OPP" "USA" 1271 430 519 99 42 "19980319" 199803 0 4 -10 6 5.64263322884013 19 "USA" "USA" 1272 603 205 100 37 end label values EventRootCode Dv29 label def Dv29 10 "10", modify label def Dv29 11 "11", modify label def Dv29 12 "12", modify label def Dv29 13 "13", modify label def Dv29 14 "14", modify label def Dv29 15 "15", modify label def Dv29 16 "16", modify label def Dv29 17 "17", modify label def Dv29 18 "18", modify label def Dv29 19 "19", modify label def Dv29 20 "20", modify
Listed 100 out of 248 observations
Use the count() option to list more
result from xtfisher ( unit root test using adf for unbalanced panel data):
. xtfisher ERC11
Fisher Test for panel unit root using an augmented Dickey-Fuller test (0 lags)
Ho: unit root
chi2(0) = 0.0000
Prob > chi2 = .
.
At first I thought taking the first difference would simplify this and leave me with the variables that would not contain unit roots.
gen first_difference=(erc11-erc11[_n-1])
. xtfisher first_difference
. xtfisher first_difference
Fisher Test for panel unit root using an augmented Dickey-Fuller test (0 lags)
Ho: unit root
chi2(0) = 0.0000
Prob > chi2 = .
.
this left me mildy sad.
q: what can I do in order to " get rid" of these unit roots , since differencing does not seem to help?
different note:
I am currently refreshing some econometrics thus will respond on this thread myself with a possible solution for these types of dataset. however any help would be nice
Comment