= Stata Logistic = The '''`logistic`''' command runs a logistic regression. <> ---- == Usage == Adapted from [[https://stats.idre.ucla.edu/stata/dae/logistic-regression/|here]]: {{{ . use https://stats.idre.ucla.edu/stat/stata/dae/binary, clear . logistic admit gre gpa i.rank Logistic regression Number of obs = 400 LR chi2(5) = 41.46 Prob > chi2 = 0.0000 Log likelihood = -229.25875 Pseudo R2 = 0.0829 ------------------------------------------------------------------------------ admit | Odds ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- gre | 1.002267 .0010965 2.07 0.038 1.00012 1.004418 gpa | 2.234545 .7414652 2.42 0.015 1.166122 4.281877 | rank | 2 | .5089309 .1610714 -2.13 0.033 .2736922 .9463578 3 | .2617923 .0903986 -3.88 0.000 .1330551 .5150889 4 | .2119375 .0885542 -3.71 0.000 .0934435 .4806919 | _cons | .0185001 .0210892 -3.50 0.000 .0019808 .1727834 ------------------------------------------------------------------------------ Note: _cons estimates baseline odds. }}} Compare the output of [[Stata/Logit|logit]], which ordinarily shows coefficients rather than odds ratios. See [[Stata/Regress#Factor_Variables|here]] for details on factor variables. ---- == See also == [[https://www.stata.com/manuals/rlogisticpostestimation.pdf|Stata manual for logistic post-estimation]] ---- CategoryRicottone