Good afternoon,
I have a panel dataset with observations from different countries and different years.
I want to drop the observations that have:1) year < 1986 and countryname == "Spain" or 2) year < 1986 and countryname == "Portugal".
I wrote the following code:
drop if year < 1986 & (countryname == "Spain" | countryname == "Portugal")
Does this code perform what I want ?
Thanks in advance!
Related Posts with combining and/or expressions
Comparing proportions by two different variablesHello there, I want to make compare two proportions of a categorical variable by two different expl…
Adding Dummy VariablesHi All, So I am new to using Stata. I have a preset excel file and wanted to create dummy variables…
DF in clustered regression linear coefficient testI am not sure I understand why the degrees of freedom are 36 rather than 390 in the following Wald t…
margins after svyI am looking at the differences in wages for specific occupations by marital status. Note marital st…
Code to run Spatial Logit/Probit Model in StataHi Statalist member, I am trying to identify the factors that are affecting the households decision…
Subscribe to:
Post Comments (Atom)
0 Response to combining and/or expressions
Post a Comment