Hello Members!
I have the following data:
I want to reshape the data so that it becomes panel data. I need the data for all countries by calendar year.
I am using the following code, but it says cal_year ambiguous observation-
I have the following data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str14 countryname float(cal_year1996 cal_year1998 cal_year2000 cal_year2002 cal_year2003) "Australia" 1.8 1.62 1.73 1.66 1.77 "Austria" 1.73 1.8 1.85 1.88 1.93 "Belgium" 1.71 1.77 1.66 1.92 1.87 "Brazil" -.14 -.2 .04 -.03 .08 "Canada" 1.74 1.88 1.85 1.86 1.92 "Chile" 1.34 1.1 1.01 1.08 1.1 "China" -.35 -.2 -.16 -.12 -.15 "Colombia" -.46 -.33 -.4 -.49 -.22 "Denmark" 1.76 1.91 1.9 2.02 2.09 "Finland" 1.72 1.95 2.03 2.1 2.19 "France" 1.25 1.45 1.64 1.54 1.65 "Germany" 1.72 1.81 1.8 1.66 1.36 "Greece" .84 .74 .59 .78 .7 "Hong Kong" 1.04 1.1 1.26 1.33 1.59 "Hungary" .86 .94 1 .99 .83 "India" -.11 -.11 -.19 -.19 -.14 "Indonesia" -.71 -.69 -.37 -.55 -.6 "Ireland" 1.67 1.74 1.59 1.57 1.5 "Italy" .84 .83 .72 .75 .74 "Japan" .91 1.02 1.14 1.02 1.16 "Malaysia" .54 .75 .99 .92 1.04 "Mexico" .23 .38 .28 .22 .13 "Netherlands" 1.94 2 1.98 1.93 1.95 "New Zealand" 1.77 1.63 1.59 1.68 1.76 "Norway" 1.95 1.91 1.82 1.83 1.83 "Pakistan" -.62 -.49 -.49 -.55 -.59 "Peru" .03 .07 -.18 -.39 -.59 "Philippines" -.31 -.04 -.2 -.18 -.15 "Poland" .68 .62 .57 .45 .51 "Portugal" 1.27 1.11 .97 1.15 1.11 "Singapore" 1.99 2.07 2.11 1.79 1.93 "South Africa" 1.02 .62 .65 .61 .6 "South Korea" .47 .29 .61 .8 .79 "Spain" 1.62 1.6 1.69 1.79 1.82 "Sweden" 1.92 1.88 1.88 1.96 2.02 "Switzerland" 1.76 1.91 1.96 1.94 1.75 "Taiwan" .55 .8 .7 .74 .92 "Thailand" .18 .04 .18 .26 .31 "Türkiye" -.08 -.31 -.02 .05 .03 "United Kingdom" 1.88 1.86 1.77 1.78 1.75 "" . . . . . end
I am using the following code, but it says cal_year ambiguous observation-
Code:
reshape long @effectiveness, i(cal_year) j(countryname) string
Comment