Learn R Programming

SALTSampler (version 1.1.0)

TriPlot: Plots MCMC Samples on a 3-Simplex

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

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

Examples

Run this code
# NOT RUN {
#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)
# }

Run the code above in your browser using DataLab