yrbs.Rd
Design information from the Youth Risk Behaviors Survey (YRBS), together with the single variable `Never/Rarely wore bike helmet'. Used as an analysis example by CDC.
data("yrbs")
A data frame with 15624 observations on the following 4 variables.
weight
sampling weights
stratum
sampling strata
psu
primary sampling units
qn8
1=Yes, 2=No
ftp://ftp.cdc.gov/pub/data/yrbs/2015smy/ for files
Centers for Disease Control and Prevention (2016) Software for Analysis of YRBS Data. Previously at https://www.cdc.gov/healthyyouth/data/yrbs/pdf/2015/2015_yrbs_analysis_software.pdf
data(yrbs)
yrbs_design <- svydesign(id=~psu, weight=~weight, strata=~stratum,
data=yrbs)
yrbs_design <- update(yrbs_design, qn8yes=2-qn8)
ci <- svyciprop(~qn8yes, yrbs_design, na.rm=TRUE, method="xlogit")
ci
#> 2.5% 97.5%
#> qn8yes 0.814 0.770 0.85
## to print more digits: matches SUDAAN and SPSS exactly, per table 3 of reference
coef(ci)
#> 2.5% 97.5%
#> qn8yes 0.814 0.770 0.85
SE(ci)
#> as.numeric(qn8yes)
#> 0.02008901
attr(ci,"ci")
#> 2.5% 97.5%
#> 0.7696221 0.8508478