Compute one draw of the T x p state variable beta in a DLM using back-band substitution methods.
This model is equivalent to the Bayesian trend filtering (BTF) model applied to p
dynamic regression coefficients corresponding to the design matrix X,
assuming appropriate (shrinkage/sparsity) priors for the evolution errors.
sampleBTF_reg(y, X, obs_sigma_t2, evol_sigma_t2, XtX, D = 1, chol0 = NULL)T x p matrix of simulated dynamic regression coefficients beta
the T x 1 vector of time series observations
the T x p matrix of time series predictors
the T x 1 vector of observation error variances
the T x p matrix of evolution error variances
the Tp x Tp matrix of X'X (one-time cost; see ?build_XtX)
the degree of differencing (one or two)
(optional) the m x m matrix of initial Cholesky factorization;
if NULL, use the Matrix package for sampling, otherwise use the spam package