A small data set with non-monotone missing values.
Format
A data frame with 25 observations on the following 4 variables.
- age
Age group (1=20-39, 2=40-59, 3=60+)
- bmi
Body mass index (kg/m**2)
- hyp
Hypertensive (1=no,2=yes)
- chl
Total serum cholesterol (mg/dL)
Source
Schafer, J.L. (1997). Analysis of Incomplete Multivariate Data. London: Chapman & Hall. Table 6.14.
Details
A small data set with missing data and mixed numerical and discrete
variables. The data set nhanes
is the same data set, but with all data
treated as numerical.
Examples
# create 5 imputed data sets
imp <- mice(nhanes2)
#>
#> iter imp variable
#> 1 1 bmi hyp chl
#> 1 2 bmi hyp chl
#> 1 3 bmi hyp chl
#> 1 4 bmi hyp chl
#> 1 5 bmi hyp chl
#> 2 1 bmi hyp chl
#> 2 2 bmi hyp chl
#> 2 3 bmi hyp chl
#> 2 4 bmi hyp chl
#> 2 5 bmi hyp chl
#> 3 1 bmi hyp chl
#> 3 2 bmi hyp chl
#> 3 3 bmi hyp chl
#> 3 4 bmi hyp chl
#> 3 5 bmi hyp chl
#> 4 1 bmi hyp chl
#> 4 2 bmi hyp chl
#> 4 3 bmi hyp chl
#> 4 4 bmi hyp chl
#> 4 5 bmi hyp chl
#> 5 1 bmi hyp chl
#> 5 2 bmi hyp chl
#> 5 3 bmi hyp chl
#> 5 4 bmi hyp chl
#> 5 5 bmi hyp chl
# print the first imputed data set
complete(imp)
#> age bmi hyp chl
#> 1 20-39 25.5 no 118
#> 2 40-59 22.7 no 187
#> 3 20-39 26.3 no 187
#> 4 60-99 22.7 yes 218
#> 5 20-39 20.4 no 113
#> 6 60-99 21.7 yes 184
#> 7 20-39 22.5 no 118
#> 8 20-39 30.1 no 187
#> 9 40-59 22.0 no 238
#> 10 40-59 24.9 no 204
#> 11 20-39 29.6 no 187
#> 12 40-59 22.0 no 229
#> 13 60-99 21.7 no 206
#> 14 40-59 28.7 yes 204
#> 15 20-39 29.6 no 238
#> 16 20-39 29.6 no 238
#> 17 60-99 27.2 yes 284
#> 18 40-59 26.3 yes 199
#> 19 20-39 35.3 no 218
#> 20 60-99 25.5 yes 206
#> 21 20-39 22.5 no 238
#> 22 20-39 33.2 no 229
#> 23 20-39 27.5 no 131
#> 24 60-99 24.9 no 206
#> 25 40-59 27.4 no 186