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
Weighted database regression analysesDear Stata List, I'm having trouble completing a weighted linear regression model using NHANES data…
Help with re-formatting a dataset for choice modelling?Hi folks. I have data in the following format. Each observation represents a zip code, n_sites denot…
Test for differences between Cumulative Incidence Function curvesHello, I have a two-arm trial where an event can either occur or does not occur because of a compet…
Correct estimation of panel dataHello, I am making model to analyze migration from third countries (together 20) to Slovakia, Hunga…
Principal component analysis for alternative proxiesI have a panel data. There are three alternative proxies (i.e. IndVar1, IndVar2, IndVar3) that basic…
Subscribe to:
Post Comments (Atom)
0 Response to Help: Generating a new variable on a subsample
Post a Comment