Learn R Programming

extracat (version 1.7-6)

cmat: pairwise association matrix

Description

Computes pairwise BCI values via qBCI.

Usage

cmat(x, sort = TRUE, crit = BCI, k = 5, iter = 20, 
p = NULL,  jitter = TRUE, freqvar = NULL, diag = NULL,
fun = "BCC", foreign = NULL)

Arguments

x

A data.frame with factor variables or numeric variables which will be transformed to ordinal interval variables via cut. The breakpoints are quantiles of the variables such that for each pair of numeric variables the expected number of observations in each combination of intervals is at least k.

sort

Whether or not to sort the pairwise tables via optile.

crit

The criterion function, e.g. kendalls, BCI, WBCI or wdcor.

k

The minimum expected number for each cell after quantile binning. See also qBCI.

iter

An optile parameter.

p

The quantile distance. See qBCI.

jitter

Whether or not to use jittering in order to avoid ties. This is equivalent to a random assignment of ranks to observations with the same value.

freqvar

Optional weights, e.g. a frequency variable.

diag

An optional value for the diagonal. Avoids unnecessary function calls for the diagonal elements. E.g. diag = 0 for crit = BCI or diag = 1 for crit = kendalls makes sense.

fun

See optile.

foreign

See optile.

Value

A symmetric matrix.

Details

Uses pairwise complete cases only!

See Also

qBCI, See wdcor.

Examples

Run this code
# NOT RUN {
m1 <- cmat(olives)
fluctile(1 - m1,shape="o")
# }

Run the code above in your browser using DataLab