rsde3d {Sim.DiffProc} | R Documentation |
Transition density and random generation for the joint and marginal of (X(t-s),Y(t-s),Z(t-s) | X(s)=x0,Y(s)=y0,Z(s)=z0)
of the SDE's 3-d.
rsde3d(object, ...) dsde3d(object, ...) ## Default S3 method: rsde3d(object, at, ...) ## Default S3 method: dsde3d(object, pdf=c("Joint","Marginal"), at, ...) ## S3 method for class 'dsde3d' plot(x,display="rgl",hist=FALSE,...)
object |
an object inheriting from class |
at |
time between |
pdf |
probability density function |
x |
an object inheriting from class |
display |
display plots. |
hist |
if |
... |
potentially arguments to be passed to methods, such as |
The function rsde3d
returns a M
random variable x(t=at),y(t=at),z(t=at) realize at time t=at.
And dsde3d
returns a trivariate kernel density approximation for (X(t-s),Y(t-s),Z(t-s) | X(s)=x0,Y(s)=y0,Z(s)=z0)
. with t=at is a fixed time between t0
and T
.
An overview of this package, see browseVignettes('Sim.DiffProc')
for more informations.
dsde3d
gives the trivariate density approximation (X(t-s),Y(t-s),Z(t-s) | X(s)=x0,Y(s)=y0,Z(s)=z0)
.
rsde3d
generates random of the (X(t-s),Y(t-s),Z(t-s) | X(s)=x0,Y(s)=y0,Z(s)=z0)
.
A.C. Guidoum, K. Boukhetala.
kde
Kernel density estimate for 1- to 6-dimensional data in "ks" package.
sm.density
Nonparametric density estimation in one, two or three dimensions in "sm" package.
kde3d
Compute a three dimension kernel density estimate in "misc3d" package.
rng
random number generators in "yuima" package.
rcBS
, rcCIR
, rcOU
and rsOU
in package "sde".
## Example 1: Ito sde ## dX(t) = (2*(Y(t)>0)-2*(Z(t)<=0)) dt + 0.2 * dW1(t) ## dY(t) = -2*Y(t) dt + 0.2 * dW2(t) ## dZ(t) = -2*Z(t) dt + 0.2 * dW3(t) ## W1(t), W2(t) and W3(t) three independent Brownian motion set.seed(1234) fx <- expression(2*(y>0)-2*(z<=0) , -2*y, -2*z) gx <- rep(expression(0.2),3) mod3d1 <- snssde3d(x0=c(0,2,-2),drift=fx,diffusion=gx,M=1000,Dt=0.003) # random at t= 0.75 r3d1 <- rsde3d(mod3d1,at=0.75) summary(r3d1) # Marginal transition density at t=0.75, t0=0 denM <- dsde3d(mod3d1,pdf="M",at=0.75) denM plot(denM) # for Joint transition density at t=0.75;t0=0 # Multiple isosurfaces ## Not run: denJ <- dsde3d(mod3d1,pdf="J", at= 0.75) denJ plot(denJ,display="rgl") ## End(Not run) ## Example 2: Stratonovich sde ## dX(t) = Y(t)* dt + X(t) o dW1(t) ## dY(t) = (4*( 1-X(t)^2 )* Y(t) - X(t))* dt + 0.2 o dW2(t) ## dZ(t) = (4*( 1-X(t)^2 )* Z(t) - X(t))* dt + 0.2 o dW3(t) set.seed(1234) fx <- expression( y , (4*( 1-x^2 )* y - x), (4*( 1-x^2 )* z - x)) gx <- expression( x , 0.2, 0.2) mod3d2 <- snssde3d(drift=fx,diffusion=gx,M=1000,type="str") # random r3d2 <- rsde3d(mod3d2) summary(r3d2) # Marginal transition density at t=1, t0=0 denM <- dsde3d(mod3d2,pdf="M") denM plot(denM) # for Joint transition density at t=1;t0=0 # Multiple isosurfaces ## Not run: denJ <- dsde3d(mod3d2,pdf="J") denJ plot(denJ,display="rgl") ## End(Not run) ## Example 3: Tivariate Transition Density of 3 Brownian motion (W1(t),W2(t),W3(t)) in [0,1] ## Not run: B3d <- snssde3d(drift=rep(expression(0),3),diffusion=rep(expression(1),3),M=500) for (i in seq(B3d$Dt,B3d$T,by=B3d$Dt)){ plot(dsde3d(B3d, at = i,pdf="J"),box=F,main=paste0('Transition Density t = ',i)) } ## End(Not run)