data(CPFs)
res <- vorobT(CPFs, reference = c(2, 200))
print(res$threshold)
## Display Vorob'ev expectation and attainment function
# First style
eafplot(CPFs[,1:2], sets = CPFs[,3], percentiles = c(0, 25, 50, 75, 100, res$threshold),
main = substitute(paste("Empirical attainment function, ",beta,"* = ", a, "%"),
list(a = formatC(res$threshold, digits = 2, format = "f"))))
# Second style
eafplot(CPFs[,1:2], sets = CPFs[,3], percentiles = c(0, 20, 40, 60, 80, 100),
col = gray(seq(0.8, 0.1, length.out = 6)^0.5), type = "area",
legend.pos = "bottomleft", extra.points = res$VE, extra.col = "cyan",
extra.legend = "VE", extra.lty = "solid", extra.pch = NA, extra.lwd = 2,
main = substitute(paste("Empirical attainment function, ",beta,"* = ", a, "%"),
list(a = formatC(res$threshold, digits = 2, format = "f"))))
# Now print Vorob'ev deviation
VD <- vorobDev(CPFs, res$VE, reference = c(2, 200))
print(VD)
# Now display the symmetric deviation function.
symDifPlot(CPFs, res$VE, res$threshold, nlevels = 11)
# Levels are adjusted automatically if too large.
symDifPlot(CPFs, res$VE, res$threshold, nlevels = 200, legend.pos = "none")
# Use a different palette.
symDifPlot(CPFs, res$VE, res$threshold, nlevels = 11, col.fun = heat.colors)
Run the code above in your browser using DataLab