sampleARmu: Sample the unconditional mean in an AR(1) Model

Description Usage Arguments Details Value

View source: R/component_samplers.R

Description

Compue one draw of the unconditional mean mu in an AR(1) model assuming a Gaussian prior (with mean zero).

Usage

1
sampleARmu(yt, phi_j, sigma_tj, priorPrec = NULL)

Arguments

yt

the T x p matrix of multivariate time series

phi_j

the p x 1 vector of AR(1) coefficients

sigma_tj

the (T-1) x p matrix or p x 1 vector of error standard deviations

priorPrec

the p x 1 vector of prior precisions; if NULL, use rep(10^-6, p)

Details

Sample the unconditional mean mu using the model

y_tj = mu_j + phi_j(y_{t-1,j} - mu_j) + e_tj,

with e_tj ~ N(0, sigma[j]^2) and prior mu ~ N(0, 1/priorPrec[j])

Value

The p x 1 matrix of unconditional means.


drkowal/FDLM documentation built on May 20, 2019, 5:20 p.m.