Last data update: 2014.03.03

R: A Simulated Non-Linear Bivariate Diffusion
SDEsim2R Documentation

A Simulated Non-Linear Bivariate Diffusion

Description

The dataset contains discretely sampled observations for a simulated stochastic differential equation (SDE) with dynamics:

dX_t = 2.0(Y_t-X_t)dt+0.3sqrt(X_tY_t)dW_t

dY_t = 1.0(5-Y_t)dt+0.5sqrt(Y_t)dB_t

where dW_t and dB_t are standard Brownian motions, t is time and X_0 = 5, Y_0 = 5.

Usage

data("SDEsim2")

Format

A data frame with 801 observations on the following 3 variables.

Xt

Xt trajectory of the diffusion.

Yt

Yt trajectory of the diffusion.

time

Time vector (time[i+1]-time[i] = 1/8).

Examples

 data(SDEsim2)
  data(SDEsim2)
  attach(SDEsim2)
  # Have a look at the time series:
  plot(Xt~time,type='l',col='blue',ylim=c(2,10),main='Simulated Data',xlab='Time (t)',ylab='State',
       axes=FALSE)
  lines(Yt~time,col='red')
  expr1=expression(dX[t]==2(Y[t]-X[t])*dt+0.3*sqrt(X[t]*Y[t])*dW[t])
  expr2=expression(dX[t]==(5-Y[t])*dt+0.5*sqrt(Y[t])*dB[t])
  text(50,9,expr1)
  text(50,8.5,expr2)
  axis(1,seq(0,100,5))
  axis(1,seq(0,100,5/10),tcl=-0.2,labels=NA)
  axis(2,seq(0,20,2))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DiffusionRgqd)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DiffusionRgqd/SDEsim2.Rd_%03d_medium.png", width=480, height=480)
> ### Name: SDEsim2
> ### Title: A Simulated Non-Linear Bivariate Diffusion
> ### Aliases: SDEsim2
> ### Keywords: datasets
> 
> ### ** Examples
> 
>  data(SDEsim2)
>   data(SDEsim2)
>   attach(SDEsim2)
>   # Have a look at the time series:
>   plot(Xt~time,type='l',col='blue',ylim=c(2,10),main='Simulated Data',xlab='Time (t)',ylab='State',
+        axes=FALSE)
>   lines(Yt~time,col='red')
>   expr1=expression(dX[t]==2(Y[t]-X[t])*dt+0.3*sqrt(X[t]*Y[t])*dW[t])
>   expr2=expression(dX[t]==(5-Y[t])*dt+0.5*sqrt(Y[t])*dB[t])
>   text(50,9,expr1)
>   text(50,8.5,expr2)
>   axis(1,seq(0,100,5))
>   axis(1,seq(0,100,5/10),tcl=-0.2,labels=NA)
>   axis(2,seq(0,20,2))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>