# NOT RUN {
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)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab