Population-average risk contrast

Four control patients each have two binary outcomes, (0,0), (0,0), (1,1), (0,0). Four treated patients have (1,1), (1,1), (0,0), (1,1). Calculate the observed marginal risks, risk difference, and odds ratio. How many independent patients, rather than visits, contribute?

There are 2 control events in 8 visits and 6 treated events in 8 visits, so the marginal risks are 1/4 and 3/4 and the risk difference is 1/2. Their odds are 1/3 and 3, giving odds ratio 9. There are 8 independent patient clusters, four per group, even though there are 16 visits.