Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73283

How to drop all single observations?

$
0
0
Hi All,

I'm trying to drop all groups of a variable with only one observation each and I am having trouble with the code. Basically I'm looking for political parties that have been active across a bunch of elections and need to get rid of the parties that only contested a single election. Unfortunately the party name and code variables do not make it easy to sort and delete them individually.

I'm looking for something like

"drop pty if Freq.==1"

Can anyone help?

Thanks!

Viewing all articles
Browse latest Browse all 73283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>