withinSubjectEQN {TreeBUGS} | R Documentation |
Generate EQN Files for Within-Subject Designs
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 |
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"))