tau2tau: Set process completion times equal

View source: R/set_params.R

tau2tauR Documentation

Set process completion times equal

Description

Setting multiple process completion times (taus) equal. This means all process times of negative outcomes will be set equal and all process times of positive outcomes will be set equal. Only two process times (one for the negative and one for the positive outcome) of the named processes will be estimated. The equality can be removed by just naming only one process name.

Usage

tau2tau(model, names, keep_zeros = FALSE)

set_taus_equal(model, names, keep_zeros = FALSE)

Arguments

model

A list of the class rtmpt_model.

names

Character vector giving the names of the processes for which the process completion times should be equal. If length(names) = 1 then the corresponding process completion times (for negative and positive outcomes) will be estimates (i.e., they will be set to NA)

keep_zeros

Can be one of the following

  • logical value: FALSE (default) means none of the zeros for names in the model will be kept; The times of the reference process (i.e., first of names in alphabetical order) will be set to NA (i.e., will be estimated) and the others will be set to the name of the reference process (i.e., will be set to equal the reference process times). TRUE means the zero(s) of the reference process times (if specified) is used for the same outcome of all other processes.

  • numeric value: index for names. If 1, the zero(s) of the first process in names (in original order defined by the user) is used for the same outcome of all other processes in names. If 2, the zero(s) of the second process is used. And so on.

Value

A list of the class rtmpt_model.

Note

If you use theta2theta() and tau2tau() with the same process names you might just change the EQN or MDL file accordingly by using the same process name for all processes which should have equal process times and probabilities.

Author(s)

Raphael Hartmann

See Also

delta2delta, theta2const, tau2zero and theta2theta

Examples

####################################################################################
# Detect-Guess variant of the Two-High Threshold model.
# The encoding and motor execution times are assumed to be equal for each category.
# The process completion times for both detection processes ("do" and "dn") will be
# set equal.
####################################################################################

mdl_2HTM <- "
# targets
do+(1-do)*g
(1-do)*(1-g)

# lures
(1-dn)*g
dn+(1-dn)*(1-g)

# do: detect old; dn: detect new; g: guess
"

model <- to_rtmpt_model(mdl_file = mdl_2HTM)

## make do = dn
new_model <- tau2tau(model = model, names = c("do", "dn"))
new_model


## make do = dn
new_model <- set_taus_equal(model = model, names = c("do", "dn"))
new_model

rtmpt documentation built on April 10, 2022, 5:05 p.m.