Description Usage Arguments Details Value Author(s) Examples
logit()
produces summary of the model with
coefficients or odds ratios (OR
) and 95% Confident Intervals.
1 |
model |
glm or lm model |
or |
|
digits |
specify rounding of numbers. See |
logit()
is based on glm
with binomial
family.
All statistics presented in the function's output are derivatives of
glm
,
except AIC value which is obtained from AIC
.
Outputs
Outputs can be divided into three parts.
Info of the model
:
Here provides number of observations (Obs.), chi value from Likelihood Ratio
test (LR chi2) and its degree of freedom, p-value from LR test,
Pseudo R Squared, log likelihood and AIC values.
Regression Output
:
Coefficients from summary of model are tabulated here along with 95\
confidence interval.
a list containing
info
- info and error tables
reg
- regression table
model
- raw model output from lm()
fit
- formula for fitting the model
lbl
- variable labels for further processing in summary
.
Email: dr.myominnoo@gmail.com
Website: https://myominnoo.github.io/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | mylogit <- glm(case ~ education + age + parity, family = binomial,
data = infert)
logit(mylogit)
## Not run:
## Example from UCLA website:
## LOGIT REGRESSION | R DATA ANALYSIS EXAMPLES
## https://stats.idre.ucla.edu/r/dae/logit-regression/
mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv")
mydata <- replace(mydata, rank, factor(rank))
mydata <- label(mydata, gre = "GRE", gpa = "GPA score", rank = "Ranking")
mylogit <- glm(admit ~ gre + gpa + rank, data = mydata, family = "binomial")
## Showing Odds Ratios
logit(mylogit)
## Showing coefficients
logit(mylogit, or = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.