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
Labeling by using loops and local macrosHi everyone, I'm using a -forval- to populate a local macro that I would use later for labeling val…
Problem generating panel data set from ‘long’ dataHello everyone, I have a panel dataset of firms over time that I am attempting to convert from ‘lon…
Age-transition probabilityWe have data on when student go from one grade to another and want to estimate age-based transition …
Difference in Difference Probit ModelI am attempting a Difference in difference model with Probit/logit Looking at the effect of a reform…
Replacing missing value with average of selected responsesHello, I am trying to replace a missing value with the average several other responses. I am running…
Subscribe to:
Post Comments (Atom)
0 Response to Help with loop
Post a Comment