get_group_model_fit: Get group model fit for a specific model

View source: R/helper.R

get_group_model_fitR Documentation

Get group model fit for a specific model

Description

Fits a model to all available datasets and returns the group-level fit. This function provides a convenient way to get pre-computed model fits for common models.

Usage

get_group_model_fit(
  model_name,
  datasets = NULL,
  control = xslControl(),
  deoptim_control = DEoptim::DEoptim.control(reltol = 0.001, NP = 100, itermax = 100)
)

Arguments

model_name

Name of the model to fit (see show_models())

datasets

Optional list of datasets to fit to (defaults to all available)

control

Control arguments passed to xsl_run() (via xsl_fit()); notably n_sim, the number of simulations averaged per evaluation of a stochastic model (default 500 – lowering this can speed up fitting of stochastic models substantially).

deoptim_control

Control parameters passed to DEoptim() (via xsl_fit()).

Value

A list containing the fitted model results

Examples

# Get group fit for the uncfam model. A small dataset subset and a
# reduced DEoptim search keep this example fast; drop those arguments
# for a real, thorough fit.
group_fit <- get_group_model_fit(
  "uncfam", datasets = xsl_datasets[1:3],
  deoptim_control = DEoptim::DEoptim.control(NP = 10, itermax = 5))

XSLmodels documentation built on Oct. 18, 2026, 5:08 p.m.