plot.dmcob {DMCfun}R Documentation

plot.dmcob: Plot observed data

Description

Plot results from the output of dmcObservedData. The plot can be an overall summary, or individual plots (rtCorrect, errorRate, rtErrors, cdf, caf, delta, deltaErrors, all).

Usage

## S3 method for class 'dmcob'
plot(
  x,
  figType = "summary",
  subject = NULL,
  legend = TRUE,
  labels = c("Compatible", "Incompatible"),
  cols = c("black", "green", "red"),
  errorBars = FALSE,
  errorBarType = "sd",
  ylimRt = NULL,
  ylimErr = NULL,
  xlimCDF = NULL,
  ylimCAF = NULL,
  cafBinLabels = FALSE,
  ylimDelta = NULL,
  xlimDelta = NULL,
  ylimDeltaErrors = NULL,
  xlabs = TRUE,
  ylabs = TRUE,
  xaxts = TRUE,
  yaxts = TRUE,
  resetPar = TRUE,
  ...
)

Arguments

x

Output from dmcObservedData

figType

summary, rtCorrect, errorRate, rtErrors, cdf, caf, delta, deltaErrors, all

subject

NULL (aggregated data across all subjects) or integer for subject number

legend

TRUE/FALSE (or FUNCTION) plot legend on each plot

labels

Condition labels c("Compatible", "Incompatible") default

cols

Condition colours c("green", "red") default

errorBars

TRUE(default)/FALSE Plot errorbars

errorBarType

sd(default), or se

ylimRt

ylimit for Rt plots

ylimErr

ylimit for error rate plots

xlimCDF

xlimit for CDF plot

ylimCAF

ylimit for CAF plot

cafBinLabels

TRUE/FALSE

ylimDelta

ylimit for delta plot

xlimDelta

xlimit for delta plot

ylimDeltaErrors

ylimit for delta plot errors

xlabs

TRUE/FALSE

ylabs

TRUE/FALSE

xaxts

TRUE/FALSE

yaxts

TRUE/FALSE

resetPar

TRUE/FALSE Reset graphical parameters

...

additional plot pars

Value

Plot (no return value)

Examples


# Example 1 (real dataset)
plot(flankerData)
plot(flankerData, errorBars = TRUE, errorBarType = "se")
plot(flankerData, figType = "delta")
plot(flankerData, figType = "caf")

# Example 2 (real dataset)
plot(simonData)
plot(simonData, errorBars = TRUE, errorBarType = "se")
plot(simonData, figType = "delta", errorBars = TRUE, errorBarType = "sd")

# Example 3 (simulated dataset)
dat <- createDF(nSubjects = 50, nTrl = 50,
                design = list("Comp" = c("comp", "incomp")))
dat <- addDataDF(dat,
                 RT = list("Comp_comp"   = c(420, 100, 80),
                           "Comp_incomp" = c(470, 100, 95)),
                 Error = list("Comp_comp"   = c(5, 3, 2, 1, 2),
                              "Comp_incomp" = c(15, 8, 4, 2, 2)))
datOb <- dmcObservedData(dat)
plot(datOb, errorBars = TRUE, errorBarType = "sd")

# Example 4 (simulated dataset)
dat <- createDF(nSubjects = 50, nTrl = 50,
                design = list("Comp" = c("comp", "incomp")))
dat <- addDataDF(dat,
                 RT = list("Comp_comp"   = c(420, 100, 150),
                           "Comp_incomp" = c(470, 100, 120)),
                 Error = list("Comp_comp"   = c(5, 3, 2, 1),
                              "Comp_incomp" = c(15, 8, 4, 2)))
datOb <- dmcObservedData(dat, nCAF = 4)
plot(datOb)



[Package DMCfun version 2.0.2 Index]