Y <- EuStockMarkets
results <- SZ.prior.evaluation(window(Y, start=c(1998, 1),
end=c(1998,149)),
p=3,
lambda0=c(1,0.9),
lambda1=c(0.1,0.2),
lambda3=c(0,1),
lambda4=c(0.1,0.25),
lambda5=0,
mu5=4,
mu6=4, z=NULL,
nu=ncol(Y)+1, qm=4,
prior=0,
nstep=20,
y.future=window(Y, start=c(1998,150)))
# Now plot the RMSE and marginal posterior of the data for each of the
# 6 period forecasts as a function of the prior parameters. This can
# easily be done using a lattice graphic.
library(lattice)
attach(as.data.frame(results))
dev.new()
xyplot(RMSE ~ lambda0 | lambda1 + lambda3)
dev.new()
xyplot(logMDD ~ lambda0 | lambda1 + lambda3)
dev.new()
xyplot(LLF ~ lambda0 | lambda1 + lambda3)
Run the code above in your browser using DataLab