cueValidityComplete: Calculate cue validity with reverse, cue directions, and cue...

Description Usage Arguments Value References

View source: R/cue_validity.R

Description

This provides a vector of cue_validities and potentially other useful information, particularly if reverse_cues=TRUE. For example, education is negatively associated with number of felonies. If reverse_cues=FALSE, education will get validity < 0.5. If reverse_cues=TRUE, then LESS education will be used as a predictor, resulting in: 1) cue_validity > 0.5 2) cue_direction == -1 To use the cue for prediction, be sure to multiply it by the cue_direction. For ranking, based heuristics, cue_ranks gives the rank order of cues where highest validity = rank 1 (after reversing, if any).

Usage

1
2
3
4
5
6
7
8
cueValidityComplete(
  data,
  criterion_col,
  cols_to_fit,
  replaceNanWith = 0.5,
  reverse_cues = FALSE,
  ties.method = "random"
)

Arguments

data

The matrix or data.frame whose columns are treated as cues.

criterion_col

The index of the column used as criterion.

cols_to_fit

A vector of indexes of the columns to calculate cue validity for.

replaceNanWith

The value to return as cue validity in case it cannot be calculated.

reverse_cues

Optional parameter to reverse cues as needed. By default, the model will reverse the cue values for cues with cue validity < 0.5, so a cue with validity 0 becomes a cue with validity 1. Set this to FALSE if you do not want that, i.e. the cue stays validity 0.

ties.method

An optional parameter passed to rank: A character string sepcifying how ties (in cue validity) are treated.

Value

A list where $cue_validities has a vector of validities for each of the columns in cols_to_fit.

References

Wikipedia's entry on https://en.wikipedia.org/wiki/Cue_validity


heuristica documentation built on Sept. 8, 2021, 9:08 a.m.