Created
March 7, 2018 04:04
-
-
Save seankross/0e161e5aca6818fe912979b528df0352 to your computer and use it in GitHub Desktop.
Getting p-values out of a model, two ways
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
berkeley <- as.data.frame(UCBAdmissions) | |
model <- glm(Admit ~ Gender + Dept + Freq, data = berkeley, family = "binomial") | |
# Base R | |
model_summary <- summary(model) | |
model_summary$coefficients[,4] | |
# Or become one of the cool kids | |
library(broom) | |
tidy(model)$p.value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment