ComenzarEmpieza gratis

p-value

Now that you have created the null sampling distribution, you can use it to find the p-value associated with the original slope statistic from the twins data. Although you might first consider this to be a one-sided research question, instead, use the absolute value function for practice performing two-sided tests on a slope coefficient.

You can calculate the proportion of TRUE values in a logical vector using mean(). For example, given a numeric vector x, the proportion of cases where x is greater than or equal to 10 can be calculated using mean(x >= 10).

Este ejercicio forma parte del curso

Inference for Linear Regression in R

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# Run a lin. reg. of Foster vs. Biological on twins
abs_obs_slope <- ___ %>%
  # Tidy the result
  ___ %>%   
  # Filter for rows where term equals Biological
  ___ %>%
  # Pull out the estimate
  ___ %>%
  # Take the absolute value
  ___
Editar y ejecutar código