plot.dmcfit {DMCfun}R Documentation

plot.dmcfit: Plot observed + fitted data

Description

Plot the simulation results from the output of dmcFit. The plot can be an overall summary, or individual plots (activation, trials, pdf, cdf, caf, delta, all). Plot type summary1 contains an activation plot, example individual trials, the probability distribution function (PDF), the cumulative distribution function (CDF), the conditional accuracy function (CAF) and delta plots. This required that dmcSim is run with fullData = TRUE. Plot type summary2 contains only the PDF, CDF, CAF and delta plots and does not require that dmcSim is run with fullData = TRUE.

Usage

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

Arguments

x

Output from dmcFit

y

Observed data

subject

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

figType

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

legend

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

labels

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

cols

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

ylimRt

ylimit for Rt plots

ylimErr

ylimit for error rate plots

xlimCDF

ylimit for CDF plot

ylimCAF

ylimit for CAF plot

cafBinLabels

TRUE/FALSE

ylimDelta

ylimit for delta plot

xlimDelta

xlimit for delta plot

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
resTh <- dmcFit(flankerData, nTrl = 5000)
plot(resTh, flankerData, figType = "rtcorrect")

# Example 2
resTh <- dmcFit(flankerData, nTrl = 5000)
plot(resTh, flankerData)
plot(resTh, flankerData, figType = "all")

# Example 3
resTh <- dmcFit(simonData, nTrl = 5000)
plot(resTh, simonData)



[Package DMCfun version 2.0.2 Index]