Hello,
I am struggling with a simple bit of summary statistics with panel data and wonder if someone can help.

I have a balanced panel data set with time variable: round (1, 2, 3), and panel variable: id (generated by egen group(householdID))
I have have a dummy variable: shock (1/0) , reported for each id for each round

I would like to count and produce a table that reports the percentage of households/unique ids that experience 0 shocks, 1 shock, 2 shocks and 3 shocks, across the 3 rounds (I do not care whether shocks are consecutive, e.g. a household experiencing a shock in rounds 1 & 3 only I would count as having '2 shocks').

Many thanks
Annie