************************************************************************** * * * athens.do * * * * PURPOSE: analysis of Tzonou et al. (1998) data investigating * * CHD and iron consumption * * * * DATE: 11 April 2002 * * * ************************************************************************** *** *** read the data and format *** infile female age iron case count using athens.dat label define fnames 0 "male" 1 "female" label values female fnames label define anames 1 "<= 49" 2 "50-59" 3 "60-69" 4 ">= 70" label values age anames label define inames 1 "<= 250mg/month" 2 "251-300 mg/month" 3 "301-350 mg/month" 4 "351-400 mg/month" 5 "> 400 mg/month" label values iron inames label define ynames 0 "control" 1 "case" label values case ynames *** *** create a single record per subject *** drop if count==0 expand count *** *** recode Iron *** generate newiron=iron recode newiron 1/3=0 4/5=1 label define nnames 0 "<=350 mg/month" 1 "> 350 mg/month" label values newiron nnames ***************************************************************************** *** *** *** univariate and bivariate distributions *** *** *** ***************************************************************************** table case table newiron table age table female ***** Note: we use column summaries since it's a case-control study tabulate newiron case, col tabulate age case, col tabulate female case, col tabulate newiron female, row tabulate newiron age, row ***************************************************************************** *** *** *** crude analysis (using logistic regression) *** *** *** ***************************************************************************** logistic case newiron logit ***************************************************************************** *** *** *** adjusted analysis (we can compare Mantel-Haenszel and logistic regn) *** *** *** ***************************************************************************** mhodds case newiron age female xi: logistic case newiron female i.age logit ***** save logL2 so that we can use this for 1(i) lrtest, saving(2) ***** let's get STATA to calculate the comparison in 1(h) lincom _Iage_4 - _Iage_3, or ***** likelihood ratio test of newiron xi: logistic case female i.age logit lrtest, saving(1) lrtest, using(2) model(1) ***************************************************************************** *** *** *** What is impact of age adjustment on the newiron OR? Let's fit w/o *** *** age and assess the change in the newiron coef (or OR) as compared *** *** to the model that does include age (fit above as first model). *** *** *** *** *** ***************************************************************************** logistic case newiron female logit ***************************************************************************** *** *** *** Now analysis that evaluates the interaction between gender and iron *** *** *** ***************************************************************************** generate ironXgen = newiron * female xi: logistic case newiron female i.age ironXgen logit ***** here is the estimated odds ratio comparing newiron=1 to newiron=0 ***** for female=0 lincom newiron, or ***** here is the estimated odds ratio comparing newiron=1 to newiron=0 ***** for female=1 lincom newiron + ironXgen, or ***** notice these are similar to what M-H gave us (but not the same) mhodds case newiron age, by(female) ***** here are separate logistic regressions for MALEs and FEMALEs xi: logistic case newiron i.age if female==0 xi: logistic case newiron i.age if female==1