VarSelImputation: Imputation of missing values

View source: R/Imputation.R

VarSelImputationR Documentation

Imputation of missing values

Description

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")

Usage

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

# 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 Sept. 19, 2025, 3:01 p.m.