View source: R/prepare_optim_layout.R
| prepare_optim_layout | R Documentation |
Build a bookkeeping structure that maps a flat optimization vector
(theta, in real/unconstrained space) to per-component parameter blocks.
This is used throughout the package to:
Define a consistent parameter order for optimization.
Provide an initial parameter vector (theta0) in real space.
Record which subset of theta belongs to each component model.
prepare_optim_layout(model)
model |
A |
The function handles two cases:
time_series_model: returns a single block of parameters.
sum_model: concatenates all component blocks and records their indices.
A list with:
kind: "single" or "sum" depending on the model class.
theta0: named numeric vector of initial parameters in real space.
pnames: (single model) parameter names for the block.
layout: (sum model) list of per-component layouts, each containing:
i (component index), idx (indices into theta0), and pnames
(parameter names for that component).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.