pc.ar {INLA} | R Documentation

## Utility functions for the PC prior for a an AR(p) model

### Description

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

### Usage

    inla.pc.ar.rpacf(n = 1, p, lambda = 1)

    inla.pc.ar.dpacf(pac, lambda = 1, log = TRUE)

### Arguments

`n` | Number of observations
`p` | The order of the AR-model
`lambda` | The rate parameter in the prior
`pac` | A vector of partial autocorrelation coefficients
`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@r-inla.org

[Package INLA version 26.02.05 Index]