loglik.pci: Computes the log likelihood of a partially cointegrated model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Computes the log likelihood of a partially cointegrated model

Usage

1
2
3
4
loglik.pci(Y, X, beta, rho, sigma_M, sigma_R, 
  M0 = 0, R0 = 0, 
  calc_method = c("css", "kfas", "ss", "sst", "csst"), 
  nu = pci.nu.default())

Arguments

Y

The time series that is to be modeled. A plain or zoo vector of length n.

X

A (possibly zoo) matrix of dimensions n x k. If k=1, then this may be a plain or zoo vector.

beta

A vector of length k representing the weightings to be given to the components of X.

rho

The coefficient of mean reversion.

sigma_M

The standard deviation of the innovations of the mean-reverting component of the model.

sigma_R

The standard deviation of the innovations of the random walk component of the model.

M0

The initial value of the mean-reverting component. Default = 0.

R0

The initial value of the random walk component. Default = 0.

calc_method

Specifies the Kalman filter implementation that will be used for computing the likelihood score:

  • "ss" Steady-state Kalman filter

  • "css" C++ implementation of steady-state Kalman filter

  • "kfas" Kalman filter implementation of the KFAS package

  • "sst" Steady-state Kalman filter using t-distributed innovations

  • "csst" C++ implementation of steady-state Kalman filter using t-distributed innovations

Default: css

nu

The degrees-of-freedom parameter to be used if calc_method is "sst" or "csst".

Details

The partial cointegration model is given by the equations:

Y[t] = beta[1] * X[t,1] + beta[2] * X[t,2] + ... + beta[k] * X[t,k] + M[t] + R[t]

M[t] = rho * M[t-1] + epsilon_M[t]

R[t] = R[t-1] + epsilon_R[t]

-1 < rho < 1

epsilon_M[t] ~ N(0, sigma_M^2)

epsilon_R[t] ~ N(0, sigma_R^2)

Given the input series Y and X, and given the parameter values beta, rho, M0 and R0, the innovations epsilon_M[t] and epsilon_R[t] are calculated using a Kalman filter. Based upon these values, the log-likelihood score is then computed and returned.

Value

The log of the likelihood score of the Kalman filter

Author(s)

Matthew Clegg matthewcleggphd@gmail.com

Christopher Krauss christopher.krauss@fau.de

Jonas Rende jonas.rende@fau.de

References

Clegg, Matthew, 2015. Modeling Time Series with Both Permanent and Transient Components using the Partially Autoregressive Model. Available at SSRN: http://ssrn.com/abstract=2556957

See Also

egcm Engle-Granger cointegration model

partialAR Partially autoregressive models

Examples

1
2
3
4
5
6
7
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

    set.seed(1)
    YX <- rpci(n=500, beta=c(2,3,4), sigma_C=c(1,1,1), rho=0.9, sigma_M=0.1, sigma_R=0.2)
    loglik.pci(YX[,1], YX[,2:ncol(YX)], beta=c(2,3,4), rho=0.9, sigma_M=0.1, sigma_R=0.2)

partialCI documentation built on May 1, 2019, 8:21 p.m.