Skip to contents

Calculates PCCs and c-values based on pairwise comparison of conditions.

Usage

compare_conditions(result, nreps = 1000L)

Arguments

result

an object of class "opafit" produced by a call to opa().

nreps

an integer

Value

compare_conditions returns a list with the following elements

pcc_mat

A lower triangle matrix containing PCCs calculated from each pairing of data columns.

cval_mat

A lower triangle matrix containing c-values calculated from each pairing of data columns.

pccs

A vector containing PCCs calculated from each pairing of data.

cvals

A vector containing c-values calculated from each pairing of data.

nreps

The number of permutations used to calculate the c-values.

Examples

dat <- data.frame(t1 = c(9, 4, 8, 10),
                  t2 = c(8, 8, 12, 10),
                  t3 = c(8, 5, 10, 11),
                  t4 = c(10, 5, 11, 12))
h <- hypothesis(1:4)
opamod <- opa(dat, h)
compare_conditions(opamod)
#> Pairwise PCCs:
#>     1  2  3 4
#> 1   -  -  - -
#> 2  50  -  - -
#> 3  75 25  - -
#> 4 100 50 75 -
#> 
#> Pairwise chance values:
#>       1     2    3 4
#> 1     -     -    - -
#> 2 0.497     -    - -
#> 3 0.318 0.898    - -
#> 4 0.052 0.696 0.13 -