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
Cluster stopping ruleDear Forum, I am conducting a cluster analysis with six binary criteria Code: cluster wardsli…
How to get proportion using bar graphs?input int(patientid Dateofdelivery) str10 Placeofdelivery byte steroids float(Yearofdelivery receive…
How to extract county name only from address?Hi, I am struggling with extracting county name from the address using split command. I am not sure …
Help with Interaction Terms and Linear CombinationHello, I am modeling a large case control data set and am having some difficulty understanding the …
Please help me!!! about the interpreration of fixed effect modelI got a stata command: xtreg murdrate execrate c.execrate#c.execrate, fe vce(cluster countyid) but …
Subscribe to:
Post Comments (Atom)
0 Response to String variable related commands
Post a Comment