infile id y time gender vita age using a:\ichs.raw, clear * fit MLE; xi:glm y time age i.vita i.gender, fam(bin) link(logit) * fit GEE xi: xtgee y time age i.vita i.gender, fam(binomial) link(logit) corr(independent) i(id) t(time) * fit the longitudinal model using different correlation structures; xi: xtgee y time age i.gender i.vita, fam(bin) link(logit) corr(unstr) i(id) t(time) robust xtcorr xi:xtgee y time age i.gender i.vita, fam(bin) link(logit) corr(exch) i(id) t(time) robust xtcorr xi:xtgee y time age i.gender i.vita, fam(bin) link(logit) corr(ar 1) i(id) t(time) robust xtcorr log close;