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
Latent Class Analysis - Is it possible to run ANOVA or Chi-test in STATA after LCA?Hi everyone, I have been trying to conduct an ANOVA or Chi-test to examine whether certain variable…
looping regressions with different interaction terms each timeDear all, I am still a Stata novice and first post on statalist, I have tried to follow all rules, …
First difference with panel data with multiple observations per yearHi! I am wondering if it is at all possible to do a first difference regression with panel data tha…
looping regressions with different interaction terms each timeDear all, I am still a Stata novice and first post on statalist, I have tried to follow all rules, …
Creating new variable with countsI'm using a dataset with 6 variables measuring different complications a participant could have had.…
Subscribe to:
Post Comments (Atom)
0 Response to combining and/or expressions
Post a Comment