hist: Histogram over all simulations

Description Usage Arguments Examples

Description

A plot method for simulations of a piecewise deterministic markov process (PDMP). It plots every continous variable in its own histogram and all discrete variables in a stacked barplot.

Usage

1
2
3
4
5
6
## S3 method for class 'multSimData'
hist(x, t, bins = 15, main, sub, ggplot = FALSE,
  ...)

## S3 method for class 'multSim'
hist(x, t, main, sub, ...)

Arguments

x

object of class multSimData or multSim.

t

a single time value at which the histogram shall be plotted. The parameter can be omitted if x contains only one time value.

bins

integer. Number of bins for the histogram of the continous variables.

main

optional character string for the title of the plot. If x is a multSim object, main will be set as descr(x$model) if not otherwise specified.

sub

optional character string for the subtitle of the plot. The default value for a multSim object x gives informations about parameters and the initial values.

ggplot

boolean value. If ggplot = TRUE, the plot is generated with methods from package ggplot2. Note that in this case, package gridExtra has to be installed. If ggplot = FALSE, base methods are used to generate the plot.

...

additional parameters passed to the default method of geom_histogram (if ggplot = TRUE) or hist (if ggplot = FALSE).

Examples

1
2
3
4
data("simplePdmp")
ms <- multSim(simplePdmp, seeds = 1:10)
hist(ms, t = 10)
hist(getMultSimData(ms), t = 10, density = 10)

CharlotteJana/pdmpsim documentation built on July 2, 2019, 5:37 a.m.