Learn R Programming

recmetrics (version 0.1.0)

rec.pattern.matrix: REC Metric 3

Description

An (Number of Items)x(Number of Domains) matrix such that each row corresponds to an indicator, and the entry in column i is the average REC score for that indicator with the other indicators in domain i. This will allow one in some sense to see if certain indicators seem to have higher REC scores in a domain other than to the other in which they were assigned

Usage

rec.pattern.matrix(
  data,
  domainlist = NULL,
  domainnames = NULL,
  labels = NULL,
  na.rm = TRUE
)

Value

A single numerical value

Arguments

data

A data.frame or tibble (required)

domainlist

A list of character vectors or numeric vectors denoting the columns for each domain (required)

domainnames

A character vector supplying updated names to be attached to output

labels

A character vector supplying updated variable names to be attached to output

na.rm

logical (defaults to TRUE)

Details

[Experimental]

Examples

Run this code
  # Use the SCWB data example
  mylist <- list(
    domain_goodrel = c("cwbcloserel", "cwbrespect", "cwbtrust", "cwbmutuality"),
    domain_prolead = c("cwbbeneficence", "cwbintegrity", "cwbcompetence", "cwbvision"),
    domain_healthyprac = c("cwbrelgrowth", "cwbfairness", "cwbsustenance", "cwbachieve"),
    domain_satcomm = c("cwbsatisf", "cwbvalue", "cwbbelonging", "cwbwelcome"),
    domain_strongmiss = c("cwbpurpose", "cwbcontrib", "cwbinterconn", "cwbsynergy")
  )
  rec.pattern.matrix(SCWB, mylist)

Run the code above in your browser using DataLab