Prior objects for bssm models
These simple objects of class bssm_prior
are used to construct a prior distributions for the
MCMC runs of bssm
package. Currently supported priors are uniform (uniform()
),
half-normal (halfnormal()
), normal (normal()
), gamma (gamma
), and
truncated normal distribution (tnormal()
).All parameters are vectorized so
for regression coefficient vector beta you can define prior for example
as normal(0, 0, c(10, 20))
.
uniform(init, min, max) halfnormal(init, sd) normal(init, mean, sd) tnormal(init, mean, sd, min = -Inf, max = Inf) gamma(init, shape, rate)
init |
Initial value for the parameter, used in initializing the model components and as a starting value in MCMC. |
min |
Lower bound of the uniform and truncated normal prior. |
max |
Upper bound of the uniform and truncated normal prior. |
sd |
Standard deviation of the (underlying i.e. non-truncated) Normal distribution. |
mean |
Mean of the Normal prior. |
shape |
Shape parameter of the Gamma prior. |
rate |
Rate parameter of the Gamma prior. |
object of class bssm_prior
.
# create uniform prior on [-1, 1] for one parameter with initial value 0.2: uniform(0.2, -1, 1) # two normal priors at once i.e. for coefficients beta: normal(init = c(0.1, 2), mean = 0, sd = c(1, 2))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.