Learn R Programming

svyVGAM (version 1.2)

nhanes_sxq: Data from NHANES: number of sex partners

Description

These data are from the NHANES 2003-2004 survey in the US. They provide an example of overdispersed count data that motivates a two-component zero-inflation model

Usage

data("nhanes_sxq")

Arguments

Format

A data frame with 2992 observations on the following 7 variables.

SDMVPSU

Primary Sampling Unit

SDMVSTRA

stratum

WTINT2YR

weights

malepartners

lifetime number of male sexual partners

RIDAGEYR

age in years

DMDEDUC

level of education: 1=less than high school, 2=high school, 3-more than high school, 7=refused

RIDRETH1

Race/ethnicity: 1=Mexican American, 2=Other Hispanic, 4=non-Hispanic White, 5=non-Hispanic Black, 5=Other

See Also

Examples

Run this code
data(nhanes_sxq)
nhdes = svydesign(id=~SDMVPSU,strat=~SDMVSTRA,weights=~WTINT2YR, nest=TRUE, data=nhanes_sxq)
svy_vglm(malepartners~RIDAGEYR+factor(RIDRETH1)+DMDEDUC, zipoisson(), design=nhdes, crit = "coef")

Run the code above in your browser using DataLab