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
Marginsplot with catagorical variables on x axis - custom spacingI have a dataset where the outcome is binary (y), and a predictor variable is in the form of ordinal…
coefplot using "meta-data"Hi all, (Relatively new STATA user here) I'm trying some interesting ways of visualizing my data and…
Collecting Confidence Intervals from regress using statsbyHi. I want to use statsby to collect the lower and upper limits of the 95% confidence interval of a …
Bootstrapping? - Comparing the within-subject treatment effect with the between-subject treatment effect (based on two other groups)Dear fellow Stata users, thank you very much for reading my post. I am currently working on an inte…
Hypothesis testing in StataHi, for my Thesis I investigate the effect of ESG scores on the financial performance of companies.…
Subscribe to:
Post Comments (Atom)
0 Response to Help with loop
Post a Comment