dot-postAR1: Draws from the posterior the autoregressive parameter of a...

.postAR1R Documentation

Draws from the posterior the autoregressive parameter of a stationary AR(1) process without starting values.

Description

Draws from the posterior the autoregressive parameter of a stationary AR(1) process without starting values.

Usage

.postAR1(Y, phi, phi0, Q0, sigma, lb = -Inf, ub = Inf)

Arguments

Y

a Tn x 1 vector.

phi

a scalar containing the last draw of the autoregressive parameter \phi.

phi0

a scalar containing the prior mean for phi.

Q0

a scalar containing the prior precision for phi.

sigma

a scalar containing the innovation variance.

lb

(optional) lower bound for phi.

ub

(optional) upper bound for phi.

Details

The corresponding model is given by Y_t = \phi Y_{t-1} + e_t, where e_t ~ N(0, \sigma) with prior distribution p(\phi) = N(\phi_0, 1/Q_0 ).

Conditional on the variance \sigma, the posterior is normal and known.

Stationarity and box constraints are enforced. If the stationarity constraint is not fulfilled, the last draw is returned.


RGAP documentation built on Nov. 2, 2023, 6:02 p.m.