ar1_lpdf: Evaluate the log-density of a stationary Gaussian AR(1)...

Description Usage Arguments Value Examples

Description

Evaluate the log-density of a stationary Gaussian AR(1) process, observed at times times taking values x.

Usage

1
ar1_lpdf(x, times, rho, sigma, mu = 0)

Arguments

x

A vector of observed values.

times

A vector of the time points of observation.

rho

A real number strictly less than 1 in absolute value.

sigma

A positive real number.

mu

A vector of expected values.

Value

A scalar, the log density.

Examples

1
2
3
4
5
6
7
8
9
x <- rnorm(5) + 1:5
t <- c(1, 3, 5:6, 10)
rho <- 0.5
sigma <- 1
# zero mean
ar1_lpdf(x, t, rho, sigma)
# means equal times
mu <- t
ar1_lpdf(x + mu, t, rho, sigma, mu)

BenjaK/irregulAR1 documentation built on May 30, 2019, 3:51 p.m.