Likelihood of an autoregressive time series model with i.i.d. normal innovations
lik_ar(x, ar, mean = 0, sd = 1, log = F, full = T)
x
: numeric vector of dataar
: vector of ar parametersmean
: the innovation meansd
: the innovation standard deviationlog
: logical; if TRUE, probabilities p are given as log(p)full
: logical; if TRUE, the full likelihood for all observations is computed; if FALSE, the partial likelihood for the last n-p observationsnumeric value for the likelihood or log-likelihood
Useful links