VarSelImputation: Imputation of missing values

Description Usage Arguments Examples

View source: R/Imputation.R

Description

This function permits imputation of missing values in a dataset by using mixture model. Two methods can be used for imputation:

Usage

1
VarSelImputation(obj, newdata, method = "postmean")

Arguments

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"

Examples

 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)

VarSelLCM documentation built on Oct. 23, 2020, 8:20 p.m.