View source: R/component_samplers.R
| sampleBTF | R Documentation |
Compute one draw of the T x 1 state variable mu in a DLM using back-band substitution methods.
This model is equivalent to the Bayesian trend filtering (BTF) model, assuming appropriate
(shrinkage/sparsity) priors for the evolution errors.
sampleBTF(
y,
obs_sigma_t2,
evol_sigma_t2,
D = 1,
loc_obs = NULL,
chol0 = NULL,
prior_mean = NULL
)
y |
the |
obs_sigma_t2 |
the |
evol_sigma_t2 |
the |
D |
the degree of differencing (one or two) |
loc_obs |
list of the row and column indices to fill in a band-sparse matrix |
chol0 |
(optional) the |
prior_mean |
optional (default is NULL); numeric |
T x 1 vector of simulated states
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.