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)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)
Source
Derived from the National Health Interview Survey (NHIS), 1997–2008 cycles, conducted by the U.S. National Center for Health Statistics (NCHS).
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
data(sp2)
str(sp2)
#> 'data.frame': 35525 obs. of 11 variables:
#> $ agecat : Factor w/ 4 levels "1","2","3","4": 3 1 3 1 4 4 1 1 1 1 ...
#> $ marital : Factor w/ 4 levels "1","2","3","4": 2 1 4 1 1 2 2 3 1 1 ...
#> $ race : Factor w/ 4 levels "1","2","3","4": 3 3 3 3 3 3 2 2 2 3 ...
#> $ employment : Factor w/ 2 levels "0","1": 2 2 1 2 2 1 1 1 1 1 ...
#> $ diabetes : Factor w/ 2 levels "0","1": 2 2 1 1 1 1 1 2 2 1 ...
#> $ BMI : Factor w/ 4 levels "Morbidly Obese",..: 2 2 4 2 3 4 2 4 1 3 ...
#> $ smoking : Factor w/ 3 levels "1","2","3": 1 1 2 3 2 2 3 3 2 1 ...
#> $ comorbidity: Factor w/ 2 levels "0","1": 2 2 2 1 1 1 2 2 2 2 ...
#> $ wts_sp2 : int 2466 8271 2913 9368 3401 1701 2253 2255 5829 1452 ...
#> $ strata_sp2 : num 5095 5152 5152 5325 5171 ...
#> $ psu_sp2 : int 2 1 1 2 1 1 2 2 2 1 ...
summary(sp2)
#> agecat marital race employment diabetes BMI
#> 1:11301 1:23745 1:26172 0:19102 0:29867 Morbidly Obese: 1872
#> 2: 9357 2: 2603 2: 4322 1:16423 1: 5658 Normal : 9071
#> 3: 8142 3: 6615 3: 3813 Obese : 6309
#> 4: 6725 4: 2562 4: 1218 Overweight :18273
#>
#>
#> smoking comorbidity wts_sp2 strata_sp2 psu_sp2
#> 1:12356 0:14942 Min. : 728 Min. :5001 Min. :1.000
#> 2:15985 1:20583 1st Qu.: 4126 1st Qu.:5101 1st Qu.:1.000
#> 3: 7184 Median : 6683 Median :5209 Median :2.000
#> Mean : 7185 Mean :5379 Mean :1.503
#> 3rd Qu.: 8835 3rd Qu.:5323 3rd Qu.:2.000
#> Max. :81902 Max. :6300 Max. :2.000