Impute (group-wise) medians
Impute medians of group-wise medians.
impute_median( dat, formula, add_residual = c("none", "observed", "normal"), type = 7, ... )
dat |
|
formula |
|
add_residual |
|
type |
|
... |
Currently not used. |
Formulas are of the form
IMPUTED_VARIABLES ~ MODEL_SPECIFICATION [ | GROUPING_VARIABLES ]
The left-hand-side of the formula object lists the variable or variables to
be imputed. Variables in MODEL_SPECIFICATION
and/or
GROUPING_VARIABLES
are used to split the data set into groups prior to
imputation. Use ~ 1
to specify that no grouping is to be applied.
# group-wise median imputation irisNA <- iris irisNA[1:3,1] <- irisNA[4:7,2] <- NA a <- impute_median(irisNA, Sepal.Length ~ Species) head(a) # group-wise median imputation, all variables except species a <- impute_median(irisNA, . - Species ~ Species) head(a)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.