nu2const {rtmpt}R Documentation

Set process drift rate to constants

Description

Setting process drif rate (parameter nu) to constants or change it back to be estimated.

Usage

nu2const(model, names, constants = NA)

set_nu_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:

  • -Inf < constants < Inf: set the named drift rate parameter(s) to constant value(s)

  • NA: estimate the named drift rate parameter(s)

Value

An object of the class drtmpt_model.

Author(s)

Raphael Hartmann

See Also

delta2delta, a2const, a2a, nu2nu, omega2const and omega2omega

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 drift rate for guessing (g) will be set to 1.0.
####################################################################################

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_drtmpt_model(mdl_file = mdl_2HTM)

## setting drift rate for g to a constant (1.0):
new_model <- nu2const(model = model, names = c("g"), constants = c(1.0))
new_model


## setting drift rate of g to a constant (1.0):
new_model <- set_nu_const(model = model, names = c("g"), constants = c(1.0))
new_model

[Package rtmpt version 2.0-1 Index]