exdqlmChecks {exdqlm} | R Documentation |
exDQLM Diagnostics
Description
The function computes the following for the model(s) provided: the posterior predictive loss criterion based off the check loss, the one-step-ahead distribution sequence and its KL divergence from normality. The function also plots the following: the qq-plot and ACF plot corresponding to the one-step-ahead distribution sequence, and a time series plot of the MAP standard forecast errors.
Usage
exdqlmChecks(
y,
m1,
m2 = NULL,
plot = TRUE,
cols = c("grey", "grey"),
ref = NULL
)
Arguments
y |
A univariate time-series. |
m1 |
An object of class " |
m2 |
An optional additional object of class " |
plot |
If |
cols |
Color(s) used to plot diagnostics. |
ref |
Reference sample of size |
Value
A list containing the following is returned:
-
m1.uts
- The one-step-ahead distribution sequence ofm1
. -
m1.KL
- The KL divergence ofm1.uts
and a standard normal. -
m1.pplc
- The posterior predictive loss criterion ofm1
based off the check loss function. -
m1.qq
- The ordered pairs of the qq-plot comparingm1.uts
with a standard normal distribution. -
m1.acf
- The autocorrelations ofm1.uts
by lag.
If m2
is provided, analogous results for m2
are also included in the list.
Examples
y = scIVTmag[1:100]
model = polytrendMod(1,mean(y),10)
M0 = exdqlmISVB(y,p0=0.85,model,df=c(0.95),dim.df = c(1),
gam.init=-3.5,sig.init=15)
check.out = exdqlmChecks(y,M0,plot=FALSE)
check.out$m1.KL
check.out$m1