Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the log likelihood of a partially cointegrated model
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())
|
Y |
The time series that is to be modeled. A plain or |
X |
A (possibly |
beta |
A vector of length |
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:
Default: |
nu |
The degrees-of-freedom parameter to be used if |
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.
The log of the likelihood score of the Kalman filter
Matthew Clegg matthewcleggphd@gmail.com
Christopher Krauss christopher.krauss@fau.de
Jonas Rende jonas.rende@fau.de
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
egcm
Engle-Granger cointegration model
partialAR
Partially autoregressive models
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.