Stage 2 of the two-stage bootstrap. Takes the cached ineqx_params
replicates produced by bootstrap_params, runs the variance
decomposition on each at the requested (ystat, ref), and returns an
ineqx_boot object with standard errors and percentile CIs.
Usage
decompose_boot_params(
boot_params,
ref = NULL,
order = c("behavioral", "compositional", "pretreatment"),
ystat = NULL
)Arguments
- boot_params
An object returned by
bootstrap_params.- ref
Numeric, reference time period (longitudinal) or
NULL(cross-section).- order
Character vector of length 3, decomposition ordering for the longitudinal decomposition. Default
c("behavioral", "compositional", "pretreatment"). Ignored for cross-sectional fits.- ystat
Character,
"Var","CV2", or"VL". Default: theystatstored onboot_params."VL"requiresboot_paramsfrom a log(y) fit (transform = "log"); it runs the"Var"decomposition on the log-scale params, which equals V_L.
Value
An object of class "ineqx_boot" matching
bootstrap_se's return shape.
Details
Because the GAMLSS fits are already cached in the input, this call only
pays the cost of B variance-decomposition evaluations — orders of magnitude
cheaper than a fresh bootstrap_se() run.
ystat can override the value the params were originally extracted
at: the per-replicate params$ystat is set to the requested value
before decomposition. This works because the bootstrapped params object's
parametric columns (mu0, sigma0, beta, lambda)
are scale-agnostic; ystat only selects which decomposition formula
to apply on top.