Hi,
I have two queries regarding the following string variables in my database:
1. String Variable #1: Location of Export (- this variable contains values such as Singapore, US, India, Ghana etc.)
I have created a separate mapping file that maps individual countries to regions (eg. Singapore = Asia, US = North America, India = Asia, Ghana = Africa etc.)
I was wondering if there is any elegant way for me to replace the country names in "Location of Export" with the corresponding regions.
2. String Variable #2: Export Share (- this variable contains the absolute amount in USD million and the % share eg. 132.8 (54.0%))
Is there any way for me to extract only 54.0 from the above variable. I do not need the rest since I am working with only the % exports.
Thanks very much.
Related Posts with String variable related commands
Generating cross-sectional information from employment spellsHi all, I am currently working with a polish data set and would like to generate the professional e…
Calculating day-level statistics with data that may span across several daysHi, Data at hand: patient visit start and end dates/times, with each line representing a unique vis…
Hello wonder whether someone knows the formula, by which stata do the f test for equality of coefficients.Hello, thank you in advance for example: code: reg price weight mpg price Coef. Std. Err. t P&g…
eprobit and marginsHi, I am going to use eprobit for my purpose of regressing a binary variable(y) on another endogeno…
Margins after REGHDFE with log dependent variableI am using the reghdfe command with a log dependent variable. Then, I am using the margins command f…
Subscribe to:
Post Comments (Atom)
0 Response to String variable related commands
Post a Comment