Simple median imputation of missing values

impute_median(data)

Arguments

data

A matrix or data frame object. It should have variables as columns and observations as rows.

Value

A list object with positions of missing values (positions), imputed values by observed median (imp_values) and new data with imputed values (new_data).