R/check_contrast_orthogonality.R
check_contrast_orthogonality.Rd
checks to make sure that a contrast of a factor is orthogonal.
check_contrast_orthogonality(x)
contrast table/matrix
checks to make sure that a contrast of a factor is orthogonal by ensuring (1) sum of each contrast equals 0 and (2) sum of each product of each contrast pair equals 0
contrast_example <- data.frame(c1 = c(1/3, 1/3, -2/3),
c2 = c(-1/2, 1/2, 0))
check_contrast_orthogonality(contrast_example)
#> rule 1. sum of each contrast equals 0 ✓
#> rule 2. sum of products of contrast pairs equals 0 ✓