以自助法(bootstrap)產生樣本
為了評估你對於「對科學界具有『High』信心」人數估計的不確定性,你需要計算標準誤。先從只建立一個自助法樣本,思考資料可能會有多不同開始。
本練習屬於課程
R 中的類別資料推論
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Load the infer package
___
# Create single bootstrap dataset
boot1 <- gss2016 %>%
# Specify the response
___(response = ___, success = "___") %>%
# Generate one bootstrap replicate
___(reps = ___, type = "___")
# See the result
boot1