make.where | R Documentation |
where
argumentThis helper function creates a valid where
matrix. The
where
matrix is an argument to the mice
function.
It has the same size as data
and specifies which values
are to be imputed (TRUE
) or nor (FALSE
).
make.where(data, keyword = c("missing", "all", "none", "observed"))
data |
A |
keyword |
An optional keyword, one of |
A matrix with logical
make.blocks
, make.predictorMatrix
head(make.where(nhanes), 3)
# create & analyse synthetic data
where <- make.where(nhanes2, "all")
imp <- mice(nhanes2,
m = 10, where = where,
print = FALSE, seed = 123
)
fit <- with(imp, lm(chl ~ bmi + age + hyp))
summary(pool.syn(fit))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.