[Yuima-commits] r162 - in pkg/yuima: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jul 29 03:56:34 CEST 2011
Author: kamatani
Date: 2011-07-29 03:56:29 +0200 (Fri, 29 Jul 2011)
New Revision: 162
Modified:
pkg/yuima/DESCRIPTION
pkg/yuima/R/asymptotic_term_second.R
pkg/yuima/R/llag.R
Log:
fix small bugs
Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION 2011-07-22 07:25:49 UTC (rev 161)
+++ pkg/yuima/DESCRIPTION 2011-07-29 01:56:29 UTC (rev 162)
@@ -1,8 +1,8 @@
Package: yuima
Type: Package
Title: The YUIMA Project package (unstable version)
-Version: 0.1.192
-Date: 2011-07-22
+Version: 0.1.1922
+Date: 2011-07-29
Depends: methods, zoo, stats4, utils
Suggests: cubature, mvtnorm
Author: YUIMA Project Team.
Modified: pkg/yuima/R/asymptotic_term_second.R
===================================================================
--- pkg/yuima/R/asymptotic_term_second.R 2011-07-22 07:25:49 UTC (rev 161)
+++ pkg/yuima/R/asymptotic_term_second.R 2011-07-29 01:56:29 UTC (rev 162)
@@ -943,7 +943,7 @@
## initialization part
division <- nrow(X.t0)
- delta <- T/(division - 1)
+# delta <- T/(division - 1)
# make expressions of derivation of V0
dx.drift <- Derivation.vector(V0,state,d.size,d.size)
Modified: pkg/yuima/R/llag.R
===================================================================
--- pkg/yuima/R/llag.R 2011-07-22 07:25:49 UTC (rev 161)
+++ pkg/yuima/R/llag.R 2011-07-29 01:56:29 UTC (rev 162)
@@ -63,21 +63,27 @@
}
mat <- cbind(y[2:(n-1)],tmp[2:(n-1)])
-
- opt <- mat[,1][abs(mat[,2])==max(abs(mat[,2]))][1] # make the first timing of max or min
- return(-opt)
+
+ idx <- abs(mat[,2])==max(abs(mat[,2]))
+ mlag <- mat[,1][idx][1] # make the first timing of max or min
+ cov <- mat[,2][idx][1]
+ return(list(lag=-mlag,cov=cov))
}
theta <- matrix(numeric(d^2),ncol=d)
+ covmat <- cce(dat)$covmat
for(i in 1:(d-1)){
for(j in (i+1):d){
- theta[i,j] <- find_lag(i,j)
+ fl <- find_lag(i,j)
+ theta[i,j] <- fl$lag
+ covmat[i,j] <- fl$cov
theta[j,i] <- -theta[i,j]
+ covmat[j,i] <- -covmat[i,j]
}
}
- covmat <- lagcce(dat at zoo.data,theta)
+# covmat <- lagcce(dat at zoo.data,theta)
cormat <- diag(1/sqrt(diag(covmat)))%*%covmat%*%diag(1/sqrt(diag(covmat)))
if(verbose==TRUE){
More information about the Yuima-commits
mailing list