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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun May 28 14:22:34 CEST 2017


Author: lorenzo
Date: 2017-05-28 14:22:34 +0200 (Sun, 28 May 2017)
New Revision: 614

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/R/qmle.R
Log:
CARMA Levy: qmle "fixed" arg

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2017-05-22 16:42:07 UTC (rev 613)
+++ pkg/yuima/DESCRIPTION	2017-05-28 12:22:34 UTC (rev 614)
@@ -1,7 +1,7 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project Package for SDEs
-Version: 1.6.5
+Version: 1.6.6
 Depends: R(>= 2.10.0), methods, zoo, stats4, utils, expm, cubature, mvtnorm
 Imports: Rcpp (>= 0.12.1)
 Author: YUIMA Project Team

Modified: pkg/yuima/R/qmle.R
===================================================================
--- pkg/yuima/R/qmle.R	2017-05-22 16:42:07 UTC (rev 613)
+++ pkg/yuima/R/qmle.R	2017-05-28 12:22:34 UTC (rev 614)
@@ -356,8 +356,8 @@
 
 
   fixed.par <- names(fixed) # We use Fixed.par when we consider a Carma with scale parameter
+  fixed.carma=NULL
   if(is.CARMA(yuima) && (length(measure.par)>0)){
-    fixed.carma=NULL
     if(!missing(fixed)){
       if(names(fixed) %in% measure.par){
         idx.fixed.carma<-match(names(fixed),measure.par)
@@ -425,8 +425,12 @@
     idx.xinit <- as.integer(na.omit(match(xinit.par,nm)))# We need to add idx if NoNeg.Noise is TRUE
     #}
   }
-
-  idx.fixed <- match(fixed.par, nm)
+  #if(is.null(fixed.carma)){
+    idx.fixed <- match(fixed.par, nm)
+#  }else{
+  #   dummynm <- nm[!(nm %in% fixed.par)]
+  #   idx.fixed <- match(fixed.par, dummynm)
+  # }
   orig.idx.fixed <- idx.fixed
 
   tmplower <- as.list( rep( -Inf, length(nm)))
@@ -624,7 +628,7 @@
         #     HESS<-HESS[,-idx.noise]
         #   }
         # }
-        if(is.CARMA(yuima)&& length(fixed)>0){
+        if(is.CARMA(yuima)&& length(fixed)>0 && length(yuima at model@parameter at measure)==0){
           for(i in c(1:length(fixed.par))){
             indx.fixed<-match(fixed.par[i],rownames(HESS))
             HESS<-HESS[-indx.fixed,]
@@ -3022,16 +3026,16 @@
 
   env$aggregation<-aggregation
   if(is.na(paramLev[1])){
-    covLev<-matrix(NA,length(paramLev),length(paramLev))
+    covLev<-matrix(0,length(paramLev),length(paramLev))
   }else{
     covLev<-Lev.hessian(params=paramLev,env)
     rownames(covLev)<-names(paramLev)
     if(!is.null(fixed.carma)){
-      covLev[names.fixed,]<-matrix(NA,numb.fixed,lengpar)
+      covLev[names.fixed,]<-matrix(0,numb.fixed,lengpar)
     }
     colnames(covLev)<-names(paramLev)
     if(!is.null(fixed.carma)){
-      covLev[,names.fixed]<-matrix(NA,lengpar,numb.fixed)
+      covLev[,names.fixed]<-matrix(0,lengpar,numb.fixed)
     }
   }
   if(aggregation==FALSE){



More information about the Yuima-commits mailing list