DiffusionRjgqd (version 0.1.1)

JGQD.plot: Quick Plots for DiffusionRjgqd Objects

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

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

References

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

See Also

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

Examples

Run this code
  
#===============================================================================
# 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)

  

Run the code above in your browser using DataCamp Workspace