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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 18 06:58:42 CEST 2018


Author: lorenzo
Date: 2018-07-18 06:58:41 +0200 (Wed, 18 Jul 2018)
New Revision: 670

Modified:
   pkg/yuima/DESCRIPTION
   pkg/yuima/R/AuxMethodforPPR.R
   pkg/yuima/R/lambdaPPR.R
   pkg/yuima/src/IntensityEval.cpp
Log:
lambda.PPR

Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION	2018-07-12 11:21:33 UTC (rev 669)
+++ pkg/yuima/DESCRIPTION	2018-07-18 04:58:41 UTC (rev 670)
@@ -1,7 +1,7 @@
 Package: yuima
 Type: Package
 Title: The YUIMA Project Package for SDEs
-Version: 1.8.6
+Version: 1.8.7
 Depends: R(>= 2.10.0), methods, zoo, stats4, utils, expm, cubature, mvtnorm
 Imports: Rcpp (>= 0.12.1), boot (>= 1.3-2)
 Author: YUIMA Project Team

Modified: pkg/yuima/R/AuxMethodforPPR.R
===================================================================
--- pkg/yuima/R/AuxMethodforPPR.R	2018-07-12 11:21:33 UTC (rev 669)
+++ pkg/yuima/R/AuxMethodforPPR.R	2018-07-18 04:58:41 UTC (rev 670)
@@ -230,7 +230,8 @@
     for(i in c(1:length(yuimaPPR at PPR@counting.var))){
       cond <- yuimaPPR at model@solve.variable %in% yuimaPPR at PPR@counting.var[i]  
       dummyData <-as.numeric(yuimaPPR at data@original.data[,cond])
-      assign(yuimaPPR at PPR@counting.var[i], dummyData[-length(dummyData)],envir=my.envd2)
+      # assign(yuimaPPR at PPR@counting.var[i], dummyData[-length(dummyData)],envir=my.envd2)
+      assign(yuimaPPR at PPR@counting.var[i], dummyData,envir=my.envd2)
     }
     namedX<-NULL
     namedJumpTimeX<-NULL
@@ -241,8 +242,10 @@
         namedJumpTimeX <-c(namedJumpTimeX,paste0("JumpTime.d",yuimaPPR at Kernel@variable.Integral at var.dx[i]))
         dummyData <- diff(as.numeric(yuimaPPR at data@original.data[,cond]))# We consider only Jump
         #dummyJumpTime <- gridTime[-1][dummyData>0]
