egen age_cat = cut(age), at(23 41 51 61 75) icodeslogit( π )j= α + β1TREATMENTλλ1λ234I(AGEI(41
■■Commentare le <strong>di</strong>fferenze tra il modello con l’età continua e il modello con l’età in classi.Aggiungere al modello con l’età continua l’interazione tra il trattamento e il generequietly xi:logit improve trt sex age_cenestimates store Axi: logit improve trt sex i.trt*sexestimates store Bage_ceni.trt _Itrt_0-1 (naturally coded; _Itrt_0 omitted)i.trt*sex _ItrtXsex_# (coded as above)note: _Itrt_1 dropped because of collinearitynote: sex dropped because of collinearityIteration 0: log likelihood = -58.224363Iteration 1: log likelihood = -46.280111Iteration 2: log likelihood = -45.830035Iteration 3: log likelihood = -45.817973Iteration 4: log likelihood = -45.817937Logistic regression Number of obs = 84LR chi2(4) = 24.81Prob > chi2 = 0.0001Log likelihood = -45.817937 Pseudo R2 = 0.2131------------------------------------------------------------------------------improve | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+----------------------------------------------------------------trt | 1.56216 .6096864 2.56 0.010 .367197 2.757124sex | -2.040785 1.11987 -1.82 0.068 -4.235689 .1541191_ItrtXsex_1 | .8461941 1.344667 0.63 0.529 -1.789305 3.481693age_cen | .048854 .0204109 2.39 0.017 .0088493 .0888586_cons | -.3406496 .3753771 -0.91 0.364 -1.076375 .3950761------------------------------------------------------------------------------LOGITFemale, Placebo, Age=mean -.3406496Female, Treated, Age=mean 1.2215104 = -.3406496 + 1.56216Male, Placebo, Age=mean -2.3814346 = -.3406496 - 2.040785Male, Treated, Age=mean .0269195 = -.3406496 - 2.040785 + 1.56216 + .8461941ODDSFemale, Placebo, Age=mean.71130811 = exp(-.3406496)Female, Treated, Age=mean3.3923076 = exp(1.2215104)Male, Placebo, Age=mean .0924179 = exp(-2.3814346)Male, Treated, Age=mean 1.0272851 = exp(.0269195)ODDS RATIOFemale, Placebo, Age=mean 1Female, Treated, Age=mean 4.77Male, Placebo, Age=mean 0.13Male, Treated, Age=mean 1.44■Testare la significatività dell’interazione trx*sex me<strong>di</strong>ante likelihood ratio test.lrtest A BLikelihood-ratio test LR chi2(1) = 0.43(Assumption: A nested in B) Prob > chi2 = 0.51357