encode string variable indicator into a numeric variable and use the new numeric variable as the j variable".
Can you help me with this issue?
The code follows below.
Thank you in advance.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str11 country str39 indicator str10 date str8 year_week float(value yearweek) long(country_ indicator_) "Austria" "Daily hospital occupancy" "2020-04-01" "2020-W14" 856 3133 1 2 "Austria" "Daily hospital occupancy" "2020-04-02" "2020-W14" 823 3133 1 2 "Austria" "Daily hospital occupancy" "2020-04-03" "2020-W14" 829 3133 1 2 "Austria" "Daily hospital occupancy" "2020-04-04" "2020-W14" 826 3133 1 2 "Austria" "Daily hospital occupancy" "2020-04-05" "2020-W14" 712 3133 1 2 "Austria" "Daily hospital occupancy" "2020-04-06" "2020-W15" 824 3134 1 2 "Austria" "Daily hospital occupancy" "2020-04-07" "2020-W15" 857 3134 1 2 "Austria" "Daily hospital occupancy" "2020-04-08" "2020-W15" 829 3134 1 2 "Austria" "Daily hospital occupancy" "2020-04-09" "2020-W15" 820 3134 1 2 "Austria" "Daily hospital occupancy" "2020-04-10" "2020-W15" 771 3134 1 2 "Austria" "Daily hospital occupancy" "2020-04-11" "2020-W15" 790 3134 1 2 "Austria" "Daily hospital occupancy" "2020-04-12" "2020-W15" 792 3134 1 2 "Austria" "Daily hospital occupancy" "2020-04-13" "2020-W16" 742 3135 1 2 "Austria" "Daily hospital occupancy" "2020-04-14" "2020-W16" 759 3135 1 2 "Austria" "Daily hospital occupancy" "2020-04-15" "2020-W16" 769 3135 1 2 "Austria" "Daily hospital occupancy" "2020-04-16" "2020-W16" 729 3135 1 2 "Austria" "Daily hospital occupancy" "2020-04-17" "2020-W16" 682 3135 1 2 "Austria" "Daily hospital occupancy" "2020-04-18" "2020-W16" 647 3135 1 2 "Austria" "Daily hospital occupancy" "2020-04-19" "2020-W16" 613 3135 1 2 "Austria" "Daily hospital occupancy" "2020-04-20" "2020-W17" 611 3136 1 2 "Austria" "Daily hospital occupancy" "2020-04-21" "2020-W17" 560 3136 1 2 "Austria" "Daily hospital occupancy" "2020-04-22" "2020-W17" 524 3136 1 2 "Austria" "Daily hospital occupancy" "2020-04-23" "2020-W17" 508 3136 1 2 "Austria" "Daily hospital occupancy" "2020-04-24" "2020-W17" 495 3136 1 2 "Austria" "Daily hospital occupancy" "2020-04-25" "2020-W17" 460 3136 1 2 "Austria" "Daily hospital occupancy" "2020-04-26" "2020-W17" 449 3136 1 2 "Austria" "Daily hospital occupancy" "2020-04-27" "2020-W18" 439 3137 1 2 "Austria" "Daily hospital occupancy" "2020-04-28" "2020-W18" 425 3137 1 2 "Austria" "Daily hospital occupancy" "2020-04-29" "2020-W18" 386 3137 1 2 "Austria" "Daily hospital occupancy" "2020-04-30" "2020-W18" 372 3137 1 2 "Austria" "Daily hospital occupancy" "2020-05-01" "2020-W18" 348 3137 1 2 "Austria" "Daily hospital occupancy" "2020-05-02" "2020-W18" 314 3137 1 2 "Austria" "Daily hospital occupancy" "2020-05-03" "2020-W18" 308 3137 1 2 "Austria" "Daily hospital occupancy" "2020-05-04" "2020-W19" 309 3138 1 2 "Austria" "Daily hospital occupancy" "2020-05-05" "2020-W19" 314 3138 1 2 "Austria" "Daily hospital occupancy" "2020-05-06" "2020-W19" 321 3138 1 2 "Austria" "Daily hospital occupancy" "2020-05-07" "2020-W19" 268 3138 1 2 "Austria" "Daily hospital occupancy" "2020-05-08" "2020-W19" 258 3138 1 2 "Austria" "Daily hospital occupancy" "2020-05-09" "2020-W19" 230 3138 1 2 "Austria" "Daily hospital occupancy" "2020-05-10" "2020-W19" 219 3138 1 2 "Austria" "Daily hospital occupancy" "2020-05-11" "2020-W20" 211 3139 1 2 "Austria" "Daily hospital occupancy" "2020-05-12" "2020-W20" 205 3139 1 2 "Austria" "Daily hospital occupancy" "2020-05-13" "2020-W20" 188 3139 1 2 "Austria" "Daily hospital occupancy" "2020-05-14" "2020-W20" 180 3139 1 2 "Austria" "Daily hospital occupancy" "2020-05-15" "2020-W20" 165 3139 1 2 "Austria" "Daily hospital occupancy" "2020-05-16" "2020-W20" 158 3139 1 2 "Austria" "Daily hospital occupancy" "2020-05-17" "2020-W20" 149 3139 1 2 "Austria" "Daily hospital occupancy" "2020-05-18" "2020-W21" 151 3140 1 2 "Austria" "Daily hospital occupancy" "2020-05-19" "2020-W21" 143 3140 1 2 "Austria" "Daily hospital occupancy" "2020-05-20" "2020-W21" 137 3140 1 2 "Austria" "Daily hospital occupancy" "2020-05-21" "2020-W21" 156 3140 1 2 "Austria" "Daily hospital occupancy" "2020-05-22" "2020-W21" 128 3140 1 2 "Austria" "Daily hospital occupancy" "2020-05-23" "2020-W21" 116 3140 1 2 "Austria" "Daily hospital occupancy" "2020-05-24" "2020-W21" 108 3140 1 2 "Austria" "Daily hospital occupancy" "2020-05-25" "2020-W22" 108 3141 1 2 "Austria" "Daily hospital occupancy" "2020-05-26" "2020-W22" 95 3141 1 2 "Austria" "Daily hospital occupancy" "2020-05-27" "2020-W22" 84 3141 1 2 "Austria" "Daily hospital occupancy" "2020-05-28" "2020-W22" 77 3141 1 2 "Austria" "Daily hospital occupancy" "2020-05-29" "2020-W22" 78 3141 1 2 "Austria" "Daily hospital occupancy" "2020-05-30" "2020-W22" 75 3141 1 2 "Austria" "Daily hospital occupancy" "2020-05-31" "2020-W22" 70 3141 1 2 "Austria" "Daily hospital occupancy" "2020-06-01" "2020-W23" 68 3142 1 2 "Austria" "Daily hospital occupancy" "2020-06-02" "2020-W23" 62 3142 1 2 "Austria" "Daily hospital occupancy" "2020-06-03" "2020-W23" 66 3142 1 2 "Austria" "Daily hospital occupancy" "2020-06-04" "2020-W23" 65 3142 1 2 "Austria" "Daily hospital occupancy" "2020-06-05" "2020-W23" 55 3142 1 2 "Austria" "Daily hospital occupancy" "2020-06-06" "2020-W23" 55 3142 1 2 "Austria" "Daily hospital occupancy" "2020-06-07" "2020-W23" 52 3142 1 2 "Austria" "Daily hospital occupancy" "2020-06-08" "2020-W24" 65 3143 1 2 "Austria" "Daily hospital occupancy" "2020-06-09" "2020-W24" 65 3143 1 2 "Austria" "Daily hospital occupancy" "2020-06-10" "2020-W24" 63 3143 1 2 "Austria" "Daily hospital occupancy" "2020-06-11" "2020-W24" 67 3143 1 2 "Austria" "Daily hospital occupancy" "2020-06-12" "2020-W24" 60 3143 1 2 "Austria" "Daily hospital occupancy" "2020-06-13" "2020-W24" 62 3143 1 2 "Austria" "Daily hospital occupancy" "2020-06-14" "2020-W24" 57 3143 1 2 "Austria" "Daily hospital occupancy" "2020-06-15" "2020-W25" 64 3144 1 2 "Austria" "Daily hospital occupancy" "2020-06-16" "2020-W25" 66 3144 1 2 "Austria" "Daily hospital occupancy" "2020-06-17" "2020-W25" 60 3144 1 2 "Austria" "Daily hospital occupancy" "2020-06-18" "2020-W25" 64 3144 1 2 "Austria" "Daily hospital occupancy" "2020-06-19" "2020-W25" 68 3144 1 2 "Austria" "Daily hospital occupancy" "2020-06-20" "2020-W25" 66 3144 1 2 "Austria" "Daily hospital occupancy" "2020-06-21" "2020-W25" 61 3144 1 2 "Austria" "Daily hospital occupancy" "2020-06-22" "2020-W26" 59 3145 1 2 "Austria" "Daily hospital occupancy" "2020-06-23" "2020-W26" 57 3145 1 2 "Austria" "Daily hospital occupancy" "2020-06-24" "2020-W26" 59 3145 1 2 "Austria" "Daily hospital occupancy" "2020-06-25" "2020-W26" 60 3145 1 2 "Austria" "Daily hospital occupancy" "2020-06-26" "2020-W26" 60 3145 1 2 "Austria" "Daily hospital occupancy" "2020-06-27" "2020-W26" 61 3145 1 2 "Austria" "Daily hospital occupancy" "2020-06-28" "2020-W26" 62 3145 1 2 "Austria" "Daily hospital occupancy" "2020-06-29" "2020-W27" 66 3146 1 2 "Austria" "Daily hospital occupancy" "2020-06-30" "2020-W27" 58 3146 1 2 "Austria" "Daily hospital occupancy" "2020-07-01" "2020-W27" 65 3146 1 2 "Austria" "Daily hospital occupancy" "2020-07-02" "2020-W27" 62 3146 1 2 "Austria" "Daily hospital occupancy" "2020-07-03" "2020-W27" 65 3146 1 2 "Austria" "Daily hospital occupancy" "2020-07-04" "2020-W27" 60 3146 1 2 "Austria" "Daily hospital occupancy" "2020-07-05" "2020-W27" 62 3146 1 2 "Austria" "Daily hospital occupancy" "2020-07-06" "2020-W28" 67 3147 1 2 "Austria" "Daily hospital occupancy" "2020-07-07" "2020-W28" 81 3147 1 2 "Austria" "Daily hospital occupancy" "2020-07-08" "2020-W28" 66 3147 1 2 "Austria" "Daily hospital occupancy" "2020-07-09" "2020-W28" 66 3147 1 2 end format %tw yearweek label values country_ country_ label def country_ 1 "Austria", modify label values indicator_ indicator_ label def indicator_ 2 "Daily hospital occupancy", modify
0 Response to How to create new variables using observations from other variable but observations contain spaces?
Post a Comment