-        assign(paste0("d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), dummyData ,envir=my.envd2)
-        assign(paste0("JumpTime.d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), gridTime[-1] ,envir=my.envd2)
+        #assign(paste0("d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), dummyData ,envir=my.envd2)
+        assign(paste0("d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), c(0,dummyData) ,envir=my.envd2)
+        #assign(paste0("JumpTime.d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), gridTime[-1] ,envir=my.envd2)
+        assign(paste0("JumpTime.d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), as.numeric(gridTime) ,envir=my.envd2)
       }
     }
     
@@ -255,7 +258,8 @@
       cond <- yuimaPPR at model@solve.variable %in% yuimaPPR at PPR@covariates[i]  
       #dummyData <-yuimaPPR at data@original.data[,cond]
       dummyData <-as.numeric(yuimaPPR at data@original.data[, cond])
-      assign(yuimaPPR at PPR@covariates[i], dummyData[-length(dummyData)],envir=my.envd2)
+      #assign(yuimaPPR at PPR@covariates[i], dummyData[-length(dummyData)],envir=my.envd2)
+      assign(yuimaPPR at PPR@covariates[i], dummyData,envir=my.envd2)
     }
 
   }else{

Modified: pkg/yuima/R/lambdaPPR.R
===================================================================
--- pkg/yuima/R/lambdaPPR.R	2018-07-12 11:21:33 UTC (rev 669)
+++ pkg/yuima/R/lambdaPPR.R	2018-07-18 04:58:41 UTC (rev 670)
@@ -272,7 +272,7 @@
   # }
   
   if(Univariate){
-    Kernel<- numeric(length=length(gridTime))
+    # Kernel<- numeric(length=length(gridTime))
     NameCol <- colnames(Integrand2)
     # Kernel <- sapply(X=gridTime,FUN = InternalKernelFromPPRModel2,
     #                  Integrand2=Integrand2, Integrand2expr = Integrand2expr,my.envd1=my.envd1,my.envd2=my.envd2,
@@ -306,7 +306,7 @@
     n.row <- length(my.envd3$YUIMA.PPR at PPR@counting.var)
     n.col <- length(gridTime)
     result <- matrix(NA,n.row, n.col) 
-    Kernel<- numeric(length=n.col)
+    #Kernel<- numeric(length=n.col-1)
     
      dimCol<- dim(Integrand2)[2]
      NameCol<-colnames(Integrand2)
@@ -501,7 +501,8 @@
     for(i in c(1:length(yuimaPPR at PPR@counting.var))){
       cond <- yuimaPPR at model@solve.variable %in% yuimaPPR at PPR@counting.var[i]  
       dummyData <-as.numeric(yuimaPPR at data@original.data[,cond])
-      assign(yuimaPPR at PPR@counting.var[i], dummyData[-length(dummyData)],envir=my.envd2)
+     # assign(yuimaPPR at PPR@counting.var[i], dummyData[-length(dummyData)],envir=my.envd2)
+      assign(yuimaPPR at PPR@counting.var[i], dummyData,envir=my.envd2)
     }
     namedX<-NULL
     namedJumpTimeX<-NULL
@@ -512,8 +513,10 @@
         namedJumpTimeX <-c(namedJumpTimeX,paste0("JumpTime.d",yuimaPPR at Kernel@variable.Integral at var.dx[i]))
         dummyData <- diff(as.numeric(yuimaPPR at data@original.data[,cond]))# We consider only Jump
         #dummyJumpTime <- gridTime[-1][dummyData>0]
-        assign(paste0("d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), dummyData ,envir=my.envd2)
-        assign(paste0("JumpTime.d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), gridTime[-1] ,envir=my.envd2)
+        #assign(paste0("d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), dummyData ,envir=my.envd2)
+        assign(paste0("d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), c(0,dummyData) ,envir=my.envd2)
+        #assign(paste0("JumpTime.d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), gridTime[-1] ,envir=my.envd2)
+        assign(paste0("JumpTime.d",yuimaPPR at Kernel@variable.Integral at var.dx[i]), as.numeric(gridTime) ,envir=my.envd2)
       }
     }
     
@@ -526,7 +529,8 @@
       cond <- yuimaPPR at model@solve.variable %in% yuimaPPR at PPR@covariates[i]  
       #dummyData <-yuimaPPR at data@original.data[,cond]
       dummyData <-as.numeric(yuimaPPR at data@original.data[, cond])
-      assign(yuimaPPR at PPR@covariates[i], dummyData[-length(dummyData)],envir=my.envd2)
+      #assign(yuimaPPR at PPR@covariates[i], dummyData[-length(dummyData)],envir=my.envd2)
+      assign(yuimaPPR at PPR@covariates[i], dummyData,envir=my.envd2)
     }
 
   }else{

Modified: pkg/yuima/src/IntensityEval.cpp
===================================================================
--- pkg/yuima/src/IntensityEval.cpp	2018-07-12 11:21:33 UTC (rev 669)
+++ pkg/yuima/src/IntensityEval.cpp	2018-07-18 04:58:41 UTC (rev 670)
@@ -102,7 +102,7 @@
                              LogicalVector ExistdN, LogicalVector ExistdX,
                              List gridTime, IntegerVector dimCol,
                              StringVector NameCol, StringVector JumpTimeName){
-  int FinT = gridTime.size()-1;
+  int FinT = gridTime.size();
   int lengtcov= Namecovariates.size();
   NumericVector GlobalKernel(FinT);
   for(int t=0;t<FinT;t++){



More information about the Yuima-commits mailing list