pc-ar: Utility functions for the PC prior for a an AR(p) model

Description Usage Arguments Value Author(s)

Description

Functions to evaluate and sample from the PC prior for an AR(p) model

Usage

1
2
3
    inla.pc.ar.rpacf(n=1, p, lambda = 1)
    inla.pc.ar.dpacf(pac, lambda = 1, log = TRUE)
 

Arguments

p

The order of the AR-model

pac

A vector of partial autocorrelation coefficients

n

Number of observations

lambda

The rate parameter in the prior

log

Logical. Return the density in natural or log-scale.

Value

inla.pc.ar.rpac generate samples from the prior, returning a matrix where each row is a sample of theta. inla.pc.ar.dpac evaluates the density of pac. Use inla.ar.pacf2phi, inla.ar.phi2pacf, inla.ar.pacf2acf and inla.ar.acf2pacf to convert between various parameterisations.

Author(s)

Havard Rue hrue@math.ntnu.no


andrewzm/INLA documentation built on May 10, 2019, 11:12 a.m.