Show code for both R and Stata. Show the output from R only.
# build logistic regression model
mod <- glm(am ~ mpg, data= mtcars, family = binomial)
# print model results
gtsummary::tbl_regression(mod, exponentiate = TRUE)
# build logistic regression model
logit am mpg
| Characteristic | OR1 | 95% CI1 | p-value |
|---|---|---|---|
| mpg | 1.36 | 1.13, 1.80 | 0.008 |
|
1
OR = Odds Ratio, CI = Confidence Interval
|
|||