Hi
What is the easiest way of getting a CI for the odds ratio for a SD increase in a continuous independent variable in a logistic regression?
In the code below, the listcoef command (in the spost_ado.pkg package) gives OR of 1.492 for a SD increase in gpa (in a logistic regression model with the admit variable as the outcome).
What's the easiest way of getting a 95% CI for that value? I am looking for a prewritten program, rather than creating a variable such as gpa/sd(gpa) every time or calculating the interval myself from returned values. I'm lazy.
Thanks,
Jane
What is the easiest way of getting a CI for the odds ratio for a SD increase in a continuous independent variable in a logistic regression?
In the code below, the listcoef command (in the spost_ado.pkg package) gives OR of 1.492 for a SD increase in gpa (in a logistic regression model with the admit variable as the outcome).
What's the easiest way of getting a 95% CI for that value? I am looking for a prewritten program, rather than creating a variable such as gpa/sd(gpa) every time or calculating the interval myself from returned values. I'm lazy.
Thanks,
Jane
Code:
. * would install spost13_ado if not already installed
. * net install spost13_ado.pkg
. use https://stats.idre.ucla.edu/stat/stata/dae/binary.dta, clear
. logistic admit gpa
Logistic regression Number of obs = 400
LR chi2(1) = 13.01
Prob > chi2 = 0.0003
Log likelihood = -243.48381 Pseudo R2 = 0.0260
------------------------------------------------------------------------------
admit | Odds ratio Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
gpa | 2.860821 .8550121 3.52 0.000 1.592548 5.139121
_cons | .0128093 .0132616 -4.21 0.000 .0016837 .0974513
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
. listcoef, help
logit (N=400): Factor change in odds
Odds of: 1 vs 0
------------------------------------------------------------------------
| b z P>|z| e^b e^bStdX SDofX
-------------+----------------------------------------------------------
gpa | 1.0511 3.517 0.000 2.861 1.492 0.381
constant | -4.3576 -4.209 0.000 . . .
------------------------------------------------------------------------
b = raw coefficient
z = z-score for test of b=0
P>|z| = p-value for z-test
e^b = exp(b) = factor change in odds for unit increase in X
e^bStdX = exp(b*SD of X) = change in odds for SD increase in X
SDofX = standard deviation of X

Comment