Dear all,
Currently I am using 178 countries in my data set and I would like to use country fixed effect.
Now, dummy creation for each countries is as follow;
gen DAFG=0
replace DAFG=1 if iso3i=="AFG" | iso3j=="AFG"
gen DAGO=0
replace DAGO=1 if iso3i=="AGO" | iso3j=="AGO"
..................................................
.................................................. ...........
.................................................. ................
gen DVNM=0
replace DVNM=1 if iso3i=="VNM" | iso3j=="VNM"
gen DYEM=0
replace DYEM=1 if iso3i=="YEM" | iso3j=="YEM"
gen DZAF=0
replace DZAF=1 if iso3i=="ZAF" | iso3j=="ZAF"
gen DZMB=0
replace DZMB=1 if iso3i=="ZMB" | iso3j=="ZMB"
gen DZWE=0
replace DZWE=1 if iso3i=="ZWE" | iso3j=="ZWE"
The above command are manual command and please let me know automatically command to create 178 countries dummy.
Thank you very much.
Myo
Currently I am using 178 countries in my data set and I would like to use country fixed effect.
Now, dummy creation for each countries is as follow;
gen DAFG=0
replace DAFG=1 if iso3i=="AFG" | iso3j=="AFG"
gen DAGO=0
replace DAGO=1 if iso3i=="AGO" | iso3j=="AGO"
..................................................
.................................................. ...........
.................................................. ................
gen DVNM=0
replace DVNM=1 if iso3i=="VNM" | iso3j=="VNM"
gen DYEM=0
replace DYEM=1 if iso3i=="YEM" | iso3j=="YEM"
gen DZAF=0
replace DZAF=1 if iso3i=="ZAF" | iso3j=="ZAF"
gen DZMB=0
replace DZMB=1 if iso3i=="ZMB" | iso3j=="ZMB"
gen DZWE=0
replace DZWE=1 if iso3i=="ZWE" | iso3j=="ZWE"
The above command are manual command and please let me know automatically command to create 178 countries dummy.
Thank you very much.
Myo
Comment