TriPlot: Plots MCMC Samples on a 3-Simplex

Description Usage Arguments Note Examples

Description

This function plots samples from a 3-simplex projected into two dimensions. If sumStat is true, numerical summaries are also plotted on the graph. In particular, the theoretical mean is calculated under the assumption that the initial values entered by the user for center in the runMh function are correct. For type 'dirichlet' the theoretical mode is also calculated under the assumption that the initial values entered by the user for center in the runMh function are correct. These values are plotted along with the samples in the projected space.

Usage

1
TriPlot(mhOut, sumStat = FALSE)

Arguments

mhOut

Output of the RunMh function

sumStat

Boolean indicating whether or not summary statistics should be plotted on the graph

Note

If two or more parameter values are near zero, this plot may not be useful. In such cases, all samples may overlap in a single corner of the triangle, limiting the useful visual information provided by this plot.

Examples

1
2
3
4
#Dirichlet triangle plot
dir <- RunMh(center = c(0.7, 0.2, 0.1), B = 2e3, concentration = 10,
                        h = c(2, 2, 2), type = 'dirichlet', dat = NULL)
TriPlot(mhOut = dir, sumStat = TRUE)

Example output

Loading required package: lattice

SALTSampler documentation built on May 2, 2019, 11:27 a.m.