Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ARtransPars

Function to parametrize a stationary AR process


Description

The function maps a vector of length p to the vector of autoregressive coefficients of a stationary AR(p) process. It can be used to parametrize a stationary AR(p) process

Usage

ARtransPars(raw)

Arguments

raw

a vector of length p

Details

The function first maps each element of raw to (0,1) using tanh. The numbers obtained are treated as the first partial autocorrelations of a stationary AR(p) process and the vector of the corresponding autoregressive coefficients is computed and returned.

Value

The vector of autoregressive coefficients of a stationary AR(p) process corresponding to the parameters in raw.

Author(s)

Giovanni Petris, GPetris@uark.edu

References

Jones, 1987. Randomly choosing parameters from the stationarity and invertibility region of autoregressive-moving average models. Applied Statistics, 36.

Examples

(ar <- ARtransPars(rnorm(5)))
all( Mod(polyroot(c(1,-ar))) > 1 ) # TRUE

dlm

Bayesian and Likelihood Analysis of Dynamic Linear Models

v1.1-5
GPL (>= 2)
Authors
Giovanni Petris [aut, cre], Wally Gilks [ctb] (Author of original C code for ARMS)
Initial release
2018-05-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.