************************************************************************** * exer5-1-do.txt * * * * PURPOSE: analysis of esphogeal cancer data * * * * DATE: 01/05/11 * * * ************************************************************************** infile case age agegp tobgp tob logtob beer wine cider aperitif digest alc logalc TuynsC-dat.txt label variable case "case/control status" label variable age "age" label variable agegp "age group" label variable tobgp "tobacco group" label variable logtob "log(tob+1)" label variable alc "total alcohol" label variable logalc "log(alc+1)" label define ylab 0 "control" 1 "case" label values case ylab label define alab 1 "25-34" 2 "35-44" 3 "45-54" 4 "55-64" 5 "65-74" 6 "75+" label values agegp alab drop if tob==99 xi: logistic case i.agegp alc tob logit lrtest, saving(1) *** *** do we need quadratic fnxs for either alc or tob? *** generate alc2 = alc*alc generate tob2 = tob*tob xi: logistic case i.agegp alc tob alc2 logit lrtest, saving(2) xi: logistic case i.agegp alc tob tob2 logit lrtest, saving(3) lrtest, using(3) model(1) lrtest, using(2) model(1) *** *** descriptive statistics for the alcohol components *** sort case by case: summarize beer by case: summarize wine by case: summarize cider by case: summarize aperitif by case: summarize digest centile beer if case==0, centile( 10 25 50 75 90 ) centile beer if case==1, centile( 10 25 50 75 90 ) centile wine if case==0, centile( 10 25 50 75 90 ) centile wine if case==1, centile( 10 25 50 75 90 ) centile cider if case==0, centile( 10 25 50 75 90 ) centile cider if case==1, centile( 10 25 50 75 90 ) centile aperitif if case==0, centile( 10 25 50 75 90 ) centile aperitif if case==1, centile( 10 25 50 75 90 ) centile digest if case==0, centile( 10 25 50 75 90 ) centile digest if case==1, centile( 10 25 50 75 90 ) *** *** alcohol separated into components *** xi: logistic case i.agegp tob beer wine cider aperitif digest logit lrtest, saving(4) lrtest, using(4) model(1) *** *** a look at the impact of age adjustment... *** logistic case alc tob logit