I'd like to know the proportion of events by site (i.e., by group) where "y" occurred at least once.
Example of data:
site event occurrence A A01 y A A01 n A A02 n A A02 n A A03 y B B01 y B B01 n B B02 n B B02 n
site event occurrence proporition A A01 y 0.666 A A01 n 0.666 A A02 n 0.333 A A02 n 0.333 A A03 y 0.666 B B01 y 0.5 B B01 n 0.5 B B02 n 0.5 B B02 n 0.5
So, at site "A", a the proportion of unique events with at least one occurrence of "Y" was 0.666. At site "B", a the proportion of unique events with at least one occurrence of "Y" was 0.5.
Thank you in advance!