withinSubjectEQN: Generate EQN Files for Within-Subject Designs

View source: R/within_subject_EQN.R

withinSubjectEQNR 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 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 documentation built on May 31, 2023, 9:21 p.m.