/* twins.do */ capture log close set more off log using twins.smcl, replace /* This file reproduces all the examples in the paper called Analysis of matched cohort data Submitted by Peter Cummings & Barbara McKnight */ use twin.dta, clear desc tab cell mcci 61 88 21 141 csmatch cocaine exposed, group(id) xtpois cocaine exposed, fe nolog irr i(id) gen byte time = 1 cox time exposed, strata(id) hr nolog dead(cocaine) cox time exposed, strata(id) hr nolog dead(cocaine) exactp clogit cocaine exposed, group(id) or nolog log close translate twins.smcl twins.log, replace exit