mice.impute.2lonly.mean {mice} | R Documentation |
Imputes the mean of within the class
mice.impute.2lonly.mean(y, ry, x, type, ...)
y |
Incomplete data vector of length |
ry |
Vector of missing data pattern ( |
x |
Matrix ( |
type |
Vector of length |
... |
Other named arguments. |
Observed values in y
are averaged within the class, and replicated to
the missing y
within that class. If there are no observed data in the
class, all entries of the class are set to NaN
. This function is
primarily useful for repairing incomplete data that are constant within the
class, but that vary over the classes.
A vector of length nmis
with imputations.
Gerko Vink, Stef van Buuren, 2013