Hi,
I just made a logistic regression. Of the independent remained after the forward selection, I used 'margins' to get the confidence interval of the absolute risk difference. However, I would like to get another output of relative risk.
Tom
I just made a logistic regression. Of the independent remained after the forward selection, I used 'margins' to get the confidence interval of the absolute risk difference. However, I would like to get another output of relative risk.
Code:
logistic firsttherapeuticinrreached i.nonaaornonanona i.ageforttest i.af i.ttesttargetinr Logistic regression Number of obs = 187 LR chi2(4) = 25.32 Prob > chi2 = 0.0000 Log likelihood = -84.409294 Pseudo R2 = 0.1304 -------------------------------------------------------------------------------------------- firsttherapeuticinrreached | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] ---------------------------+---------------------------------------------------------------- 1.nonaaornonanona | .1526829 .073589 -3.90 0.000 .0593656 .3926867 1.ageforttest | 2.916752 1.356175 2.30 0.021 1.172531 7.255625 1.af | .3494673 .161598 -2.27 0.023 .1411888 .8649931 1.ttesttargetinr | 2.409212 1.35103 1.57 0.117 .8026778 7.231175 _cons | 4.008227 1.200546 4.64 0.000 2.228436 7.209492 -------------------------------------------------------------------------------------------- . margins i.nonaaornonanona Predictive margins Number of obs = 187 Model VCE : OIM Expression : Pr(firsttherapeuticinrreached), predict() --------------------------------------------------------------------------------- | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- nonaaornonanona | 0 | .8367911 .0286637 29.19 0.000 .7806114 .8929709 1 | .4675317 .0984477 4.75 0.000 .2745778 .6604856 --------------------------------------------------------------------------------- . margins r.nonaaornonanona Contrasts of predictive margins Model VCE : OIM Expression : Pr(firsttherapeuticinrreached), predict() --------------------------------------------------- | df chi2 P>chi2 ----------------+---------------------------------- nonaaornonanona | 1 12.88 0.0003 --------------------------------------------------- ----------------------------------------------------------------- | Delta-method | Contrast Std. Err. [95% Conf. Interval] ----------------+------------------------------------------------ nonaaornonanona | (1 vs 0) | -.3692594 .1028906 -.5709214 -.1675975 ----------------------------------------------------------------- .
Comment