Learn R Programming

fanplot (version 2.3)

fanplot-package: fanplot

Description

The fanplot package contains a collection of R functions to effectively display plots of sequential distributions such as probabilistic forecasts or posterior distrubtions of volatilty estimates.

Arguments

Details

The plotting of distributions are based around two functions. The first, pn, calculates the percentiles for a set of sequential distributions over a specified time period. The second, fan, plots the calculated percentiles of the sequential distributions. The resulting plot is a set of coloured polygon, with shadings corresponding to the percentile values. ll{ Package: tsbugs Type: Package License: GPL-2 }

References

Blog posts with many additional details of the implementation of functions in the package can be found at: http://gjabel.wordpress.com/category/r/fanplot/

Examples

Run this code
# calculate percentiles across time
th.pn <- pn(sims = th.mcmc)

# empty plot
plot(NULL, type = "n", xlim = c(1, 945),  ylim = range(th.pn), ylab = "Theta")

# add fan
fan(th.pn)

Run the code above in your browser using DataLab