Learn R Programming

ggdmc (version 0.1.3.9)

plot_dist: Plot Cell Density

Description

plot.dist plots the distributions of correct and error RTs and reports accuracy rate.

Usage

plot_dist(mdi, xlim = c(0, Inf), ylim = c(0, Inf), main = NULL,
  save.dat = FALSE, ...)

Arguments

mdi
a model data instance, a data frame class created by model.dmc
xlim
the range on the x axis. Default is (0, Inf)
ylim
the range on the y axix. Default is (0, Inf)
main
a string for the main title
save.dat
save plot data, instead of plotting
...
other arguments

Examples

Run this code
model <- model.dmc(
  p.map     = list(a="1",v="1",z="1",d="1",sz="1",sv="1", t0="1",st0="1"),
  constants = c(st0=0,d=0),
  match.map = list(M=list(s1="r1",s2="r2")),
  factors   = list(S=c("s1","s2")),
  responses = c("r1","r2"),
  type      = "rd")

pVec <- c(a=1,v=1, z=0.5, sz=0.25, sv=0.2,t0=.15)
dat1 <- simulate(model, nsim=1e2, p.vector=pVec)
mdi1 <- data.model.dmc(dat1, model)
plot_dist(mdi1)

Run the code above in your browser using DataLab