plotFitSSP: Plot the fit of the SSP model to human data.

Description Usage Arguments Details Value Examples

Description

plotFitSSP will plot the fit of the model to human distributional data.

Usage

1
2
3
plotFitSSP(modelFit, data, conditionName = NULL, nTrials = 50000,
  cdfs = c(0.1, 0.3, 0.5, 0.7, 0.9), cafs = c(0.25, 0.5, 0.75),
  multipleSubjects = TRUE)

Arguments

modelFit

The object obtained by the model fit.

data

The data frame of human data.

conditionName

The name of the condition that was fit. By default, it is set to conditionName = NULL.

nTrials

How many trials used to generate the model's best predictions. This should be higher than that used to fit the model.

cdfs

The cut-off points for the cumulative distribution functions.

cafs

The cut-off points for the conditional accuracy functions.

multipleSubjects

A boolean stating whether the fit is to multiple subjects (multipleSubjects = TRUE) or to a single subject (multipleSubjects = FALSE).

Details

This function is passed the object obtained by the model fitting procedure, as well as the human data and the condition that was fitted by the routine. The function simulates 100,000 trials (by default) using the best-fitting parameters found by the fit procedure. This synthetic data is then considered as the model's best predictions. The function then provides a plot of the model fit to cumulative distribution functions (CDFs) of correct response time, and conditional accuracy functions (CAFs) to show fit to accuracy data. The function also returns the data used to plot the fit so that the user can use their own plotting methods.

Value

cdfs The CDF values requested by the user.

cafs The CAF values requested by the user.

humanConCDFs The response time cut-off values for each CDF bin for congruent human data.

humanInconCDFs The response time cut-off values for each CDF bin for incongruent human data.

humanConCAFsRT The mean response times for each bin of the CAF functions for congruent human data.

humanInconCAFsRT The mean response times for each bin of the CAF functions for incongruent human data.

humanConCAFsError The percent accuracy for each bin of the CAF functions for congruent human data.

humanConCAFsError The percent accuracy for each bin of the CAF functions for congruent human data.

modelConCDFs The quantile cut-off points for the model predictions for congruent data. A perfect fit would match the cdfs asked for by the user (e.g., .1, .3, .5, .7, .9).

modelInconCDFs The quantile cut-off points for the model predictions for incongruent data. A perfect fit would match the cdfs asked for by the user (e.g., .1, .3, .5, .7, .9).

modelConCAFs The percentage accuracy predicted for each CAF bin by the model for congruent data.

modelInconCAFs The percentage accuracy predicted for each CAF bin by the model for incongruent data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Assume that the model was just fit to the data contained in
# \code{exampleData} (condition "present") and saved to the variable called
# "fit", then we can obtain a plot of that fit by:

plot <- plotFitSSP(modelFit = fit, data = exampleData,
                   conditionName = "present")

# We can also change the default CDF and CAF quantiles used, as well as the
# number of trials used to simulate the fitted data.

plot <- plotFitSSP(modelFit = fit, data = exampleData,
                   conditioName = "present", cdfs = c(.2, .4, .6, .8),
                   cafs = c(.2, .4, .6, .8), nTrials = 500000)

JimGrange/flankr documentation built on May 7, 2019, 10:51 a.m.