This function simulates sample paths from the prior over effect functions
implied by a fitted fash object. The prior is treated as a finite
mixture over predictive standard deviation (PSD) values stored in
fash_obj$prior_weights. Each sample path is drawn from an integrated
Wiener process (IWP) prior plus a global polynomial trend.
simulate_fash_prior(
fash_obj,
M = 100,
constraints = c("none", "initial", "orthogonal"),
x_range = NULL,
x_new = NULL
)A fitted fash object containing:
prior_weights: a data frame with columns psd and prior_weight;
settings: a list with elements num_basis, order,
pred_step, betaprec.
Integer; total number of prior samples to draw.
Character; one of:
"none", "initial", "orthogonal".
Optional numeric vector of length 2 defining the simulation domain. If missing, inferred from the data.
Optional numeric vector giving evaluation points for the samples.
A list containing:
A matrix of size length(x_new) × M; each column is a sampled function.
Evaluation grid.
Length-M vector giving the PSD used for each sample.
Length-M vector giving mixture component index used.
Original prior weights.
Settings used in the simulation.
The function provides optional constraints on the global polynomial component:
"none": use the polynomial variance from the fitted model (default)
"initial": force the polynomial part to be identically zero
(equivalent to letting betaprec = Inf)
"orthogonal": regress out the polynomial trend from each sample
so that the resulting sample path is orthogonal to all global
polynomial basis functions