Aykırı bir değerin etkisi

R'de Doğrusal Regresyon için Çıkarım

Jo Hardin

Professor, Pomona College

R'de Doğrusal Regresyon için Çıkarım

Farklı regresyon doğruları

R'de Doğrusal Regresyon için Çıkarım

R'de Doğrusal Regresyon için Çıkarım

Farklı regresyon modelleri

starbucks_lowFib <- starbucks %>% filter(Fiber < 15)
lm(Protein ~ Fiber, data = starbucks) %>% tidy()
         term estimate std.error statistic      p.value
1 (Intercept) 7.526138 0.9924180  7.583637 1.101756e-11
2       Fiber 1.383684 0.2451395  5.644476 1.286752e-07
lm(Protein ~ Fiber, data = starbucks_lowFib) %>% tidy()
         term estimate std.error statistic      p.value
1 (Intercept) 6.537053 1.0633640  6.147521 1.292803e-08
2       Fiber 1.796844 0.2995901  5.997675 2.600224e-08
R'de Doğrusal Regresyon için Çıkarım

Farklı regresyon rastgeleleştirme testleri

Tam veri kümesi
perm_slope %>% mutate(
    abs_perm_slope = abs(stat)) %>%
  summarize(
    p_value = mean(
      abs_perm_slope > abs(obs_slope)
    )
  )
 A tibble: 1 x 1
  p_value
    <dbl>
1       0
Düşük lifli veri kümesi
perm_slope_lowFib %>% mutate(
  abs_perm_slope = abs(stat)) %>%
  summarize(
    p_value = mean(
      abs_perm_slope > abs(obs_slope_lowFib)
     )
   )
 A tibble: 1 x 1
  p_value
    <dbl>
1       0
R'de Doğrusal Regresyon için Çıkarım

Hadi pratik yapalım!

R'de Doğrusal Regresyon için Çıkarım

Preparing Video For Download...