Dear Statalisters,
I have the following data/output table:
and my variable vote reports the percentage of votes in governmental elections expected from specific European countries. Most importantly, varname includes some world countries where I'm only interested in the European (Slovakia, Slovenia, Czech Republic, Ukraine, Russia, Romania, Bulgaria, Austria, Germany, Iceland, Switzerland and the UK), which are the most important part of my analysis.
My plan was to map these variable vote only through observations on European countries in a Europe map as opposed to a world map (possibly using command -spmap- (ssc, I think) or even putting it directly on Scapetoad: a cartogram-making program). For that, I think, I need to create a single variable out of these 12 observations, and not include ones like USA or Indonesia.
I am at a loss on how to do this. Maybe with -egen-, it has many functionalities that I'm probably unaware of, but I still don't know how to code it.
If anyone had any advice I would immensely appreciate it. Or alternatively, if anyone knows a way of applying these 12 specific observations to make a map, that would also be great.
I am using Stata 14 on Mac.
Thank you so much
I have the following data/output table:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str12 varname float vote "usa" .4789 "slovakia" .651 "slovenia" .687 "czech" .567 "ukraine" .376 "indonesia" .453 "russia" .211 "romania" .475 "japan" .7486 "bulgaria" .497 "austria" .775 "germany" .435 "iceland" .5305 "uk" .4266668 "morrocco" .236364 "brazil" .546667 "switzerland" .7366 end
and my variable vote reports the percentage of votes in governmental elections expected from specific European countries. Most importantly, varname includes some world countries where I'm only interested in the European (Slovakia, Slovenia, Czech Republic, Ukraine, Russia, Romania, Bulgaria, Austria, Germany, Iceland, Switzerland and the UK), which are the most important part of my analysis.
My plan was to map these variable vote only through observations on European countries in a Europe map as opposed to a world map (possibly using command -spmap- (ssc, I think) or even putting it directly on Scapetoad: a cartogram-making program). For that, I think, I need to create a single variable out of these 12 observations, and not include ones like USA or Indonesia.
I am at a loss on how to do this. Maybe with -egen-, it has many functionalities that I'm probably unaware of, but I still don't know how to code it.
If anyone had any advice I would immensely appreciate it. Or alternatively, if anyone knows a way of applying these 12 specific observations to make a map, that would also be great.
I am using Stata 14 on Mac.
Thank you so much
Comment