SeqimputeEM: Sequential Expectation Maximization (EM) for imputation of...

View source: R/SeqimputeEM.R

SeqimputeEMR Documentation

Sequential Expectation Maximization (EM) for imputation of missing values.

Description

Missing values are sequentially updated via an EM algorithm.

Usage

SeqimputeEM(data, max.ncomps = 5, max.ssq = 0.99, Init = "mean", 
            adjmean = FALSE, max.iters = 200, 
            tol = .Machine$double.eps^0.25)

Arguments

data

a dataset with missing values.

max.ncomps

integer corresponding to the maximum number of components to test

max.ssq

maximal SSQ for final number of components. This will be improved by automation.

Init

For continous variables impute either the mean or median.

adjmean

Adjust (recalculate) mean after each iteration.

max.iters

maximum number of iterations for the algorithm.

tol

the threshold for assessing convergence.

Details

A completed data frame is returned that mirrors the model matrix. NAs are replaced with convergence values as obtained via Seqential EM algorithm. If object contains no NAs, it is returned unaltered.

Value

Imputed.DataFrames

A list of imputed data frames across impute.comps

ncomps

number of components to test

Author(s)

Thanh Tran (thanh.tran@mvdalab.com), Nelson Lee Afanador (nelson.afanador@mvdalab.com)

References

NOTE: Publication Pending

Examples

dat <- introNAs(iris, percent = 25)
SeqimputeEM(dat)

mvdalab documentation built on Oct. 6, 2022, 1:05 a.m.