BaşlayınÜcretsiz Başlayın

Comparing randomization inference and t-inference

When technical conditions (see next chapter) hold, the inference from the randomization test and the t-distribution test should give equivalent conclusions. They will not provide the exact same answer because they are based on different methods. But they should give p-values and confidence intervals that are reasonably close.

Bu egzersiz

Inference for Linear Regression in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Calculate the absolute value of the observed slope, obs_slope.
  • Add a column to perm_slope of the absolute value of the slope in each permuted replicate. The slope column is called stat.
  • In the call to summarize(), calculate the p-value as the proportion of absolute estimates of slope that are at least as extreme as the absolute observed estimate of slope.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# The slope in the observed data and each permutation replicate
obs_slope
perm_slope

# Calculate the absolute value of the observed slope
abs_obs_slope <- ___

# Find the p-value
perm_slope %>%
  # Add a column for the absolute value of stat
  ___ %>%
  summarize(
    # Calculate prop'n permuted values at least as extreme as observed
    p_value = ___
  )
Kodu Düzenle ve Çalıştır