impute_variables: Impute missing observations for a given Dataset

Description Usage Arguments Value See Also

Description

Impute missing observations for a given dataset. Missing observations can be imputed using the mean, the mode, multiple linear regression or binominal logistic regression. When using mice package, the NA values must only be in one column.

Usage

1
2
3
impute_variables(dataset, percentage = NULL, y_index = NULL,
  type = c("mean", "mode", "mice"), method = c("cart", "rf", "norm.predict",
  "norm.boot", "logreg", "logreg.boot"), file_name = NULL, directory = NULL)

Arguments

dataset

The dataset that the power terms are derived from

percentage

The percentage specifies identifies the attributes with a missing number of observations

y_index

A natural number specifying the column in the data frame to be imputed

type

The type of imputation to be used. Either "mean", "mode" or "mice".

method

The method of imputation to be used in conjungtion with type equal to mice.

file_name

A character object indicating the file name when saving the data frame. The default is NULL. The name must include the .csv suffixs.

directory

A character object specifying the directory where the data frame is to be saved as a .csv file.

Value

Outputs the imputed data as a data frame

See Also

remove_variables, derive_variables, extract_variables, standardise_variables, transform_variables


oislen/BuenaVista documentation built on May 16, 2019, 8:12 p.m.