powered by
Function to sample values in a variable from other (observed) values in this variable. So this imputation does not use further covariates.
sample_imp(variable)
A vector of size n with missing values.
n
A n x 1 data.frame with the observed and imputed data
# NOT RUN { set.seed(123) sample_imp(c(1, NA, 3, NA, 5)) # }
Run the code above in your browser using DataLab