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
Combining summary statistics and correlation matrixHi everyone, I need to create a table combining summary statistics and correlation matrix as a part …
Dealing with missing dataHi, I use the following equation for calculating return for a portfolio of stocks. gen MOMf3_p1= ( …
How to deal with "factor variable and time-series operators not allowed "when I run gllamm command?Hello all, How can I include dummy variables in gllamm?Or how can I change factor variales into dumm…
Using Kappa / Weighted KappaDear all Please advise if I can use kappa with this data structure: With two raters (fc and lp) sco…
Using Foreach with loop to calculate averageHi, I want to calculate average of a variable X for all households for each 200 categories on varia…
Subscribe to:
Post Comments (Atom)
0 Response to String variable related commands
Post a Comment