MAllog {bayess} | R Documentation |
log-likelihood associated with an MA(p) model
Description
This function returns the numerical value of the log-likelihood associated with a time series and an MA(p) model in Chapter 7. It either uses the natural parameterisation of the MA(p) model
x_t-\mu = \varepsilon_t - \sum_{j=1}^p \psi_{j} \varepsilon_{t-j}
or the parameterisation via the lag-polynomial roots
x_t - \mu = \prod_{i=1}^p (1-\lambda_i B) \varepsilon_t
where B^j \varepsilon_t = \varepsilon_{t-j}
.
Usage
MAllog(p,dat,pr,pc,lr,lc,mu,sig2,compsi=T,pepsi=rep(0,p),eps=rnorm(p))
Arguments
p |
order of the MA model |
dat |
time series modelled by the MA(p) model |
pr |
number of real roots in the lag polynomial |
pc |
number of complex roots in the lag polynomial, necessarily even |
lr |
real roots |
lc |
complex roots, stored as real part for odd indices and
imaginary part for even indices. ( |
mu |
drift parameter |
sig2 |
variance of the Gaussian white noise |
compsi |
boolean variable indicating whether the coefficients |
pepsi |
potential coefficients |
eps |
white noise terms |
Value
ll |
value of the log-likelihood |
ps |
vector of the |
See Also
Examples
MAllog(p=3,dat=faithful[,1],pr=3,pc=0,lr=rep(.1,3),lc=0,
mu=0,sig2=var(faithful[,1]),compsi=FALSE,pepsi=rep(.1,3),eps=rnorm(3))