[Yuima-commits] r491 - pkg/yuima/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 26 10:55:23 CEST 2016
Author: iacus
Date: 2016-10-26 10:55:23 +0200 (Wed, 26 Oct 2016)
New Revision: 491
Modified:
pkg/yuima/R/simulate.R
Log:
fixed Terminal-Initial in simulate
Modified: pkg/yuima/R/simulate.R
===================================================================
--- pkg/yuima/R/simulate.R 2016-10-25 21:54:01 UTC (rev 490)
+++ pkg/yuima/R/simulate.R 2016-10-26 08:55:23 UTC (rev 491)
@@ -333,6 +333,8 @@
sdeModel <- yuima at model
Terminal <- yuima at sampling@Terminal[1]
+ Initial <- yuima at sampling@Initial[1]
+
n <- yuima at sampling@n[1]
r.size <- sdeModel at noise.number
d.size <- sdeModel at equation.number
@@ -432,7 +434,7 @@
##:: using Euler-Maruyama method
- delta <- Terminal/n
+ delta <- (Terminal-Initial)/n
if(missing(increment.W) | is.null(increment.W)){
@@ -450,7 +452,7 @@
} else {
- delta<-Terminal/n
+ delta<-(Terminal-Initial)/n
if(!is.Poisson(sdeModel)){ # if pure CP no need to setup dW
dW <- rnorm(n * r.size, 0, sqrt(delta))
dW <- matrix(dW, ncol=n, nrow=r.size,byrow=TRUE)
More information about the Yuima-commits
mailing list