Prepare Z Array for C++ Consumption
prepare_Z_list.RdConverts a 4D array of exogenous covariates into a format optimized for C++ processing. RcppArmadillo handles 4D arrays most efficiently when decomposed into a list of 3D cubes.
Value
List of 3D arrays, where each element corresponds to one covariate across all time periods. Length equals q (number of covariates).
Details
This function handles the dimensional restructuring needed for computation in the C++ backend. The transformation preserves the covariate structure while enabling vectorized operations in Armadillo.
Input dimensions:
3D array (m x m x T): Interpreted as single covariate (q=1)
4D array (m x m x q x T): Multiple covariates
Output structure:
List of length q
Each element is an (m x m x T) array for one covariate