[Yuima-commits] r322 - in pkg/yuima: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 2 14:51:20 CEST 2014


Author: iacus
Date: 2014-09-02 14:51:19 +0200 (Tue, 02 Sep 2014)
New Revision: 322

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/R/qmle.R
   pkg/yuima/R/yuima.sampling.R
Log:
fixed nasty bug in setSampling

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2014-09-02 11:33:32 UTC (rev 321)
+++ pkg/yuima/DESCRIPTION	2014-09-02 12:51:19 UTC (rev 322)
@@ -1,7 +1,7 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package for SDEs
-Version: 1.0.25
+Version: 1.0.26
 Date: 2014-09-02
 Depends: methods, zoo, stats4, utils, expm
 Suggests: cubature, mvtnorm

Modified: pkg/yuima/R/qmle.R
===================================================================
--- pkg/yuima/R/qmle.R	2014-09-02 11:33:32 UTC (rev 321)
+++ pkg/yuima/R/qmle.R	2014-09-02 12:51:19 UTC (rev 322)
@@ -1415,7 +1415,8 @@
 	env <- new.env()
     assign("X",  as.matrix(onezoo(yuima)), envir=env)
     assign("deltaX",  matrix(0, n-1, d.size), envir=env)
-
+    assign("Cn.r", rep(1,n-1), envir=env)
+    
     if(is.CARMA(yuima)){
         env$X<-as.matrix(env$X[,1])
         env$deltaX<-as.matrix(env$deltaX[,1])

Modified: pkg/yuima/R/yuima.sampling.R
===================================================================
--- pkg/yuima/R/yuima.sampling.R	2014-09-02 11:33:32 UTC (rev 321)
+++ pkg/yuima/R/yuima.sampling.R	2014-09-02 12:51:19 UTC (rev 322)
@@ -104,7 +104,8 @@
                     Initial <- rep(Initial, ndim)[1:ndim]
 					Terminal <- rep(Terminal, ndim)[1:ndim]
 					if( any(Terminal < Initial))
-						stop("\nYUIMA: 'Terminal' < 'Initial'\n")	
+						stop("\nYUIMA: 'Terminal' < 'Initial'\n")
+                    n <- as.integer(n)
 					n <- rep(n, ndim)[1:ndim] 	
 					delta <- (Terminal-Initial)/n 						 
 					yuima.warn("'delta' (re)defined.")
@@ -121,7 +122,7 @@
                     Terminal <- rep(Terminal, ndim)[1:ndim]
                     if( any(Terminal < Initial))
                         stop("\nYUIMA: 'Terminal' < 'Initial'\n")
-                    n <- (Terminal-Initial)/delta
+                    n <- as.integer((Terminal-Initial)/delta)
                     n <- rep(n, ndim)[1:ndim]
                     yuima.warn("'n' (re)defined.")
                     for(i in 1:ndim)



More information about the Yuima-commits mailing list