plotChromeplus: Create a density plot from Chromeplus results

View source: R/plotChromeplus.R

plotChromeplusR Documentation

Create a density plot from Chromeplus results

Description

Function makes a density plot of Chromeplus results.

Usage

plotChromeplus(data, colors, x_title, y_title = "density", main_title, 
legend_title = "parameters", alpha_geom = 0.75, alpha_line = 0.75)

Arguments

data

A data frame containing results returned from ChromePlus. The first column should be the MCMC iteration number, the last column is the probability of each iteration and the intermediate columns are the parameters included in the model.

colors

A character vector containing hex codes for plotting. The length of the vector should be the same as the number of parameters included in the model.

x_title

The text for the x-axis title.

y_title

The text for the y-axis title. Default is "density".

main_title

The text for the main title for the plot.

legend_title

The text for the legend title. Default is "parameters".

alpha_geom

A numeric value indicating the alpha parameter for the geometric shapes within the plot. Defaults to 0.75

alpha_line

A numeric value indicating the alpha parameter for the geometric lines for the HPD intervals within the plot. Defaults to 0.75

Value

Plots a density map. A vector with highest posterior density values for each parameter is returned invisibly.

Author(s)

Michelle M. Jonika and Heath Blackmon

References

http://coleoguy.github.io/


coleoguy/chromevolR documentation built on July 27, 2023, 12:40 p.m.