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

Generate bootstrap distribution for median

When building a bootstrap distribution for a single statistic, we first generate a series of bootstrap resamples, and then record the relevant statistic (in this case, the median) of each distribution.

In this exercise, the tidyverse packages, including ggplot2 have been loaded for you, as has infer.

Bu egzersiz

Inference for Numerical Data in R

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Generate bootstrap distribution of medians
rent_med_ci <- manhattan %>%
  # Specify the variable of interest
  ___(response = ___) %>%  
  # Generate 15000 bootstrap samples
  ___(reps = ___, type = "___") %>% 
  # Calculate the median of each bootstrap sample
  ___(stat = "___")
  
# View its structure
str(rent_med_ci)
Kodu Düzenle ve Çalıştır