Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

withinSubjectEQN

Make Within-Subject EQN Files


Description

Replicates an MPT model multiple times with different tree, category, and parameter labels for within-subject factorial designs

Usage

withinSubjectEQN(eqnfile, labels, constant, save)

Arguments

eqnfile

The (relative or full) path to the file that specifies the MPT model (standard .eqn syntax). Note that category labels must start with a letter (different to multiTree) and match the column names of data. Alternatively, the EQN-equations can be provided within R as a character value (cf. readEQN). Note that the first line of an .eqn-file is reserved for comments and always ignored.

labels

a character vector defining the labels that are added to the parameters in each within-subject condition

constant

optional: a character vector defining which parameters are constrained to be constant across within-conditions

save

optional: path to an EQN output file. By default, the model is return as a string character

Examples

# Example: Standard Two-High-Threshold Model (2HTM)
EQNfile <- system.file("MPTmodels/2htm.eqn",
                       package="TreeBUGS")
withinSubjectEQN(EQNfile, c("high","low"), constant=c("g"))

TreeBUGS

Hierarchical Multinomial Processing Tree Modeling

v1.4.7
GPL-3
Authors
Daniel W. Heck [aut, cre] (<https://orcid.org/0000-0002-6302-9252>), Nina R. Arnold [aut, dtc], Denis Arnold [aut], Alexander Ly [ctb], Marius Barth [ctb] (<https://orcid.org/0000-0002-3421-6665>)
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.