ql_matrix: Contingency Table

Description Usage Arguments Details Value Examples

Description

Construct a contingency table showing all observed pairs between different states of variables.

Usage

1
ql_matrix(data, vars = colnames(data), p = 0.05, ...)

Arguments

data

A data.frame of at least 2 columns.

vars

Optional CharacterVector of target variables. Default: all variables within data.

p

A NumericVector of probabilities passed to quantile. Default: 0.05.

...

Additional options passed to quantile

Details

For each variable in vars,ql_matrixfirst splits the data for each observed state and then calculates the percentile given bypfor each of the remaining variables. So yes, this is not a contingency table. Instead, the default value ofp' is such that we're almost calulating the minimum value observed for all variables for each state of a target variable. What does this tell us? I have no idea.

Value

A S3 matrix of class ql_mat.

Examples

1
2
x <- data.frame(a = c(0, 1), b = c(1, 1))
ql_matrix(x)

jsks/seqR documentation built on May 9, 2019, 12:48 p.m.