Course Outline
- 
        segmentGetting Started (Don't Skip This Part)
- 
        segmentStatistics and Data Science: A Modeling Approach
- 
        segmentPART I: EXPLORING VARIATION
- 
        segmentChapter 1 - Welcome to Statistics: A Modeling Approach
- 
        segmentChapter 2 - Understanding Data
- 
        segmentChapter 3 - Examining Distributions
- 
        segmentChapter 4 - Explaining Variation
- 
        segmentPART II: MODELING VARIATION
- 
        segmentChapter 5 - A Simple Model
- 
        segmentChapter 6 - Quantifying Error
- 
        segmentChapter 7 - Adding an Explanatory Variable to the Model
- 
        segmentChapter 8 - Digging Deeper into Group Models
- 
        segmentChapter 9 - Models with a Quantitative Explanatory Variable
- 
        segmentPART III: EVALUATING MODELS
- 
        segmentChapter 10 - The Logic of Inference
- 
        segmentChapter 11 - Model Comparison with F
- 
                
                  11.10 Chapter 11 Review Questions 2
 
- 
        segmentChapter 12 - Parameter Estimation and Confidence Intervals
- 
        segmentChapter 13 - What You Have Learned
- 
        segmentFinishing Up (Don't Skip This Part!)
- 
        segmentResources
list High School / Advanced Statistics and Data Science I (ABC)
      
        
        
          
Book          
        
        
      
      
        
      
      
    
    
  11.10 Chapter 11 Review Questions 2
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 hereCK Code: C2_Code_Review2_01
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)
# Boxplots 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_modelCK Code: C2_Code_Review2_02
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)CK Code: C2_Code_Review2_03