get_info: Collect Model Equations and Data per Tree

Description Usage Arguments Value

View source: R/get_info.R

Description

Helper function that collects model equation and data per tree for further analysis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_info(
  model,
  dataset,
  data,
  id = NULL,
  condition = NULL,
  include_data = FALSE,
  core = NULL,
  autosave = TRUE
)

Arguments

model

A model definition, typically the path to an .eqn model file containing the model equations. Category names need to match column names in data.

dataset

scalar character vector. Name of the data set that will be copied to the results tibble.

data

A data.frame containing the data. Column names need to match category names in model (i.e., different from MPTinR behavior, order of categories is not important, matching is done via name).

id

scalar character vector. Name of the column that contains the subject identifier. If not specified, it is assumed that each row represents observations from one participant.

condition

scalar character vector. Name of the column specifying a between-subjects factor. If not specified, no between-subjects comparisons are performed.

include_data

If FALSE (the default) the response frequencies are not part of the output, but only the number of observations per tree. If TRUE, the full data is part of the output.

core

character vector defining the core parameters of interest, e.g., core = c("Dn", "Do"). All other parameters are treated as auxiliary parameters.

autosave

If TRUE (the default) the results are automatically saved in the current working directory in a file with name derived from both model and data.

Value

A list. If autosave = TRUE, the list is also saved in the current working directory.


MPTmultiverse documentation built on July 1, 2020, 11:37 p.m.