Get startedGet started for free

Evaluating the effectiveness of stem cell treatment (cont.)

Conduct the hypothesis test and compute the p-value for evaluating whether there is a difference between the mean heart pumping capacities of sheep's hearts in the control and treatment groups.

Since we're testing for a difference, the order in which we subtract matters. We can specify it using the order argument in the calculate() function. For example, to achieve group1 - group2 use order = c("group1", "group2").

This exercise is part of the course

Inference for Numerical Data in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

n_replicates <- 1000

# Generate 1000 differences in means via randomization
diff_mean_ht <- stem.cell %>%
  # y ~ x
  specify(___ ~ ___) %>% 
  # Null = no difference between means
  hypothesize(null = "___") %>% 
  # Shuffle labels 1000 times
  generate(reps = ___, type = "___") %>% 
  # Calculate test statistic
  calculate(stat = "___", order = c("esc", "___") 
Edit and Run Code