Learn R Programming

DriveML (version 0.1.5)

autoMAR: Function to identify and generate the Missing at Random features (MAR)

Description

This function will automatically identify the missing patterns and flag the variables if they are not missing at random based on the AUC method

Usage

autoMAR(
  data,
  aucv = 0.9,
  strataname = NULL,
  stratasize = NULL,
  mar_method = "glm"
)

Value

list output including missing variable summary and number of MAR flag variables

Arguments

data

[data.frame | Required] dataframe or data.table

aucv

[integer | Optional] auc cut-off value for the not missing at random variable selection

strataname

[text | Optional] vector of stratification variables

stratasize

[integer | Optional] vector of stratum sample sizes (in the order in which the strata are given in the input dataset).

mar_method

[text | Optional] missing at random classification method ("glm", "rf"). Default GLM is used (GLM runs faster for high dimensional data)

Examples

Run this code
# create missing at random features
marobj <- autoMAR (heart, aucv = 0.9, strataname = NULL, stratasize = NULL, mar_method = "glm")

Run the code above in your browser using DataLab