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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 1 23:44:24 CEST 2015


Author: lorenzo
Date: 2015-04-01 23:44:24 +0200 (Wed, 01 Apr 2015)
New Revision: 369

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/R/MM.COGARCH.R
   pkg/yuima/R/setCogarch.R
Log:
Fix bugs



Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2015-03-15 20:11:31 UTC (rev 368)
+++ pkg/yuima/DESCRIPTION	2015-04-01 21:44:24 UTC (rev 369)
@@ -1,8 +1,8 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project package for SDEs
-Version: 1.0.60
-Date: 2015-03-15
+Version: 1.0.61
+Date: 2015-04-01
 Depends: methods, zoo, stats4, utils, expm, cubature, mvtnorm
 Author: YUIMA Project Team
 Maintainer: Stefano M. Iacus <stefano.iacus at unimi.it>

Modified: pkg/yuima/R/MM.COGARCH.R
===================================================================
--- pkg/yuima/R/MM.COGARCH.R	2015-03-15 20:11:31 UTC (rev 368)
+++ pkg/yuima/R/MM.COGARCH.R	2015-04-01 21:44:24 UTC (rev 369)
@@ -367,8 +367,9 @@
   # Build an object of class mle
   if(Est.Incr=="NoIncr"){
       res<-new("cogarch.gmm", call = call, coef = coef, fullcoef = unlist(coef), 
-                vcov = vcov, min = exp(min), details = list(), 
+                vcov = vcov, min = min, details = list(), 
                 method = character(),
+                model = model,
                 objFun = objFun 
                )
   }
@@ -382,7 +383,7 @@
   if(Est.Incr=="Incr"){
   # Build an object of class cogarch.gmm.incr
       res<-new("cogarch.gmm.incr", call = call, coef = coef, fullcoef = unlist(coef), 
-                vcov = vcov, min = exp(min), details = list(), 
+                vcov = vcov, min = min, details = list(), 
                 method = character(),
                 Incr.Lev = L.Incr_Fin,
                 model = model, nobs=as.integer(length(L.Incr)+1),
@@ -404,6 +405,8 @@
                                                 to=yuima at sampling@n[1],
                                                 by=env$deltaData
       )])
+    }else{
+      inc.levy1 <- L.Incr
     }
     
     result.Lev <- gmm.Est.Lev(Increment.lev=c(0,inc.levy1), 
@@ -419,7 +422,7 @@
     
     if(is.null(result.Lev)){
        res<-new("cogarch.gmm.incr", call = call, coef = coef, fullcoef = unlist(coef), 
-             vcov = vcov, min = exp(min), details = list(), 
+             vcov = vcov, min = min, details = list(), 
              method = character(),
              Incr.Lev=L.Incr_Fin,
              model = model, nobs=as.integer(length(L.Incr)+1),
@@ -431,11 +434,11 @@
     else{
       Inc.Parm<-result.Lev$estLevpar
       IncVCOV<-result.Lev$covLev
-      
-      names(Inc.Parm)<-meas.par
-      rownames(IncVCOV)<-as.character(meas.par)
-      colnames(IncVCOV)<-as.character(meas.par)
-      
+      if(length(meas.par)==length(Inc.Parm)){
+        names(Inc.Parm)<-meas.par
+        rownames(IncVCOV)<-as.character(meas.par)
+        colnames(IncVCOV)<-as.character(meas.par)
+      }
       name.parm.cog<-names(coef)
       coef<-c(coef,Inc.Parm)
       
@@ -450,7 +453,7 @@
       cov<-cov
       
       res<-new("cogarch.gmm.incr", call = call, coef = coef, fullcoef = unlist(coef), 
-               vcov = cov, min = exp(min), details = list(), 
+               vcov = cov, min = min, details = list(), 
                method = character(),
                Incr.Lev=L.Incr_Fin,
                model = model, nobs=as.integer(length(L.Incr)+1),
@@ -784,7 +787,7 @@
             print(object at call)
             cat("\nCoefficients:\n")
             print(coef(object))
-            cat("\n",paste0(paste("objFun", object at objFun),":"), object at objFunVal, "\n")
+            cat("\n",paste0(paste("Log.objFun", object at objFun),":"), object at objFunVal, "\n")
             #cat("objFun", object at min, "\n")
           }
 )
@@ -824,7 +827,7 @@
             cat("\nCoefficients:\n")
             print(coef(object))
 #             cat("\n-2 log L:", object at m2logL, "\n")
-            cat("\n",paste0(paste("objFun", object at objFun),":"), object at objFunVal, "\n")
+            cat("\n",paste0(paste("Log.objFun", object at objFun),":"), object at objFunVal, "\n")
             
             cat(sprintf("\n\nNumber of increments: %d\n",object at NumbI))
             cat(sprintf("\nAverage of increments: %f\n",object at MeanI))

Modified: pkg/yuima/R/setCogarch.R
===================================================================
--- pkg/yuima/R/setCogarch.R	2015-03-15 20:11:31 UTC (rev 368)
+++ pkg/yuima/R/setCogarch.R	2015-04-01 21:44:24 UTC (rev 369)
@@ -110,6 +110,8 @@
                         ma.par=ma.par,
                         loc.par=loc.par,
                         lin.par=ma.par,
+                        Carma.var=V.var,
+                        Latent.var=Latent.var,
                         XinExpr=XinExpr,
                         Cogarch=TRUE)
     #  In order to have a representation of a Cogarch(p,q) model coherent with the 
@@ -123,6 +125,8 @@
                           ar.par=ar.par,
                           ma.par=ma.par,
                           lin.par=ma.par,
+                          Carma.var=V.var,
+                          Latent.var=Latent.var,
                           xinit=mydots$xinit,
                           Cogarch=TRUE)
       #  In order to have a representation of a Cogarch(p,q) model coherent with the 



More information about the Yuima-commits mailing list