
Build the block-structure metadata vectors for the Phase-2 TMB template
Source:R/tmb-demand.R
dot-tmb_build_block_map.RdEmits the integer vectors that tell the C++ template how to slice the parameter vector into per-block covariance components and how to map subject-level random effects through each block's Cholesky.
Value
A list of integer scalars and integer vectors describing the block structure (see Conventions above).
Details
Conventions:
block_types[b] = 0for pdDiag,1for pdSymm.block_q0_offset[b]/block_alpha_offset[b]are 0-indexed starting columns withinZ_q0/Z_alpharespectively.n_logsigmaissum(block_q0_dim + block_alpha_dim)– one standard-deviation parameter per RE column across all blocks.n_rhoissum(over pdSymm blocks: block_dim*(block_dim-1)/2)whereblock_dim = block_q0_dim + block_alpha_dim. pdDiag blocks contribute 0 free correlations.