rw2: Construct a second-order random walk component

Description Usage Arguments

View source: R/rw.R

Description

Auxiliary function used inside of the formula of walker.

Usage

1
rw2(formula, data, beta, sigma = c(2, 1e-04), nu, gamma = NULL)

Arguments

formula

Formula for RW2 part of the model. Only right-hand-side is used.

data

Optional data.frame.

beta

A vector of length two which defines the prior mean and standard deviation of the Gaussian prior for coefficients at time 1.

sigma

A vector of length two, defining the Gamma prior for the slope level standard deviation. First element corresponds to the shape parameter and second to the rate parameter. Default is Gamma(2, 0.0001).

nu

A vector of length two which defines the prior mean and standard deviation of the Gaussian prior for the slopes nu at time 1.

gamma

An optional vector defining a damping of the slope level noises. More specifically, the variance of the conditional distribution of state_t+1 given state is of form gamma_t * sigma.


walker documentation built on Sept. 11, 2021, 9:07 a.m.