ARllog {bayess}R Documentation

log-likelihood associated with an AR(p) model defined either through its natural coefficients or through the roots of the associated lag-polynomial

Description

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 - μ + ∑_{i=1}^p ψ_i (x_{t-i}-μ) = \varepsilon_t

or the parameterisation via the lag-polynomial roots

∏_{i=1}^p (1-λ_i B) x_t = \varepsilon_t

where B^j x_t = x_{t-j}.

Usage

ARllog(p,dat,pr, pc, lr, lc, mu, sig2, compsi = TRUE, pepsi = c(1, rep(0, p)))

Arguments

p

order of the AR(p) model

dat

time series modelled by the AR(p) model

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 μ such that (x_t-μ)_t is a standard AR(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, i.e. if the model is defined by pepsi (when compsi is FALSE) or by lr and lc (when compsi is TRUE).

pepsi

potential p+1 coefficients ψ_i if compsi is FALSE, with 1 as the compulsory first value

Value

ll

value of the log-likelihood

ps

vector of the ψ_i's

See Also

MAllog,ARmh

Examples

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

[Package bayess version 1.4 Index]