powered by
Evaluate the log-density of a stationary Gaussian AR(1) process, observed at times times taking values x.
times
x
ar1_lpdf(x, times, rho, sigma, mu = 0)
A vector of observed values.
A vector of the time points of observation.
A real number strictly less than 1 in absolute value.
A positive real number.
A vector of expected values.
A scalar, the log density.
# NOT RUN { 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) # }
Run the code above in your browser using DataLab