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-μ = \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}.

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. (lc is either 0 when pc=0 or a vector of even length when pc>0.)

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 TRUE) or not (if FALSE)

pepsi

potential coefficients ψ_i, computed by the function if compsi is TRUE

eps

white noise terms (\varepsilon_t)_{t≤ 0} with negative indices

Value

ll

value of the log-likelihood

ps

vector of the ψ_i's, similar to the entry if compsi is FALSE

See Also

ARllog, MAmh

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))

[Package bayess version 1.4 Index]