Description Usage Arguments Examples
This function permits imputation of missing values in a dataset by using mixture model. Two methods can be used for imputation:
posterior mean (method="postmean")
sampling from the full conditionnal distribution (method="sampling")
1 | VarSelImputation(obj, newdata, method = "postmean")
|
obj |
an instance of VSLCMresults which defines the model used for imputation. |
newdata |
data.frame Dataset containing the missing values to impute. |
method |
character definiting the method of imputation: "postmean" or "sampling" |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Data loading
data("heart")
# Clustering en 2 classes
results <- VarSelCluster(heart[,-13], 2)
# Data where missing values will be imputed
newdata <- heart[1:2,-13]
newdata[1,1] <- NA
newdata[2,2] <- NA
# Imputation
VarSelImputation(results, newdata)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.