imputeRough: Naive Imputation of Missing Values for Dummy Variable Model...

Description Usage Arguments Details Value Author(s) Examples

View source: R/imputeRough.R

Description

After generating a cell means model matrix, impute expected values (mean or median for continous; hightest frequency for categorical).

Usage

1
imputeRough(data, Init = "mean")

Arguments

data

a dataset with missing values

Init

For continous variables impute either the mean or median

Details

A completed data frame is returned that mirrors a model.matrix. NAs are replaced with column means or medians. If object contains no NAs, it is returned unaltered. This is the starting point for imputeEM.

Value

imputeRough returns a list containing the following components:

Initials

Imputed values

Pre.Imputed

Pre-imputed data frame

Imputed.Dataframe

Imputed data frame

Author(s)

Nelson Lee Afanador (nelson.afanador@mvdalab.com)

Examples

1
2
dat <- introNAs(iris, percent = 25)
imputeRough(dat)

mvdalab documentation built on May 30, 2017, 2:40 a.m.

Search within the mvdalab package
Search all R packages, documentation and source code