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

Estimating quantiles

In addition to the mean, we may also be interested in a quantile such as the 50th quantile (i.e. the median). Recall that the 50th quantile is the value of the variable which is greater than 50 percent of the data. By exploring the quantiles of the data, we can get a better sense of how sleep hours is distributed across Americans. While the median tells us about the middle of our population, we might want to also know how much sleep the bottom 1% (1st quantile) or the top 1% (99th quantile) typically get.

Bu egzersiz

Analyzing Survey Data in R

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Compute the survey-weighted quantiles
svyquantile(x = ___, 
            design = NHANES_design, 
            na.rm = TRUE, 
            quantiles = ___)
Kodu Düzenle ve Çalıştır