ARllog {bayess} | R Documentation |
This function is related to Chapter 6 on dynamical models.
It returns the numerical value of the log-likelihood associated with a time
series and an AR(p) model, along with the natural coefficients psi
of the AR(p) model
if it is defined via the roots lr
and lc
of the associated lag-polynomial.
The function thus uses either the natural parameterisation of the AR(p) model
x_t - \mu + \sum_{i=1}^p \psi_i (x_{t-i}-\mu) = \varepsilon_t
or the parameterisation via the lag-polynomial roots
\prod_{i=1}^p (1-\lambda_i B) x_t = \varepsilon_t
where B^j x_t = x_{t-j}
.
ARllog(p,dat,pr, pc, lr, lc, mu, sig2, compsi = TRUE, pepsi = c(1, rep(0, p)))
p |
order of the AR |
dat |
time series modelled by the AR |
pr |
number of real roots |
pc |
number of non-conjugate complex roots |
lr |
real roots |
lc |
complex roots, stored as real part for odd indices and imaginary part for even indices |
mu |
drift coefficient |
sig2 |
variance of the Gaussian white noise |
compsi |
boolean variable indicating whether the coefficients |
pepsi |
potential p+1 coefficients |
ll |
value of the log-likelihood |
ps |
vector of the |
ARllog(p=3,dat=faithful[,1],pr=3,pc=0,
lr=c(-.1,.5,.2),lc=0,mu=0,sig2=var(faithful[,1]),compsi=FALSE,pepsi=c(1,rep(.1,3)))