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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Dec 21 17:17:03 CET 2012


Author: kyuta
Date: 2012-12-21 17:17:03 +0100 (Fri, 21 Dec 2012)
New Revision: 217

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/NEWS
   pkg/yuima/R/cce.R
Log:
modify cce.R

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2012-12-19 00:54:26 UTC (rev 216)
+++ pkg/yuima/DESCRIPTION	2012-12-21 16:17:03 UTC (rev 217)
@@ -1,8 +1,8 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package (unstable version)
-Version: 0.1.200
-Date: 2012-12-19
+Version: 0.1.201
+Date: 2012-12-22
 Depends: methods, zoo, stats4, utils
 Suggests: cubature, mvtnorm
 Author: YUIMA Project Team.

Modified: pkg/yuima/NEWS
===================================================================
--- pkg/yuima/NEWS	2012-12-19 00:54:26 UTC (rev 216)
+++ pkg/yuima/NEWS	2012-12-21 16:17:03 UTC (rev 217)
@@ -2,4 +2,5 @@
 2012/12/13: add noisy.sampling.R, noisy.sampling.Rd
             modify bns.test.R, cce.R, llag.R, mpv.R, bns.test.Rd, cce.Rd, llag.Rd, mpv.Rd
 2012/12/19: modify cce.R
-2012/12/19: modify cce.R, noisy.sampling.R
\ No newline at end of file
+2012/12/19: modify cce.R, noisy.sampling.R
+2012/12/22: modify cce.R
\ No newline at end of file

Modified: pkg/yuima/R/cce.R
===================================================================
--- pkg/yuima/R/cce.R	2012-12-19 00:54:26 UTC (rev 216)
+++ pkg/yuima/R/cce.R	2012-12-21 16:17:03 UTC (rev 217)
@@ -322,7 +322,9 @@
 Omega_BNHLS <- function(zdata,sec=120,utime){
   
   #q <- ceiling(sec/mean(diff(as.numeric(time(zdata))*utime)))
-  q <- ceiling(sec*(length(zdata)-1)/utime)
+  #q <- ceiling(sec*(length(zdata)-1)/utime)
+  ztime <- as.numeric(time(zdata))
+  q <- ceiling(sec*(length(zdata)-1)/(utime*(tail(ztime,n=1)-head(ztime,n=1))))
   obj <- diff(as.numeric(zdata),lag=q)
   n <- length(obj)
   
@@ -2048,7 +2050,8 @@
       grid <- grid+rep(1,n.sparse)
       if(grid[n.sparse]>Terminal){
         grid <- grid[-n.sparse]
-        I <- I[,-n.sparse]
+        #I <- I[,-n.sparse]
+        I <- as.matrix(I[,-n.sparse])
         n.sparse <- n.sparse-1
       }
     }
@@ -2142,7 +2145,8 @@
       grid <- grid+rep(1,n.sparse)
       if(grid[n.sparse]>Terminal){
         grid <- grid[-n.sparse]
-        I <- I[,-n.sparse]
+        #I <- I[,-n.sparse]
+        I <- as.matrix(I[,-n.sparse])
         n.sparse <- n.sparse-1
       }
     }



More information about the Yuima-commits mailing list