[Yuima-commits] r21 - pkg/yuima/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 24 16:19:25 CET 2009
Author: abrouste
Date: 2009-11-24 16:19:25 +0100 (Tue, 24 Nov 2009)
New Revision: 21
Modified:
pkg/yuima/R/simulate.R
Log:
up
Modified: pkg/yuima/R/simulate.R
===================================================================
--- pkg/yuima/R/simulate.R 2009-11-24 15:17:50 UTC (rev 20)
+++ pkg/yuima/R/simulate.R 2009-11-24 15:19:25 UTC (rev 21)
@@ -89,17 +89,7 @@
}
}
-
- ##:: check if DRIFT and/or DIFFUSION has values
- has.drift <- sum(as.character(sdeModel at drift) != "(0)")
- var.in.diff <- is.logical(any(match(unlist(lapply(sdeModel at diffusion, all.vars)), sdeModel at state.variable)))
-
- ##:: set variables
- modelstate <- sdeModel at solve.variable
- modeltime <- sdeModel at time.variable
- V0 <- sdeModel at drift
- V <- sdeModel at diffusion
-
+
par.len <- length(sdeModel at parameter@all)
if(par.len>0){
for(i in 1:par.len){
@@ -109,14 +99,8 @@
}
- ##:: Initialization
- ##:: set time step
- delta <- Terminal/division
- ##:: initialize state variables
- dX <- xinit
- if(space.discretized){
-
+ if(space.discretized){
##:: using Space-discretized Euler-Maruyama method
yuima at data <- space.discretized(xinit, yuima)
return(yuima)
@@ -124,7 +108,6 @@
-
##:: using Euler-Maruyama method
##:: Diffusion terms
@@ -136,9 +119,6 @@
dW <- increment.W
}
-
-
-
yuima at data <- euler(xinit,yuima,dW)
return(yuima)
})
More information about the Yuima-commits
mailing list