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
Creating principal components output after pcaHi All, I wish to create a table depicting the complete output tables post PCA estimation. I found …
Question: Creating an indicator for every fifth eventI have a question concerning an efficient way to create an indicator for the date at which an event …
Interpretation of result for cross sectional independence test - xtcd2Hi - I have received this result and with the negative CD value I am confused over its interpretatio…
C:\Users\AppData\Local\Temp\ST_04000001.tmp * *not foundI´m converting spss files into .dta files through many loops and one of those is like the following …
Create numlist based on values? I am currently struggling a bit with Stata syntax. As I am using the "margins" command, I want to s…
Subscribe to:
Post Comments (Atom)
0 Response to Help: Generating a new variable on a subsample
Post a Comment