Description Usage Arguments Details Author(s) Examples

This function provides basic plots that are extended to include samples.

1 | ```
plotSamples(X, Style="KDE", LB=0.025, UB=0.975, Title=NULL)
``` |

`X` |
This required argument is a |

`Style` |
This argument accepts the following quoted strings:
"barplot", "dotchart", "hist", "KDE", or "Time-Series". It defaults
to |

`LB` |
This argument accepts the lower bound of a probability interval, which must be in the interval [0,0.5). |

`UB` |
This argument accepts the upper bound of a probability interval, which must be in the interval (0.5,1]. |

`Title` |
This argument defaults to |

The `plotSamples`

function extends several basic plots from
points to samples. For example, it is common to use the `hist`

function to plot a histogram from a column vector. However, the user
may desire to plot a histogram of a column vector that was sampled
numerous times, rather than a simple column vector, in which a
(usually 95%) probability interval is also plotted to show the
uncertainty around the sampled median of each bin in the histogram.

The `plotSamples`

function extends the `barplot`

,
`dotchart`

, and `hist`

functions to include uncertainty due
to samples. The `KDE`

style of plot is added so that a
probability interval is shown around a sampled kernel density estimate
of a distribution, and the `Time-Series`

style of plot is added
so that a probability interval is shown around a sampled univariate
time-series.

For each style of plot, three quantiles are plotted: the lower bound (LB), median, and upper bound (UB).

One of many potential Bayesian applications is to examine the uncertainty in a predictive distribution.

Statisticat, LLC. [email protected]

1 2 3 4 5 6 7 8 9 10 | ```
#library(LaplacesDemonCpp)
#N <- 100
#S <- 100
#X <- matrix(rnorm(N*S),N,S)
#rownames(X) <- 1:100
#plotSamples(X, Style="barplot", LB=0.025, UB=0.975)
#plotSamples(X[1:10,], Style="dotchart", LB=0.025, UB=0.975)
#plotSamples(X, Style="hist", LB=0.025, UB=0.975)
#plotSamples(X, Style="KDE", LB=0.025, UB=0.975)
#plotSamples(X, Style="Time-Series", LB=0.025, UB=0.975)
``` |

LaplacesDemonR/LaplacesDemonCpp documentation built on May 9, 2017, 4:18 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.