Skip to contents

Calculate the c-value of the difference in PCCs produced by two groups

Usage

compare_groups(m, group1, group2, two_tailed)

Arguments

m

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

group1

a character string which matches a group level passed to opa().

group2

a character string which matches a group level passed to opa().

two_tailed

a boolean indicating whether the comparison is two-tailed.

Value

an object of class "opaGroupComparison".

Examples

dat <- data.frame(group = c("a", "b", "a", "b"),
                  t1 = c(9, 4, 8, 10),
                  t2 = c(8, 8, 12, 10),
                  t3 = c(8, 5, 10, 11))
dat$group <- factor(dat$group, levels = c("a", "b"))
h <- hypothesis(1:3)
opamod <- opa(dat[,2:4], h, group = dat$group)
compare_groups(opamod, "a", "b")
#> ********* Group Comparison **********
#> Group 1: a 
#> Group 2: b 
#> Group 1 PCC: 33.33333 
#> Group 2 PCC: 66.66667 
#> PCC difference: 33.33333 
#> cval: 0.42 
#> Comparison type: two-tailed