bridgesde1d for simulation of 1-dim diffusion bridge.bridgesde1d(N, ...)
## S3 method for class 'default':
bridgesde1d(N = 1000, M=1, x0 = 0, y = 0, t0 = 0, T = 1, Dt,
drift, diffusion, alpha = 0.5, mu = 0.5, type = c("ito", "str"),
method = c("euler", "milstein", "predcorr", "smilstein", "taylor",
"heun", "rk1", "rk2", "rk3"), ...)
## S3 method for class 'bridgesde1d':
time(x, \dots)
## S3 method for class 'bridgesde1d':
mean(x, \dots)
## S3 method for class 'bridgesde1d':
median(x, \dots)
## S3 method for class 'bridgesde1d':
quantile(x, \dots)
## S3 method for class 'bridgesde1d':
kurtosis(x, \dots)
## S3 method for class 'bridgesde1d':
skewness(x, \dots)
## S3 method for class 'bridgesde1d':
moment(x, order = 2, \dots)
## S3 method for class 'bridgesde1d':
bconfint(x, level=0.95, \dots)
## S3 method for class 'bridgesde1d':
plot(x, \dots)
## S3 method for class 'bridgesde1d':
lines(x, \dots)
## S3 method for class 'bridgesde1d':
points(x, \dots)t0.T.missing a default $\Delta t = \frac{T-t_{0}}{N}$.expression of two variables t and x.expression of two variables t and x.alpha = 0.5 and mu = 0.5.type="ito" simulation diffusion bridge of Ito type, else type="str" simulation diffusion bridge of Stratonovich type; the default type="ito".method = "euler"; see snssde1d."bridgesde1d".bridgesde1d returns a trajectory of the diffusion bridge starting at x at time t0 and ending at y at time T.
The methods of approximation are classified according to their different properties. Mainly two criteria of optimality are used in the literature: the strong
and the weak (orders of) convergence. The method of simulation can be one among: Euler-Maruyama Order 0.5, Milstein Order 1, Milstein Second-Order,
Predictor-Corrector method, Ito-Taylor Order 1.5, Heun Order 2 and Runge-Kutta Order 1, 2 and 3.
For more details see vignette("SDEs").bridgesde2d and bridgesde3d for 2 and 3-dim.
DBridge in package ## Ito Bridge sde
## dX(t) = 2*(1-X(t)) *dt + dW(t)
## x0 = 0 at time t0=0 , and y = 1 at time T=1
f <- expression( 2*(1-x) )
g <- expression( 1 )
X <- bridgesde1d(drift=f,diffusion=g,y=1,N=1000,M=100)
X
plot(X,plot.type="single")
lines(time(X),mean(X),col=2)Run the code above in your browser using DataLab