Calculate the log predictive likelihood for a specified set of parents and a fixed delta.
dlm.lpl(Yt, Ft, delta, priors = priors.spec())
the vector of observed time series, length T
.
the matrix of covariates, dim = number of thetas (p
) x number of time
points (T
), usually a row of 1s to represent an intercept and the time series of
the parent nodes.
discount factor (scalar).
list with prior hyperparameters.
the vector or matrix of the posterior mean (location parameter), dim = p x T
.
and CSt
the posterior scale matrix C_{t}
is C_{t} = C*_{t} x S_{t}
,
with dim = p x p x T
, where S_{t}
is a point estimate for the observation variance
phi^{-1}
and RSt
the prior scale matrix R_{t}
is R_{t} = R*_{t} x S_{t-1}
,
with dim = p x p x T
, where S_{t-1}
is a point estimate for the observation
variance phi^{-1}
at the previous time point.
and dt
the vectors of the updated hyperparameters for the precision phi
with length T
.
the vector of the point estimate for the observation variance phi^{-1}
with
length T
.
the vector of the one-step forecast location parameter with length T
.
the vector of the one-step forecast scale parameter with length T
.
the vector of the standardised forecast residuals with length T
,
\(\newline\) defined as (Y_{t} - f_{t}) / sqrt (Q_{t})
.
the vector of the Log Predictive Likelihood with length T
.
West, M. & Harrison, J., 1997. Bayesian Forecasting and Dynamic Models. Springer New York.
# NOT RUN {
data("utestdata")
Yt = myts[,1]
Ft = t(cbind(1,myts[,2:5]))
m = dlm.lpl(Yt, Ft, 0.7)
# }
Run the code above in your browser using DataLab