cor_miss {quest}R Documentation

Point-biserial Correlations of Missingness

Description

cor_miss computes (point-biserial) correlations between missingness on data columns and scores on other data columns.

Usage

cor_miss(
  data,
  x.nm,
  m.nm,
  ov = FALSE,
  use = "pairwise.complete.obs",
  method = "pearson"
)

Arguments

data

data.frame of data.

x.nm

character vector of colnames in data to be the predictors of missingness.

m.nm

character vector of colnames in data to specify missing data on.

ov

logical vector of length 1 specifying whether the correlations should be with "observedness" rather than missingness.

use

character vector of length 1 specifying how to deal with missing data in the predictor columns. See cor.

method

character vector of length 1 specifying what type of correlations to compute. See cor.

Details

cor_miss calls make.dumNA to create dummy vectors representing missingness on the data[m.nm] columns.

Value

numeric matrix of (point-biserial) correlations between rows of predictors and columns of missingness.

Examples


cor_miss(data = airquality, x.nm = c("Wind","Temp","Month","Day"),
   m.nm = c("Ozone","Solar.R"))
cor_miss(data = airquality, x.nm = c("Wind","Temp","Month","Day"),
   m.nm = c("Ozone","Solar.R"), ov = TRUE) # correlations with "observedness"
cor_miss(data = airquality, x.nm = c("Wind","Temp","Month","Day"),
   m.nm = c("Ozone","Solar.R"), use = "complete.obs", method = "kendall")


[Package quest version 0.2.0 Index]