Dear All,
I have an unbalanced panel with values for every 5-years (1970, 1975, ... 2015), and I'm trying to create a lead+10 variable for GDP, but it results in all missing values. If i use a lead+5 instead, it returns values for up to 1990, and missing values for the remaining years.
From previous posts on this issue, i think that it has something to do with the unbalanced-ness of the data (eg. Austria presents values between 1980-2015, while Belgium only between 2005-2015), yet i don't know how fix this without losing information or having to delete values.
Below information on the data and the commands i used:
Thanks very much for your help!
I have an unbalanced panel with values for every 5-years (1970, 1975, ... 2015), and I'm trying to create a lead+10 variable for GDP, but it results in all missing values. If i use a lead+5 instead, it returns values for up to 1990, and missing values for the remaining years.
From previous posts on this issue, i think that it has something to do with the unbalanced-ness of the data (eg. Austria presents values between 1980-2015, while Belgium only between 2005-2015), yet i don't know how fix this without losing information or having to delete values.
Below information on the data and the commands i used:
Code:
xtset country year, delta(5) describe GDPpercapita country year storage display value variable name type format label variable label GDPpercapita double %10.0g GDP per capita country str14 %14s Country year int %10.0g Year gen leadGDP=F10.GDPpercap * Example generated by -dataex-. To install: ssc install dataex clear input float GDPpercap int year str14 country 27595 1980 "Austria" 29623 1985 "Austria" 33888 1990 "Austria" 36537 1995 "Austria" 42001 2000 "Austria" 44637 2005 "Austria" 46858 2010 "Austria" 47905 2015 "Austria" 42994 2005 "Belgium" 44380 2010 "Belgium" 45052 2015 "Belgium" 3955 2000 "Bulgaria" 5561 2005 "Bulgaria" 6843 2010 "Bulgaria" 7612 2015 "Bulgaria" 10569 2000 "Croatia" 13119 2005 "Croatia" 13542 2010 "Croatia" 14088 2015 "Croatia" 30565 2005 "Cyprus" 30818 2010 "Cyprus" 27738 2015 "Cyprus" 13462 1995 "Czech Republic" 14806 2000 "Czech Republic" 18011 2005 "Czech Republic" 19808 2010 "Czech Republic" 21381 2015 "Czech Republic" 30541 1970 "Denmark" 41720 1985 "Denmark" 44569 1990 "Denmark" 49122 1995 "Denmark" 55850 2000 "Denmark" 58792 2005 "Denmark" 58041 2010 "Denmark" 59967 2015 "Denmark" 7313 1995 "Estonia" 10108 2000 "Estonia" 14681 2005 "Estonia" 14638 2010 "Estonia" 17733 2015 "Estonia" 25882 1981 "Finland" 31360 1991 "Finland" 41399 2001 "Finland" 47171 2011 "Finland" 23261 1975 "France" 26919 1980 "France" 28391 1985 "France" 32543 1990 "France" 34091 1995 "France" 38460 2000 "France" 40252 2005 "France" 40638 2010 "France" 41642 2015 "France" 32337 1990 "Germany" 34782 1995 "Germany" 37998 2000 "Germany" 38969 2005 "Germany" 41785 2010 "Germany" 45412 2015 "Germany" 18707 1985 "Greece" 19383 1990 "Greece" 19909 1995 "Greece" 23275 2000 "Greece" 27698 2005 "Greece" 26917 2010 "Greece" 22648 2015 "Greece" 8952 1995 "Hungary" 10490 2000 "Hungary" 13120 2005 "Hungary" 13092 2010 "Hungary" 14629 2015 "Hungary" 14649 1975 "Ireland" 18715 1985 "Ireland" 23714 1990 "Ireland" 28961 1995 "Ireland" 42945 2000 "Ireland" 51527 2005 "Ireland" 48671 2010 "Ireland" 67229 2015 "Ireland" 24450 1980 "Italy" 26504 1985 "Italy" 36180 2000 "Italy" 35849 2010 "Italy" 6934 2000 "Latvia" 10873 2005 "Latvia" 11326 2010 "Latvia" 14284 2015 "Latvia" 6933 2000 "Lithuania" 10537 2005 "Lithuania" 11984 2010 "Lithuania" 15383 2015 "Lithuania" 101380 2005 "Luxembourg" 104965 2010 "Luxembourg" 107648 2015 "Luxembourg" 30075 1980 "Netherlands" 31050 1985 "Netherlands" 35483 1990 "Netherlands" 38438 1995 "Netherlands" 46133 2000 "Netherlands" 48107 2005 "Netherlands" 50338 2010 "Netherlands" 51410 2015 "Netherlands" 6539 1995 "Poland" 8526 2000 "Poland" 9950 2005 "Poland" 12599 2010 "Poland" 14642 2015 "Poland" 8770 1970 "Portugal" 12386 1980 "Portugal" 12613 1985 "Portugal" 16687 1990 "Portugal" 18080 1995 "Portugal" 21513 2000 "Portugal" 22004 2005 "Portugal" 22538 2010 "Portugal" 22016 2015 "Portugal" 5356 1990 "Romania" 4920 1995 "Romania" 4910 2000 "Romania" 6838 2005 "Romania" 8231 2010 "Romania" 9639 2015 "Romania" 8698 1995 "Slovakia" 10296 2000 "Slovakia" 13210 2005 "Slovakia" 16600 2010 "Slovakia" 18678 2015 "Slovakia" 15062 1995 "Slovenia" 18570 2000 "Slovenia" 22029 2005 "Slovenia" 23437 2010 "Slovenia" 13542 1970 "Spain" 17440 1980 "Spain" 18215 1985 "Spain" 22464 1990 "Spain" 23686 1995 "Spain" 28335 2000 "Spain" 31110 2005 "Spain" 30736 2010 "Spain" 30532 2015 "Spain" 29517 1975 "Sweden" 34151 1985 "Sweden" 37513 1990 "Sweden" 37686 1995 "Sweden" 44693 2000 "Sweden" 49996 2005 "Sweden" 52076 2010 "Sweden" 55395 2015 "Sweden" 21865 1980 "United Kingdom" 24479 1985 "United Kingdom" 28691 1990 "United Kingdom" 30674 1995 "United Kingdom" 35576 2000 "United Kingdom" 39740 2005 "United Kingdom" 38893 2010 "United Kingdom" 41536 2015 "United Kingdom" end
Thanks very much for your help!
Comment