Hello!
I am a beginner in Stata.
My problem:
I have a selection of countries in my dataset and I want to do a regression on only a subset of these countries.
In my case, my data contains the countries of the world, but I only want my regression to cover the region of North Africa.
But I am unable to figure out the exact command for this.
So basically I want to do something like this:
regress Y-variable X-variable if country_name == "Tunisia", "Egypt", "Morocco", "Tunisia", "Algeria", "Libya", "Sudan"
What am I missing here?
//Thank you
Related Posts with Help: Generating a new variable on a subsample
Lagged Variable generationI have an individual level cross-sectional dataset. The observations are individuals belonging to a …
Cumulative Quarterly Values per year, per IDHello everbody! I am currently working on my thesis and do not know how to generate cumulative GDP …
Median, SD, & FrequencyFor the attached file, find: For variable PAY, calculate median and SD by denial code, but only for…
How to create a poverty headcount variable (by municipality)Hi all, I am using South Africa Census 2011 data, and I want to use the derived household annual in…
ForcastingHi! I need to estimate predicting values from a logistic regression using continuos and discrete var…
Subscribe to:
Post Comments (Atom)
0 Response to Help: Generating a new variable on a subsample
Post a Comment