Learn R Programming

ggdmcModel (version 0.2.9.0)

get_pnames: Get Free Parameter Names from Model

Description

Extracts the names of free parameters from an S4 model object, with optional debugging output to inspect both free and constant parameters.

Usage

get_pnames(model_r, debug = FALSE)

Value

A character vector of free parameter names in the model

Arguments

model_r

An S4 object containing the model specification and design

debug

Logical flag indicating whether to print debugging information about both free and fixed parameters (default: FALSE)

Debugging Output

When `debug = TRUE`, the function prints:

  • Free parameters (those being estimated)

  • Constants (fixed parameters)

Details

The function:

  1. Creates a new design object from the model

  2. Optionally prints debugging information about all parameters

  3. Returns only the names of free (non-constant) parameters

Examples

Run this code
model <- BuildModel(
  p_map = list(A = "1", B = "1", mean_v = "M", sd_v = "1", st0 = "1",
               t0 = "1"),
  match_map = list(M = list(s1 = "r1", s2 = "r2")),
  factors = list(S = c("s1", "s2")),
  constants = c(A = 0.75, mean_v.false = 1.5, sd_v = 1, st0 = 0),
  accumulators = c("r1", "r2"),
  type = "lba")

pnames <- get_pnames(model)

Run the code above in your browser using DataLab