simConf {statConfR}R Documentation

Simulate data according to a static model of confidence

Description

This function generates a data frame with random trials generated according to the computational model of decision confidence specified in the model argument with given parameters. Simulations can be used to visualize and test qualitative model predictions (e.g. using previously fitted parameters returned by fitConf). See fitConf for a full mathematical description of all models and their parameters.

Usage

simConf(model = "SDT", paramDf)

Arguments

model

character of length 1. The generative model that should be used for simulation. Models implemented so far: 'WEV', 'SDT', 'GN', 'PDA', 'IG', 'ITGc', 'ITGcm', 'logN', and 'logWEV'.

paramDf

a data.frameproviding the number of generared trials and the parameters of the chosen model. paramDf should contain following columns (which parameters are needed depends on the specific model):

  • N (the number of trials be simulated),

  • participant (optional, the participant ID of each parameter set. Should be unique to each row),

  • d_1, d_2, ... (sensitivity parameters. The number of sensitivity parameters determines the number of levels of discriminability),

  • c (discrimination bias),

  • theta_minus.1, theta_minus.2, ... (confidence criteria associated with the response R = -1. The function simulates one more confidence category than there are confidence criteria),

  • theta_plus.1, theta_plus.2, ... (confidence criteria associated with the response R = 1. The function simulates one more confidence category than there are confidence criteria),

  • w (only for models WEV and logWEV: the visibility weighting parameter, bounded between 0 and 1),

  • sigma (only for models WEV, GN, logN, and logWEV: confidence noise, bounded between 0 and Inf),

  • m (only for IG, ITGm, and ITGcm: metacognitive efficiency parameter, bounded between 0 and Inf),

  • b (only for PDA: postdecisional accumulation parameter, bounded between 0 and Inf),

  • M_theta_minus.1, M_theta_minus.2, ... (only for logN: Mean confidence criteria associated with the response R = -1),

  • M_theta_plus.1, M_theta_plus.2,... (only for logN: Mean confidence criteria associated with the response R = 1).

Details

The function generates about N trials per row with the provided parameters in the data frame. The output includes a column participant indicating the row ID of the simulated data. The values of the participant column may be controlled by the user, by including a participant column in the input paramDf. Note that the values of this column have to be unique! If no participant column is present in the input, the row numbers will be used as row IDs.

The number of simulated trials for each row of parameters may slightly deviate from the provided N. Precisely, if there are K levels of sensitivity (i.e. there are columns d1, d2, ..., dK), the function simulates round(N/2/K) trials per stimulus identity (2 levels) and level of sensitivity (K levels).

Simulation is performed following the generative process structure of the models. See fitConf for a detailed description of the different models.

Value

a dataframe with about nrow(paramDf)*N rows (see Details), and the following columns:

Author(s)

Manuel Rausch, manuel.rausch@hochschule-rhein-waal.de

Examples

# 1. define some parameters
paramDf <- data.frame(d_1 = 0, d_2 = 2, d_3 = 4,c = .0,
theta_minus.2 = -2, theta_minus.1 = -1, theta_plus.1 = 1, theta_plus.2 = 2,
sigma = 1/2, w = 0.5, N = 500)
# 2. Simulate dataset
SimulatedData <- simConf(model = "WEV", paramDf)

[Package statConfR version 0.2.0 Index]