theta2const: Set process probabilities to constants

View source: R/set_params.R

theta2constR Documentation

Set process probabilities to constants

Description

Setting process probabilities (thetas) to constants or change it back to be estimated.

Usage

theta2const(model, names, constants = NA)

set_theta_const(model, names, constants = NA)

Arguments

model

An object of the class rtmpt_model.

names

Character vector with process names.

constants

Numerical vector of length one or length(names). You have the following options for the elements of the numeric vector:

  • 0 < constants < 1: set the named probability to a constant value between zero and one

  • NA: estimate the named probability

Value

An object of the class rtmpt_model.

Author(s)

Raphael Hartmann

See Also

delta2delta, tau2zero, theta2theta and tau2tau

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 probability for guessing (g) will be set to 0.5.
####################################################################################

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)

## setting g to a constant (0.5):
new_model <- theta2const(model = model, names = c("g"), constants = c(0.5))
new_model
                    

## setting g to a constant (0.5):
new_model <- set_theta_const(model = model, names = c("g"), constants = c(0.5))
new_model

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