MulaiMulai sekarang secara gratis

Survey statistics

How many hours of sleep does the average person in the US get each night? Does sleep vary by gender? Let's explore these questions using the variables Gender and SleepHrsNight. SleepHrsNight contains the self-reported number of hours a participant usually sleeps on a weeknight and is only reported for participants who were at least 16 years old.

Latihan ini adalah bagian dari kursus

Analyzing Survey Data in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Compute the survey-weighted mean
svy___(x = ___, 
       design = NHANES_design,
       na.rm = TRUE)
Edit dan Jalankan Kode