inst/book/ex2.14.R

# ex2.14.R
bY <- expression( (23-11*x^2+1.5*x^4-(x^6)/(2^4))/(2*x) ) 
bX <- expression( (6-11*x+6*x^2-x^3) ) 
sX <- expression( sqrt(x) )
 
set.seed(123)
X <- sde.sim(drift=bX, sigma=sX)
plot(X)
set.seed(123)
Y <- sde.sim(drift=bY, X0 = 2, method="shoji") 
plot((Y/2)^2)

Try the sde package in your browser

Any scripts or data that you put into this service are public.

sde documentation built on Sept. 9, 2022, 3:07 p.m.