# NOT RUN {
library(VWPre)
# For plotting the grand average with the included theme and SE bars
plot_avg(data = dat, type = "elogit", xlim = c(0, 1000),
IAColumns = c(IA_1_ELogit = "Target", IA_2_ELogit = "Rhyme",
IA_3_ELogit = "OnsetComp", IA_4_ELogit = "Distractor"),
Averaging = "Event", Condition1 = NA, Condition2 = NA,
Cond1Labels = NA, Cond2Labels = NA,
ErrorBar = TRUE, VWPreTheme = TRUE, ErrorType = "SE",
ErrorBand = FALSE)
# For plotting conditional averages (one condition) with the included theme
# and 95% simultaneous CI bars.
# This produces plots arranged horizontally
plot_avg(data = dat, type = "elogit", xlim = c(0, 1000),
IAColumns = c(IA_1_ELogit = "Target", IA_2_ELogit = "Rhyme",
IA_3_ELogit = "OnsetComp", IA_4_ELogit = "Distractor"),
Averaging = "Event", Condition1 = NA, Condition2 = "talker",
Cond1Labels = NA,
Cond2Labels = c(CH1 = "Chinese 1", CH10 = "Chinese 3", CH9 = "Chinese 2",
EN3 = "English 1"), ErrorBar = TRUE, VWPreTheme = TRUE,
ErrorBand = FALSE, ErrorType = "CI", ConfLev = 95, CItype = "simultaneous")
# For plotting conditional averages (two conditions) for one interest area
with the included theme and 95% simultaneous CI bands.
# This produces plots arranged in grid format.
plot_avg(data = dat, type = "elogit", xlim = c(0, 1000),
IAColumns = c(IA_1_ELogit = "Target"), Averaging = "Event",
Condition1 = "talker", Condition2 = "Exp",
Cond1Labels = c(CH1 = "Chinese 1", CH10 = "Chinese 3", CH9 = "Chinese 2",
EN3 = "English 1"), Cond2Labels = c(High = "H Exp", Low = "L Exp"),
ErrorBar = FALSE, VWPreTheme = TRUE, ErrorBand = TRUE,
ErrorType = "CI", ConfLev = 95, CItype = "simultaneous")
#' # For a more complete tutorial on VWPre plotting functions:
vignette("SR_Plotting", package="VWPre")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab