Course Outline
-
segmentGetting Started (Don't Skip This Part)
-
segmentStatistics and Data Science II
-
segmentPART I: EXPLORING AND MODELING VARIATION
-
segmentChapter 1 - Exploring Data with R
-
segmentChapter 2 - From Exploring to Modeling Variation
-
segmentChapter 3 - Modeling Relationships in Data
-
segmentPART II: COMPARING MODELS TO MAKE INFERENCES
-
segmentChapter 4 - The Logic of Inference
-
segmentChapter 5 - Model Comparison with F
-
5.15 Chapter 5 Review Questions 2
-
segmentChapter 6 - Parameter Estimation and Confidence Intervals
-
segmentPART III: MULTIVARIATE MODELS
-
segmentChapter 7 - Introduction to Multivariate Models
-
segmentChapter 8 - Multivariate Model Comparisons
-
segmentChapter 9 - Models with Interactions
-
segmentChapter 10 - More Models with Interactions
-
segmentFinishing Up (Don't Skip This Part!)
-
segmentResources
list High School / Statistics and Data Science II (XCD)
Book
5.15 Chapter 5 Review Questions 2
NOTE: Depending on your internet connection, this page may take a moment to load. In order to avoid automatic scrolling of the page, please wait until all of the questions have fully loaded before submitting responses.
require(coursekata)
link <- "https://docs.google.com/spreadsheets/d/e/2PACX-1vSZozH-r8y8XkIQ71eLTKL94R8Unkw41KqCJFmbvRlU-jcphybc4X_WVNZTvAH1_-4l4tx7wWSIH0Rk/pub?output=csv"
san_andreas <- read.csv(link, header=TRUE)
san_andreas$experience <- as.factor(san_andreas$experience)
san_andreas$will_occur <- as.factor(san_andreas$will_occur)
san_andreas$worry_general <- recode(san_andreas$worry_general, "Not at all worried" = 1, "Not so worried" = 2, "Somewhat worried" = 3, "Very worried" = 4, "Extremely worried"= 5)
san_andreas$worry_bigone <- recode(san_andreas$worry_bigone, "Not at all worried" = 1, "Not so worried" = 2, "Somewhat worried" = 3, "Very worried" = 4, "Extremely worried"= 5)
san_andreas$experience <- factor(san_andreas$experience, levels = c("No", "Yes, one or more minor ones", "Yes, one or more major ones"))
san_andreas <- na.omit(san_andreas)
# run your code here
require(coursekata)
link <- "https://docs.google.com/spreadsheets/d/e/2PACX-1vSZozH-r8y8XkIQ71eLTKL94R8Unkw41KqCJFmbvRlU-jcphybc4X_WVNZTvAH1_-4l4tx7wWSIH0Rk/pub?output=csv"
san_andreas <- read.csv(link, header=TRUE)
san_andreas$experience <- as.factor(san_andreas$experience)
san_andreas$will_occur <- as.factor(san_andreas$will_occur)
san_andreas$worry_general <- recode(san_andreas$worry_general, "Not at all worried" = 1, "Not so worried" = 2, "Somewhat worried" = 3, "Very worried" = 4, "Extremely worried"= 5)
san_andreas$worry_bigone <- recode(san_andreas$worry_bigone, "Not at all worried" = 1, "Not so worried" = 2, "Somewhat worried" = 3, "Very worried" = 4, "Extremely worried"= 5)
san_andreas$experience <- factor(san_andreas$experience, levels = c("No", "Yes, one or more minor ones", "Yes, one or more major ones"))
san_andreas <- na.omit(san_andreas)
# Box Plots and Histograms
gf_boxplot(worry_bigone ~ experience, data = san_andreas)
gf_histogram(~worry_bigone, data = san_andreas, bins = 5) %>%
gf_facet_grid(experience~.)
# Write some code to fit and save exp_model
require(coursekata)
link <- "https://docs.google.com/spreadsheets/d/e/2PACX-1vSZozH-r8y8XkIQ71eLTKL94R8Unkw41KqCJFmbvRlU-jcphybc4X_WVNZTvAH1_-4l4tx7wWSIH0Rk/pub?output=csv"
san_andreas <- read.csv(link, header=TRUE)
san_andreas$experience <- as.factor(san_andreas$experience)
san_andreas$will_occur <- as.factor(san_andreas$will_occur)
san_andreas$worry_general <- recode(san_andreas$worry_general, "Not at all worried" = 1, "Not so worried" = 2, "Somewhat worried" = 3, "Very worried" = 4, "Extremely worried"= 5)
san_andreas$worry_bigone <- recode(san_andreas$worry_bigone, "Not at all worried" = 1, "Not so worried" = 2, "Somewhat worried" = 3, "Very worried" = 4, "Extremely worried"= 5)
san_andreas$experience <- factor(san_andreas$experience, levels = c("No", "Yes, one or more minor ones", "Yes, one or more major ones"))
san_andreas <- na.omit(san_andreas)
exp_model <- lm(worry_bigone ~ experience, data = san_andreas)
# Run this code
pairwise(exp_model)