JGQD.plot: Quick Plots for DiffusionRjgqd Objects

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/JGQD.plot.R

Description

JGQD.plot() recognizes output objects calculated using routines from the DiffusionRjgqd package and subsequently constructs an appropriate plot, for example a perspective plot of a transition density.

Usage

1
JGQD.plot(x, thin = 1, burns, h = FALSE,  palette = 'mono')

Arguments

x

Generic JGQD-objects, i.e. res = JGQD.density().

thin

Thinning interval for .mcmc objects.

burns

Number of parameter draws to discard for .mcmc objects.

h

if TRUE a histogram is drawn i.s.o. a trace plot.

palette

Colour palette for drawing trace plots. Default palette = 'mono', otherwise a qualitative palette will be used.

Value

Varies in accordance with input type.

Author(s)

Etienne A.D. Pienaar: etiannead@gmail.com

References

Updates available on GitHub at https://github.com/eta21.

See Also

JGQD.mcmc, JGQD.density, BiJGQD.density etc.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  
#===============================================================================
# Plot the transitional density of a jump diffusion
#-------------------------------------------------------------------------------
rm(list=ls(all=TRUE))
library(DiffusionRjgqd)

JGQD.remove()
# Define the jump diffusion using the DiffusionRjgqd syntax:
G1=function(t){0.2*5+0.1*sin(2*pi*t)}
G2=function(t){-0.2}
Q1=function(t){0.2}

# State dependent intensity:
Lam0 = function(t){1}
Lam1    = function(t){0.1}

# Normally distributed jumps: N(1,0.2)
Jmu    = function(t){1.0}
Jsig   = function(t){0.2}
# Normal distribution is the default:
res_1  = JGQD.density(4,seq(2,10,1/10),0,2.5,1/100,factorize=FALSE)

JGQD.plot(res_1)

  

DiffusionRjgqd documentation built on May 1, 2019, 9:21 p.m.