[Yuima-commits] r635 - in pkg/yuima: . R man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 16 14:38:47 CET 2018


Author: kyuta
Date: 2018-01-16 14:38:47 +0100 (Tue, 16 Jan 2018)
New Revision: 635

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/NEWS
   pkg/yuima/R/llag.R
   pkg/yuima/man/llag.Rd
   pkg/yuima/src/cce_functions.c
Log:
a bug in computation of asymptotic variances in llag is fixed; the default value of tol is changed to 1e-7

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2017-12-02 13:17:00 UTC (rev 634)
+++ pkg/yuima/DESCRIPTION	2018-01-16 13:38:47 UTC (rev 635)
@@ -1,7 +1,7 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project Package for SDEs
-Version: 1.7.5
+Version: 1.7.6
 Depends: R(>= 2.10.0), methods, zoo, stats4, utils, expm, cubature, mvtnorm
 Imports: Rcpp (>= 0.12.1), boot (>= 1.3-2)
 Author: YUIMA Project Team

Modified: pkg/yuima/NEWS
===================================================================
--- pkg/yuima/NEWS	2017-12-02 13:17:00 UTC (rev 634)
+++ pkg/yuima/NEWS	2018-01-16 13:38:47 UTC (rev 635)
@@ -52,4 +52,7 @@
 2017/04/27: modified qmleLevy.R, qmleLevy.Rd, IC.Rd
 2017/09/09: boot package is imported
             added llag.test.R, llag.test.Rd
-            modified llag.R, bns.test.Rd, llag.Rd, mllag.Rd, hyavar.Rd, cce.Rd, cce_functions.c
\ No newline at end of file
+            modified llag.R, bns.test.Rd, llag.Rd, mllag.Rd, hyavar.Rd, cce.Rd, cce_functions.c
+2018/01/16: a bug in computation of asymptotic variances in llag is fixed
+            the default value of tol of llag is changed to 1e-7
+            modified llag.R, llag.Rd, cce_functions.c 
\ No newline at end of file

Modified: pkg/yuima/R/llag.R
===================================================================
--- pkg/yuima/R/llag.R	2017-12-02 13:17:00 UTC (rev 634)
+++ pkg/yuima/R/llag.R	2018-01-16 13:38:47 UTC (rev 635)
@@ -98,7 +98,7 @@
 
 
 ## function to compute asymptotic variances
-llag.avar <- function(x, grid, bw, alpha, fisher, ser.diffX, ser.times, vol, cormat, ccor, idx, G, d, d.size){
+llag.avar <- function(x, grid, bw, alpha, fisher, ser.diffX, ser.times, vol, cormat, ccor, idx, G, d, d.size, tol){
   
   # treatment of the bandwidth
   if(missing(bw)){
@@ -118,6 +118,8 @@
       
     }
     
+  }else{
+    bw <- bw/tol
   }
   
   bw <- matrix(bw, d, d)
@@ -193,7 +195,7 @@
 ## main body
 setGeneric( "llag", function(x, from = -Inf, to = Inf, division = FALSE, 
                              verbose = (ci || ccor), grid, psd = TRUE, plot = ci,
-                             ccor = ci, ci = FALSE, alpha = 0.01, fisher = TRUE, bw, tol = 1e-6) standardGeneric("llag") )
+                             ccor = ci, ci = FALSE, alpha = 0.01, fisher = TRUE, bw, tol = 1e-7) standardGeneric("llag") )
 
 ## yuima-method
 setMethod("llag", "yuima", function(x, from, to, division, verbose, grid, psd, plot, 
@@ -366,7 +368,7 @@
     out <- llag.avar(x = x, grid = grid, bw = bw, alpha = alpha, fisher = fisher,
                      ser.diffX = ser.diffX, ser.times = ser.times, 
                      vol = vol, cormat = cormat, ccor = crosscor, idx = idx, 
-                     G = G, d = d, d.size = d.size)
+                     G = G, d = d, d.size = d.size, tol = tol)
     
     p <- out$p
     CI <- out$CI

Modified: pkg/yuima/man/llag.Rd
===================================================================
--- pkg/yuima/man/llag.Rd	2017-12-02 13:17:00 UTC (rev 634)
+++ pkg/yuima/man/llag.Rd	2018-01-16 13:38:47 UTC (rev 635)
@@ -7,7 +7,7 @@
 \usage{
 llag(x, from = -Inf, to = Inf, division = FALSE, verbose = (ci || ccor), 
      grid, psd = TRUE, plot = ci, ccor = ci, ci = FALSE, alpha = 0.01, 
-     fisher = TRUE, bw, tol = 1e-6)
+     fisher = TRUE, bw, tol = 1e-7)
 }
 \arguments{
 

Modified: pkg/yuima/src/cce_functions.c
===================================================================
--- pkg/yuima/src/cce_functions.c	2017-12-02 13:17:00 UTC (rev 634)
+++ pkg/yuima/src/cce_functions.c	2018-01-16 13:38:47 UTC (rev 635)
@@ -668,6 +668,10 @@
     int mu[*N], w[*N], q[*N], r[*N];
     double rtimes[*N], Sigma11[*N], Sigma12[*N], Sigma22[*N], H1[*N], H2[*N], H12[*N], H3[*N], dS2[*N], dxdy[*N], tmptime[*ylength];
     
+    for(i = 0; i < *xlength; i++){
+      xtime[i] = round(xtime[i]);
+    }
+    
     for (k = 0; k < *gridL; k++) {
         
         for(j = 0; j < *ylength; j++){



More information about the Yuima-commits mailing list