Learn R Programming

DiffusionRgqd (version 0.1.3)

GQD.plot: Quick Plots for DiffusionRgqd Objects

Description

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

Usage

GQD.plot(x, thin = 1, burns, h = FALSE, palette = "mono")

Arguments

x
Generic GQD-objects, i.e. res = GQD.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

GQD.mcmc, GQD.mle, GQD.density, BiGQD.density etc.

Examples

Run this code
  
  # Remove any existing coefficients
  GQD.remove()         
  
  # Define drift Coefficients. Note that the limiting mean is sinusoidal.
  G0 <- function(t){2*(10+sin(2*pi*(t-0.5)))}    
  G1 <- function(t){-2}
  
  # Define sinusoidal diffusion coefficient with `faster' oscillation.
  Q1 <- function(t){0.25*(1+0.75*(sin(4*pi*t)))}
  
  states     <-  seq(5,15,1/10) # State values
  initial    <-  8              # Starting value of the process
  Tmax       <-  5              # Time horizon
  Tstart     <-  1              # Time starts at 1
  increment  <-  1/100          # Incremental time steps
  
  # Generate the transitional density
  M <- GQD.density(Xs=initial,Xt=states,s=Tstart,t=Tmax,delt=increment)
  
  GQD.plot(M)
  

Run the code above in your browser using DataLab