yrbs: One variable from the Youth Risk Behaviors Survey, 2015.

Description Usage Format Source References Examples

Description

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.

Usage

1
data("yrbs")

Format

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

Source

ftp://ftp.cdc.gov/pub/data/yrbs/2015smy/ for files

References

Centers for Disease Control and Prevention (2016) Software for Analysis of YRBS Data.https://www.cdc.gov/healthyyouth/data/yrbs/pdf/2015/2015_yrbs_analysis_software.pdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

## to print more digits: matches SUDAAN and SPSS exactly, per table 3 of reference
coef(ci)
SE(ci)
attr(ci,"ci")


Search within the survey package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.