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
Keep time within a range from DateTimeHi Everyone! I am writing my dissertation which is on "The Impact of Macroeconomic Announcements on…
"rangestat" with "excludeself" and "interval(t -1 0)"Dear Statalisters, I have a question about the results after the rangestat command. Suppose I inpu…
Repeated time values - Panel DataHi, I have election data for a country. I am trying to set a panel but as each place has multiple c…
Panel data 3 rounds: how do I count number of unique IDs for which a dummy=1 in none, one, two or all of the roundsHello, I am struggling with a simple bit of summary statistics with panel data and wonder if someone…
Finding the mode value in aggregated spatial unitsHello, I have a dataset with two geographical units of observations, districts and labor market reg…
Subscribe to:
Post Comments (Atom)
0 Response to combining and/or expressions
Post a Comment