Learn R Programming

DiffusionRgqd (version 0.1.3)

SDEsim1: A Simulated Diffusion with Sinusoidal Drift and State-Dependant Diffusion Coefficient.

Description

The dataset contains discretely sampled observations for a simulated stochastic differential equation (SDE) with dynamics: dX_t = 2(5+3sin(0.25pi t)-X_t)dt+0.5sqrt(X_t)dW_t

where dW_t is standard Brownian motion, t is time and X_0 = 7.

Usage

data(SDEsim1)

Arguments

Format

A data frame with 401 observations with the following variables:
  1. Xt : A numeric vector of simulated observations.
  2. time : A numeric vector of time nodes at which Xt was observed (time[i+1]-time[i] = 1/4).

Details

The process was simulated by numerically solving the SDE using a Euler-Maruyama scheme with stepsize = 1/2000. Subsequently each 200-th observation was recorded in order to construct the resulting time series.

References

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

Examples

Run this code
 data(SDEsim1)
 attach(SDEsim1)
 par(mfrow=c(1,1))
 expr1=expression(dX[t]==2*(5+3*sin(0.5*pi*t)-X[t])*dt+0.5*sqrt(X[t])*dW[t])
 plot(Xt~time,type='l',col='blue',xlab='Time (t)',ylab=expression(X[t]),main=expr1)

Run the code above in your browser using DataLab