Learn R Programming

nonprobsampling (version 0.1.0)

sp2: Probability Reference Sample 2 (sp2)

Description

This dataset represents a probability survey derived from the 1997--2008 cycles of the National Health Interview Survey (NHIS). It is intended for use alongside sc and sp1 to illustrate the multi-reference calibration method implemented in the nonprobsampling package.

Usage

data(sp2)

Arguments

Format

A data frame with 35525 observations and 11 variables:

agecat

Age category (factor with 4 levels: 1 = 55--59, 2 = 60--64, 3 = 65--69, 4 = 70+)

marital

Marital status (factor with 4 levels: 1 = Married Or Living As Married, 2 = Widowed, 3 = Divorced or Separated, 4 = Never Married)

race

Race category (factor with 4 levels: 1 = White, 2 = Black, 3 = Hispanic, 4 = Other)

employment

Employment status (factor with 2 levels: 0 = Not Working, 1 = Working)

diabetes

Diabetes diagnosis indicator (factor with 2 levels: 0 = No, 1 = Yes)

BMI

Body mass index category (factor with 4 levels: "Normal", "Overweight", "Obese", "Morbidly Obese")

smoking

Smoking status (factor with 3 levels: 1 = Never Smoker, 2 = Former Smoker, 3 = Current Smoker)

comorbidity

General comorbidity indicator (factor with 2 levels: 0 = No, 1 = Yes)

wts_sp2

Sampling weights (numeric)

strata_sp2

Stratum identifier for complex survey design (numeric)

psu_sp2

Primary sampling unit identifier for complex survey design (numeric)

Details

The dataset includes auxiliary variables shared with the nonprobability sample sc, enabling the construction of pseudo-weights to adjust for participation bias. Survey design variables and sampling weights are provided to support design-consistent estimation.

Examples

Run this code
data(sp2)
str(sp2)
summary(sp2)

Run the code above in your browser using DataLab