Hi,
Getting used to the program. I'm having some trouble with a loop. In the first column of the data (which I import from an excel file), I have Country names (Country is the variable). The idea is to replace the entire country names (Brasil, Armenia, Colombia, etc) in each row of the first column for the corresponding 3 digit letter. So, the idea is to loop the following:
replace Country = "ARM" in 1
replace Country = "AUT" in 2
replace Country = "AZE" in 3
replace Country = "BLR" in 4
replace Country = "BEL" in 5
replace Country = "BOL" in 6
replace Country = "BRA" in 7
replace Country = "BGR" in 8
replace Country = "COL" in 9
Any suggestions? Thank you very much!!
Related Posts with Help with loop
Bayesian iRT using bayesmhhow will i code A= 1, B= 2, C=3 ,D=4 in this excel sheet Q1 Q2 Q3 Q4 Q5 Q6 Q7 1 B A A B A D A 2 C B …
Counting distinct values by groupHello, I have a data-set with a unique id (permno) and time (date). I have taken the year of this d…
xstata pauzes on linux server when disconnecting SSH tunnelI have Stata MP installed on a linux server, which I access through a ssh tunnel and X2go (and X11 f…
Problem intepreting 3sls (reg3) results, and isolate dependent variable in a simultaneous equation modelDear Stata experts and fellow students We are 2 students that are writing our thesis where we try t…
problems with nested logit modelHi I am trying to model migration within Sweden using a nested logit model and I have divided Swede…
Subscribe to:
Post Comments (Atom)
0 Response to Help with loop
Post a Comment