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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 5 10:44:19 CEST 2010


Author: iacus
Date: 2010-08-05 10:44:18 +0200 (Thu, 05 Aug 2010)
New Revision: 123

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/NEWS
   pkg/yuima/R/CPoint.R
Log:
fixed bug in sym cpoint est

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2010-08-04 08:53:13 UTC (rev 122)
+++ pkg/yuima/DESCRIPTION	2010-08-05 08:44:18 UTC (rev 123)
@@ -1,8 +1,8 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package (unstable version)
-Version: 0.1.12
-Date: 2010-08-04
+Version: 0.1.13
+Date: 2010-08-05
 Depends: methods, zoo, stats4, utils
 Suggests: cubature, mvtnorm
 Author: YUIMA Project Team.

Modified: pkg/yuima/NEWS
===================================================================
--- pkg/yuima/NEWS	2010-08-04 08:53:13 UTC (rev 122)
+++ pkg/yuima/NEWS	2010-08-05 08:44:18 UTC (rev 123)
@@ -1,3 +1,7 @@
+Changes in Version 0.1.13
+
+  o fixed a bug in symmetrized cpoint estimator
+
 Changes in Version 0.1.12
 
   o added change point estimator with symmetrized QML approximation

Modified: pkg/yuima/R/CPoint.R
===================================================================
--- pkg/yuima/R/CPoint.R	2010-08-04 08:53:13 UTC (rev 122)
+++ pkg/yuima/R/CPoint.R	2010-08-05 08:44:18 UTC (rev 123)
@@ -246,28 +246,25 @@
 	n.theta <- n.theta1
 	
 	d.size <- yuima at model@equation.number
-#n <- length(yuima)[1]
-	n <- dim(env$X)[1]
-	
+
+	n <- dim(env$X)[1]-1
+
     idx0 <- 1:round((n-1)/2)
-	vec <- matrix((env$deltaX[2*idx0+1]-2* env$deltaX[2*idx0]+env$deltaX[2*idx0-1])/sqrt(2), length(idx0), dim(env$X)[2])
-	
+
+	vec <- matrix((env$X[2*idx0+1]-2* env$X[2*idx0]+env$X[2*idx0-1])/sqrt(2), length(idx0), dim(env$X)[2])
+
 	K <- -0.5*d.size * log( (2*pi*h) )
 	
-#	print(length(idx0))
-#print(dim(vec))
-	
+
 	QL <- 0
-	pn <- numeric(length(idx0)-1)
+	pn <- numeric(length(idx0))
 	diff <- diffusion.term(yuima, param, env)
 	dimB <- dim(diff[, , 1])
 	
 	if(is.null(dimB)){  # one dimensional X
-		for(t in idx0[-length(idx0)]){
+		for(t in idx0){
 			yB <- diff[, , 2*t-1]^2
 			logdet <- log(yB)
-#	print(t)
-#			print(vec[t, ]^2/(h*yB))
 			pn[t] <- K - 0.5*logdet-0.5*vec[t, ]^2/(h*yB) 
 			QL <- QL+pn[t]
 			



More information about the Yuima-commits mailing list