get_pnames: Get Free Parameter Names from Model

View source: R/RcppExports.R

get_pnamesR Documentation

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)

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)

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

Value

A character vector of free parameter names in the model

Debugging Output

When 'debug = TRUE', the function prints:

  • Free parameters (those being estimated)

  • Constants (fixed parameters)

Examples

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)


ggdmcModel documentation built on Aug. 8, 2025, 7:50 p.m.