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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Feb 11 02:04:13 CET 2013


Author: kyuta
Date: 2013-02-11 02:04:12 +0100 (Mon, 11 Feb 2013)
New Revision: 231

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

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2013-02-08 04:14:23 UTC (rev 230)
+++ pkg/yuima/DESCRIPTION	2013-02-11 01:04:12 UTC (rev 231)
@@ -1,8 +1,8 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package (unstable version)
-Version: 0.1.203
-Date: 2013-02-06
+Version: 0.1.204
+Date: 2013-02-11
 Depends: methods, zoo, stats4, utils
 Suggests: cubature, mvtnorm
 Author: YUIMA Project Team.

Modified: pkg/yuima/NEWS
===================================================================
--- pkg/yuima/NEWS	2013-02-08 04:14:23 UTC (rev 230)
+++ pkg/yuima/NEWS	2013-02-11 01:04:12 UTC (rev 231)
@@ -5,3 +5,4 @@
 2012/12/19: modify cce.R, noisy.sampling.R
 2012/12/22: modify cce.R
 2013/02/06: modify rng.R
+2013/02/11: modify cce.R

Modified: pkg/yuima/R/cce.R
===================================================================
--- pkg/yuima/R/cce.R	2013-02-08 04:14:23 UTC (rev 230)
+++ pkg/yuima/R/cce.R	2013-02-11 01:04:12 UTC (rev 231)
@@ -1184,6 +1184,10 @@
         idx <- d.size*(i-1)-(i-1)*i/2+(j-i)
         
         dat <- refresh_sampling(list(data[[i]],data[[j]]))
+        dattime <- apply(do.call("rbind",lapply(dat,"time")),2,"max")
+        dat[[1]] <- zoo(as.numeric(dat[[1]]),dattime)
+        dat[[2]] <- zoo(as.numeric(dat[[2]]),dattime)
+        
         dat1 <- dat[[1]]+dat[[2]]
         dat2 <- dat[[1]]-dat[[2]]
         
@@ -1195,10 +1199,10 @@
         Omega1 <- ncov.init[1,idx]
         Omega2 <- ncov.init[2,idx]
         
-        if(is.na(Sigma1)) Sigma1 <- RV.sparse(dat1,frequency=1200,utime=23400)
-        if(is.na(Sigma2)) Sigma2 <- RV.sparse(dat2,frequency=1200,utime=23400)
-        if(is.na(Omega1)) Omega1 <- Omega_BNHLS(dat1,sec=120,utime=23400)
-        if(is.na(Omega2)) Omega2 <- Omega_BNHLS(dat2,sec=120,utime=23400)
+        if(is.na(Sigma1)) Sigma1 <- RV.sparse(dat1,frequency=1200,utime=utime)
+        if(is.na(Sigma2)) Sigma2 <- RV.sparse(dat2,frequency=1200,utime=utime)
+        if(is.na(Omega1)) Omega1 <- Omega_BNHLS(dat1,sec=120,utime=utime)
+        if(is.na(Omega2)) Omega2 <- Omega_BNHLS(dat2,sec=120,utime=utime)
         
         #par1 <- optim(par1,fn=ql.ks(dat1),method=opt.method)
         #par2 <- optim(par2,fn=ql.ks(dat2),method=opt.method)
@@ -1217,8 +1221,8 @@
         Sigma <- vol.init[i]
         Omega <- nvar.init[i]
         
-        if(is.na(Sigma)) Sigma <- RV.sparse(data[[i]],frequency=1200,utime=23400)
-        if(is.na(Omega)) Omega <- Omega_BNHLS(data[[i]],sec=120,utime=23400)
+        if(is.na(Sigma)) Sigma <- RV.sparse(data[[i]],frequency=1200,utime=utime)
+        if(is.na(Omega)) Omega <- Omega_BNHLS(data[[i]],sec=120,utime=utime)
         
         #cmat[i,i] <- optim(par,fn=ql.ks(data[[i]]),method=opt.method)
         cmat[i,i] <- constrOptim(theta=c(Sigma,Omega),f=ql$n.ql,grad=ql$gr,



More information about the Yuima-commits mailing list