corp_miss {quest}R Documentation

Point-biserial Correlations of Missingness With Significant Symbols

Description

corp_miss computes (point-biserial) correlations between missingness on data columns and scores on other data columns. It also appends significance symbols at the end of the correlations.

Usage

corp_miss(
  data,
  x.nm,
  m.nm,
  ov = FALSE,
  use = "pairwise.complete.obs",
  method = "pearson",
  m.suffix = if (ov) "_ov" else "_na",
  digits = 3L,
  p.10 = "",
  p.05 = "*",
  p.01 = "**",
  p.001 = "***",
  lead.zero = FALSE,
  trail.zero = TRUE,
  plus = FALSE
)

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.

m.suffix

character vector of length 1 specifying a string to oppend to the end of the colnames to clarify whether they refer to missingness or "observedness". Default is "_na" if ov = FALSE and "_ov" if ov = TRUE.

digits

integer vector of length 1 specifying the number of decimals to round to.

p.10

character vector of length 1 specifying which symbol to append to the end of any correlation significant at the p < .10 level.

p.05

character vector of length 1 specifying which symbol to append to the end of any correlation significant at the p < .05 level.

p.01

character vector of length 1 specifying which symbol to append to the end of any correlation significant at the p < .01 level.

p.001

character vector of length 1 specifying which symbol to append to the end of any correlation significant at the p < .001 level.

lead.zero

logical vector of length 1 specifying whether to retain a zero in front of the decimal place.

trail.zero

logical vector of length 1 specifying whether to retain zeros after the decimal place (due to rounding).

plus

logical vector of length 1 specifying whether to include a plus sign in front of positive correlations (minus signs are always in front of negative correlations).

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


corp_miss(data = airquality, x.nm = c("Wind","Temp","Month","Day"),
   m.nm = c("Ozone","Solar.R"))
corp_miss(data = airquality, x.nm = c("Wind","Temp","Month","Day"),
   m.nm = c("Ozone","Solar.R"), ov = TRUE) # correlations with "observedness"
corp_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]