Learn R Programming

EMC2 (version 2.0.2)

plot_fit_choice: Plots choice data

Description

Plots choice data with no response times.

Usage

plot_fit_choice(
  data,
  pp,
  subject = NULL,
  factors = NULL,
  functions = NULL,
  stat = NULL,
  stat_name = "",
  adjust = 1,
  ci = c(0.025, 0.5, 0.975),
  do_plot = TRUE,
  xlim = NULL,
  ylim = NULL,
  main = "",
  layout = NULL,
  mfcol = TRUE,
  signalFactor = "S",
  zROC = FALSE,
  qfun = qnorm,
  lim = NULL,
  rocfit_cex = 0.5
)

Value

If stat argument is provided a matrix of observed values and predicted quantiles is returned

Arguments

data

A data frame. The experimental data in EMC2 format with at least subject (i.e., the subject factor), R (i.e., the response factor) and rt (i.e., response time) variable. Additional factor variables of the design are optional.

pp

Posterior predictives created by predict()

subject

Integer or string picking out subject(s).

factors

Character vector of factors in data to display separately. If NULL (i.e., the default), use names of all columns in data except trials,R, and rt. Omitted factors are aggregated over. If NA, treats entire data set as a single cell. If stat is used, the default is changed to NA.

functions

A named list of functions that create new factors which can then be used by the factors and stat arguments.

stat

A function that takes a the data and returns a single value.

stat_name

A string naming what the stat argument calculates.

adjust

Control of smoothing in density plots

ci

Credible interval and central tendency quantiles for return when stat argument is supplied (defaults to the 2.5\%, the 50\% and the 97.5\% quantiles)

do_plot

Boolean (defaults to TRUE) whether a plot should be created or not

xlim

x-axis plot limit, 2-vector (same for all) or matrix (one row for each paramter)

ylim

y-axis plot limit, 2-vector (same for all) or matrix (one row for each paramter)

main

Text title, pasted before cell name.

layout

2-vector specifying par(mfrow) or par(mfcol). The default NULL uses current, NA keeps par currently active.

mfcol

Boolean for layout settings, the default TRUE uses mfcol, else mfrow.

signalFactor

Character name of factor for the signal

zROC

Boolean, plot Z transformed ROC (defaults to FALSE)

qfun

Type of Z transform (defaults to probit)

lim

x = y limit for ROC plots

rocfit_cex

Size of points in ROC plot (default 0.5)