View source: R/component_samplers.R
sampleBTF_bspline | R Documentation |
Compute one draw of the p x 1
B-spline basis coefficients beta
in a DLM using
back-band substitution methods. The coefficients are penalized with a prior on the D = 0, D = 1, or
D = 2 differences. This model is equivalent to the Bayesian trend filtering (BTF) model
applied to p x 1
vector of equally-spaced B-spline coefficients, with the basis matrix
serving as a design matrix in the observation equation.
sampleBTF_bspline(
y,
X,
obs_sigma2,
evol_sigma_t2,
XtX_bands,
Xty = NULL,
D = 1
)
y |
the |
X |
the |
obs_sigma2 |
the scalar observation error variance |
evol_sigma_t2 |
the |
XtX_bands |
list with 4 vectors consistint of the 4-bands of XtX = crossprod(X) (one-time cost) |
Xty |
the |
D |
the degree of differencing (zero, one, or two) |
p x 1
vector of simulated basis coefficients beta
Missing entries (NAs) are not permitted in y
. Imputation schemes are available.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.