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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Apr 26 13:44:05 CEST 2015


Author: lorenzo
Date: 2015-04-26 13:44:05 +0200 (Sun, 26 Apr 2015)
New Revision: 377

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/R/yuima.R
Log:


Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2015-04-25 16:31:21 UTC (rev 376)
+++ pkg/yuima/DESCRIPTION	2015-04-26 11:44:05 UTC (rev 377)
@@ -1,7 +1,7 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package for SDEs
-Version: 1.0.65
+Version: 1.0.66
 Date: 2015-04-25
 Depends: methods, zoo, stats4, utils, expm, cubature, mvtnorm
 Author: YUIMA Project Team

Modified: pkg/yuima/R/yuima.R
===================================================================
--- pkg/yuima/R/yuima.R	2015-04-25 16:31:21 UTC (rev 376)
+++ pkg/yuima/R/yuima.R	2015-04-26 11:44:05 UTC (rev 377)
@@ -244,12 +244,28 @@
 setYuima <-
   function(data=NULL, model=NULL, sampling=NULL, characteristic=NULL, functional=NULL){
     if(is.CARMA(model)&& !is.null(data)){
-      if(is.null(dim(data at original.data))){
-        data<-setData(zoo(x=matrix(as.numeric(data at original.data),length(data at original.data),
-                                   (model at info@p+1)), order.by=time(data at zoo.data[[1]])))  
+      if(dim(data at original.data)[2]==1){
+        dum.matr<-matrix(0,length(data at original.data),
+                         (model at info@p+1))
+        dum.matr[,1]<-as.numeric(data at original.data)
+        data<-setData(zoo(x=dum.matr, order.by=time(data at zoo.data[[1]])))  
       
-      } 
-    }# LM 05/09/14 
+      }       
+    }
+    if(is.COGARCH(model)&& !is.null(data)){
+      if(dim(data at original.data)[2]==1){
+#         data<-setData(zoo(x=matrix(as.numeric(data at original.data),length(data at original.data),
+#                                    (model at info@p+1)), order.by=time(data at zoo.data[[1]])))  
+        dum.matr<-matrix(0,length(data at original.data),
+                         (model at info@p+2))
+        dum.matr[,1]<-as.numeric(data at original.data)
+        data<-setData(zoo(x=dum.matr, order.by=time(data at zoo.data[[1]])))  
+        
+        
+      }       
+    }
+    
+    # LM 25/04/15 
     return(new("yuima", data=data, model=model, sampling=sampling, characteristic=characteristic,functional=functional))
   }
 



More information about the Yuima-commits mailing list