plot_distribution_chart: Plot the distribution of states in a given node

View source: R/plot.R

plot_distribution_chartR Documentation

Plot the distribution of states in a given node

Description

This function plots the posterior distribution for a state (or all states) in particular node, highlighting the confidence interval desired calculated using the highest posterior density (HPD).

Usage

plot_distribution_chart(map, nodes=NULL, trees=NULL, states=NULL, conf_level=95
	                        , number_of_ticks=20, type='emr')

Arguments

map

A result of a map_posterior_distribution execution;

nodes

A vector containing the nodes to filter, or NULL to not filter;

trees

A vector containing the trees to filter, or NULL to not filter;

states

A vector containing the states to filter, or NULL to not filter;

conf_level

An integer representing the confidence level desired, ranging from 0 to 100. Defaults to 95 percent;

number_of_ticks

The number of intervals in the x axis. Defaults to 20;

type

emr for expected markov reward (dwelling times) or lmt for labelled markov transitions (number of transitions). Defaults to emr;

Value

This function returns a ggplot object that shows the plot when printed. The print itself can be changed as the pleased, using regular ggplot layers functions.

Author(s)

Diego Pasqualin dpasqualin@inf.ufpr.br

See Also

map_posterior_distribution, sfreemap

Examples

sm <- sfreemap(sfreemap.corals.trees, sfreemap.corals.tips, parallel=FALSE)
map <- map_posterior_distribution(sm[[1]], sm, parallel=FALSE)
p <- plot_distribution_chart(map, 160)
print(p)

dpasqualin/sfreemapc documentation built on July 5, 2023, 10:52 a.m.