MAllog | R Documentation |
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-μ = \varepsilon_t - ∑_{j=1}^p ψ_{j} \varepsilon_{t-j}
or the parameterisation via the lag-polynomial roots
x_t - μ = ∏_{i=1}^p (1-λ_i B) \varepsilon_t
where B^j \varepsilon_t = \varepsilon_{t-j}.
MAllog(p,dat,pr,pc,lr,lc,mu,sig2,compsi=T,pepsi=rep(0,p),eps=rnorm(p))
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 μ such that (X_t-μ)_t is a standard MA(p) series |
sig2 |
variance of the Gaussian white noise (\varepsilon_t)_t |
compsi |
boolean variable indicating whether the coefficients ψ_i need to be retrieved
from the roots of the lag-polynomial (if |
pepsi |
potential coefficients ψ_i, computed by the function if |
eps |
white noise terms (\varepsilon_t)_{t≤ 0} with negative indices |
ll |
value of the log-likelihood |
ps |
vector of the ψ_i's, similar to the entry if |
ARllog
, MAmh
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.