to_rtmpt_model | R Documentation |
Create a model list of the class rtmpt_model
by providing either eqn_file
or mdl_file
.
If both are provided mdl_file
will be used.
to_rtmpt_model(eqn_file = NULL, mdl_file = NULL)
eqn_file |
Character string as shown in example 2 or path to the text file that specifies the
(RT-)MPT model with standard .eqn syntax (Heck et al., 2018; Hu, 1999). E.g. |
mdl_file |
Character string as shown in example 1 or path to the text file that specifies the
(RT-)MPT model and gives on each line the equation of one category using |
A list of the class rtmpt_model
.
Within a branch of a (RT-)MPT model it is not allowed to have the same process two or more times.
Raphael Hartmann
Heck, D. W., Arnold, N. R., & Arnold, D. (2018). TreeBUGS: An R package for hierarchical multinomial-processing-tree modeling. Behavior Research Methods, 50(1), 264-284.
Hu, X. (1999). Multinomial processing tree models: An implementation. Behavior Research Methods, Instruments, & Computers, 31(4), 689-695.
Singmann, H., & Kellen, D. (2013). MPTinR: Analysis of multinomial processing tree models in R. Behavior Research Methods, 45(2), 560-575.
delta2delta
, theta2const
, tau2zero
, theta2theta
, and tau2tau
for
functions to change the model
######################################################################################## # Detect-Guess variant of the Two-High Threshold model # with constant guessing and # suppressed process completion times for both failed detections. # The encoding and motor execution times are assumed to be different for each response. ######################################################################################## ## 1. using the mdl syntax mdl_2HTM <- " # targets do+(1-do)*g ; 0 (1-do)*(1-g) ; 1 # lures (1-dn)*g ; 0 dn+(1-dn)*(1-g) ; 1 # do: detect old; dn: detect new; g: guess # OPTIONAL MPT CONSTRAINTS # set probabilities to constants: const_prob: g=0.5 # suppress process times: suppress_process: dn-, do- " model <- to_rtmpt_model(mdl_file = mdl_2HTM) model ## 2. using the eqn syntax eqn_2HTM <- " # CORE MPT EQN # tree ; cat ; mpt 0 ; 0 ; do 0 ; 0 ; (1-do)*g 0 ; 1 ; (1-do)*(1-g) 1 ; 2 ; (1-dn)*g 1 ; 3 ; dn 1 ; 3 ; (1-dn)*(1-g) # OPTIONAL MPT CONSTRAINTS # set probabilities to constants: const_prob: g=0.5 # suppress process times: suppress_process: dn-, do- # tree ; cat ; MAP resp: 0 ; 0 ; 0 resp: 0 ; 1 ; 1 resp: 1 ; 2 ; 0 resp: 1 ; 3 ; 1 # different motor execution times for old and new responses. " model <- to_rtmpt_model(eqn_file = eqn_2HTM) model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.