nhanes: NHANES example - all variables numerical

Description Format Details Source See Also Examples

Description

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)

Details

A small data set with all numerical variables. The data set nhanes2 is the same data set, but with age and hyp treated as factors.

Source

Schafer, J.L. (1997). Analysis of Incomplete Multivariate Data. London: Chapman & Hall. Table 6.14.

See Also

nhanes2

Examples

1
2
3
4
5
# create 5 imputed data sets
imp <- mice(nhanes)

# print the first imputed data set
complete(imp)

Example output

Attaching package:miceThe following object is masked frompackage:stats:

    filter

The following objects are masked frompackage:base:

    cbind, rbind


 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
   age  bmi hyp chl
1    1 30.1   1 199
2    2 22.7   1 187
3    1 22.0   1 187
4    3 22.5   1 229
5    1 20.4   1 113
6    3 22.5   1 184
7    1 22.5   1 118
8    1 30.1   1 187
9    2 22.0   1 238
10   2 26.3   2 218
11   1 24.9   1 131
12   2 30.1   1 218
13   3 21.7   1 206
14   2 28.7   2 204
15   1 29.6   1 199
16   1 22.5   1 131
17   3 27.2   2 284
18   2 26.3   2 199
19   1 35.3   1 218
20   3 25.5   2 218
21   1 27.2   1 238
22   1 33.2   1 229
23   1 27.5   1 131
24   3 24.9   1 204
25   2 27.4   1 186

mice documentation built on Nov. 14, 2020, 5:07 p.m.

Related to nhanes in mice...