[Yuima-commits] r133 - pkg/yuima/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Oct 30 02:19:06 CEST 2010


Author: hinohide
Date: 2010-10-30 02:19:06 +0200 (Sat, 30 Oct 2010)
New Revision: 133

Modified:
   pkg/yuima/R/cce.R
Log:
cce restored

Modified: pkg/yuima/R/cce.R
===================================================================
--- pkg/yuima/R/cce.R	2010-10-30 00:11:40 UTC (rev 132)
+++ pkg/yuima/R/cce.R	2010-10-30 00:19:06 UTC (rev 133)
@@ -8,7 +8,7 @@
 
 setGeneric( "cce", function(x) standardGeneric("cce") )
 
-setMethod("cce", "yuima", function(x) cce(x at data) )
+setMethod("cce", "yuima", function(x) cce(x at data) ) 
 
 setMethod("cce", "yuima.data", function(x) {  
 	
@@ -79,25 +79,8 @@
 		}
 		
 	}
-	return( cmat )            
-})
 
-##:: add 2010/09/19 for list data handling
-setMethod("cce", "list", function(x){
-  ##:: init
-  cce.result <- list()
-  
-  ##:: error check and  run cce
-  for( i in 1:length(x) ){
-    if(class(x[[i]])=="yuima" || class(x[[i]])=="yuima.data"){
-      cce.result[[i]] <- cce(x[[i]])
-    }else{
-      stop("Objects in list-class must be yuima-class or yuima.data-class.")
-    }
-  }  
-
-  ##:: return result
-  names(cce.result) <- names(x)
-  return(cce.result)
-  
+    sdmat <- diag(sqrt(diag(cmat)))
+    cormat <- solve(sdmat) %*% cmat %*% solve(sdmat)
+	return( list(covmat=cmat,cormat=cormat)  )
 })



More information about the Yuima-commits mailing list