เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

SE of the slope

The previous exercise generated 10 different slopes under a model of no (i.e., null) relationship between the explanatory and response variables. Now repeat the null slope calculations 1000 times to derive a null sampling distribution for the slope coefficient. The null sampling distribution will be used as a benchmark against which to compare the original data. Then, you'll calculate the mean and standard deviation of the null sampling distribution for the slope.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Inference for Linear Regression in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Simulate 500 slopes with a permuted dataset
perm_slope <- twins %>%
  # Specify Foster vs. Biological
  ___ %>%
  # Use a null hypothesis of independence
  ___ %>%
  # Generate 500 permutation replicates
  ___ %>%
  # Calculate the slope statistic
  ___ 
แก้ไขและรันโค้ด