sphericityValueString: sphericityValueString

Description Usage Arguments Value Examples

View source: R/anova.R

Description

Returns required Latex formatted string for sphericity epsilon values (HF, GG) = XXX for R/knitr integration. Returns values to 2 sig decimal places.

Usage

1
sphericityValueString(aovObj, effect)

Arguments

aovObj

The returned object from a call to ezANOVA

effect

The effect within the ANOVA table to return

Value

character

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Example 1
# create dataframe and add data with 3(Comp: neutral vs. comp vs. incomp) levels
dat <- createDF(nVP = 20, nTrl = 1,
                design = list("Comp" = c("neutral", "comp", "incomp")))

dat <- addDataDF(dat, RT = list("Comp neutral" = c(510, 150, 100),
                                "Comp comp"    = c(500, 150, 100),
                                "Comp incomp"  = c(520, 150, 100)))

# repeated measures ANOVA using ezANOVA
library(ez)
aovRT <- ezANOVA(dat, dv=.(RT), wid = .(VP), within = .(Comp),
                 return_aov = TRUE, detailed = TRUE)
aovRT <- aovTable(aovRT)

sphericityValue <- sphericityValueString(aovRT, "Comp")

psychReport documentation built on May 6, 2021, 5:05 p.m.