[Yuima-commits] r335 - in pkg/yuima: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Sep 29 14:25:28 CEST 2014
Author: iacus
Date: 2014-09-29 14:25:28 +0200 (Mon, 29 Sep 2014)
New Revision: 335
Modified:
pkg/yuima/DESCRIPTION
pkg/yuima/R/sim.euler.R
pkg/yuima/R/simulate.R
Log:
completed Levy, also increment.L works
Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION 2014-09-29 11:40:51 UTC (rev 334)
+++ pkg/yuima/DESCRIPTION 2014-09-29 12:25:28 UTC (rev 335)
@@ -1,7 +1,7 @@
Package: yuima
Type: Package
Title: The YUIMA Project package for SDEs
-Version: 1.0.35
+Version: 1.0.36
Date: 2014-09-29
Depends: methods, zoo, stats4, utils, expm, cubature, mvtnorm
Author: YUIMA Project Team
Modified: pkg/yuima/R/sim.euler.R
===================================================================
--- pkg/yuima/R/sim.euler.R 2014-09-29 11:40:51 UTC (rev 334)
+++ pkg/yuima/R/sim.euler.R 2014-09-29 12:25:28 UTC (rev 335)
@@ -10,7 +10,8 @@
d.size <- sdeModel at equation.number
Terminal <- yuima at sampling@Terminal[1]
n <- yuima at sampling@n[1]
-
+ dL <- env$dL
+
# dX <- xinit
# 06/11 xinit is an expression: the structure is equal to that of V0
@@ -247,6 +248,7 @@
F.env <- new.env(parent=env)
assign("mu.size", mu.size, envir=F.env)
assign("N_sharp", N_sharp, envir=F.env)
+
randJ <- eval(F, F.env) ## this expression is evaluated in the F.env
j <- 1
@@ -308,7 +310,10 @@
cat(paste("Code \"", code, "\" not supported yet.\n", sep=""))
return(NULL)
}
- dZ <- eval(parse(text=dZ))
+ if(!is.null(dL))
+ dZ <- dL
+ else
+ dZ <- eval(parse(text=dZ))
##:: calcurate difference eq.
#print(str(dZ))
if(is.null(dim(dZ)))
Modified: pkg/yuima/R/simulate.R
===================================================================
--- pkg/yuima/R/simulate.R 2014-09-29 11:40:51 UTC (rev 334)
+++ pkg/yuima/R/simulate.R 2014-09-29 12:25:28 UTC (rev 335)
@@ -176,7 +176,7 @@
if(space.discretized == TRUE){
yuima.warn("Parameter increment must be invalid if space.discretized=TRUE.")
return(NULL)
- }else if(dim(increment.L)[1] != r.size){
+ }else if(dim(increment.L)[1] != length(yuima at model@jump.coeff[[1]]) ){ #r.size){
yuima.warn("Length of increment's row must be same as yuima at model@noise.number.")
return(NULL)
}else if(dim(increment.L)[2] != n){
@@ -186,9 +186,9 @@
}
+ yuimaEnv$dL <- increment.L
-
if(space.discretized){
##:: using Space-discretized Euler-Maruyama method
yuima at data <- space.discretized(xinit, yuima, yuimaEnv)
More information about the Yuima-commits
mailing list