plot.AR: plot.AR

Description Usage Arguments Examples

View source: R/plot.AR.R

Description

The function plot.ARs() plots the target vs. the proposal density and the empirical vs. the theoretical density of the samples.

Usage

1
2
## S3 method for class 'AR'
plot(ARsample, ggplot = FALSE)

Arguments

ARsample

samples created by acceptance rejection

ggplot

indicates if you want to use ggplot; please note that ggplot has to be installed in this case

Examples

1
2
3
4
5
6
C <- 1.6
lambda <- 0.5
f <- function(x) {x*exp(-x)}

ARsimulation <- ARsim(f, C, 100000, rate = lambda)
plot(ARsimulation)

aumath-advancedr2019/ACM_2019 documentation built on Nov. 26, 2019, 2:07 a.m.