@@ -88,6 +88,10 @@ plot2d(mod2[[1]],type="n")
8888lines2d(mod2 [[1 ]],col = 4 )
8989points2d(mod2 [[1 ]],pch = 19 ,cex = 0.1 )
9090
91+ Sigma <- matrix (c(1 , 0.75 , 0.75 , 1 ), nrow = 2 , ncol = 2 )
92+ mod2 <- lapply(1 : 2 , function (i )
93+ snssde2d(N = 50 ,drift = fx ,diffusion = gx ,corr = Sigma ,Dt = 0.005 ,M = 2 ,method = meth [i ]))
94+
9195# #
9296
9397mod2 <- lapply(2 : length(meth ), function (i )
@@ -114,6 +118,10 @@ moment(mod2[[1]], at = s , center= TRUE , order = 4)
114118moment(mod2 [[1 ]], at = s , center = FALSE , order = 4 )
115119bconfint(mod2 [[1 ]], at = s )
116120
121+ Sigma <- matrix (c(1 , 0.75 , 0.75 , 1 ), nrow = 2 , ncol = 2 )
122+ mod2 <- lapply(1 : 2 , function (i )
123+ snssde2d(N = 50 ,drift = fx ,diffusion = gx ,corr = Sigma ,Dt = 0.005 ,M = 2 ,method = meth [i ],type = " str" ))
124+
117125# ####### 3d
118126
119127fx <- expression(4 * (- 1 - x )* y , 4 * (1 - y )* x , 4 * (1 - z )* y )
@@ -140,6 +148,9 @@ plot(mod3[[1]])
140148bconfint(mod3 [[1 ]])
141149plot3D(mod3 [[1 ]],display = " persp" ,main = " 3-dim bridge sde" )
142150
151+ Sigma <- matrix (c(1 ,- 0.5 ,- 0.25 ,- 0.5 ,1 ,0.95 ,- 0.25 ,0.95 ,1 ),nrow = 3 ,ncol = 3 )
152+ mod3 <- lapply(1 : 2 , function (i )
153+ snssde3d(N = 50 ,drift = fx ,diffusion = gx ,corr = Sigma ,M = 2 ,method = meth [i ]))
143154# #
144155
145156
@@ -166,6 +177,10 @@ moment(mod3[[1]], at = s , center= TRUE , order = 4)
166177moment(mod3 [[1 ]], at = s , center = FALSE , order = 4 )
167178bconfint(mod3 [[1 ]], at = s )
168179
180+ Sigma <- matrix (c(1 ,- 0.5 ,- 0.25 ,- 0.5 ,1 ,0.95 ,- 0.25 ,0.95 ,1 ),nrow = 3 ,ncol = 3 )
181+ mod3 <- lapply(1 : 2 , function (i )
182+ snssde3d(N = 50 ,drift = fx ,diffusion = gx ,corr = Sigma ,M = 2 ,method = meth [i ],type = " str" ))
183+
169184# ############################
170185s = 0.00458
171186f <- expression( 2 * (1 - x ) )
0 commit comments