| nhanes_sxq {svyVGAM} | R Documentation |
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")
Format
A data frame with 2992 observations on the following 7 variables.
SDMVPSUPrimary Sampling Unit
SDMVSTRAstratum
WTINT2YRweights
malepartnerslifetime number of male sexual partners
RIDAGEYRage in years
DMDEDUClevel of education: 1=less than high school, 2=high school, 3-more than high school, 7=refused
RIDRETH1Race/ethnicity: 1=Mexican American, 2=Other Hispanic, 4=non-Hispanic White, 5=non-Hispanic Black, 5=Other
Source
NHANES files demo_c.xpt and sxq_c.xpt
See Also
Construction of the data set is described by https://notstatschat.rbind.io/2015/05/26/zero-inflated-poisson-from-complex-samples/
Examples
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")
[Package svyVGAM version 1.2 Index]