[Yuima-commits] r653 - pkg/yuimaGUI/inst/yuimaGUI/server

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 23 06:55:27 CEST 2018


Author: phoenix844
Date: 2018-05-23 06:55:27 +0200 (Wed, 23 May 2018)
New Revision: 653

Modified:
   pkg/yuimaGUI/inst/yuimaGUI/server/functions.R
Log:
ppr

Modified: pkg/yuimaGUI/inst/yuimaGUI/server/functions.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server/functions.R	2018-05-22 10:32:58 UTC (rev 652)
+++ pkg/yuimaGUI/inst/yuimaGUI/server/functions.R	2018-05-23 04:55:27 UTC (rev 653)
@@ -226,17 +226,32 @@
   if (name == "Power Low Intensity"){
     boundsJump <- jumpBounds(jumps = jumps, strict = strict, data = data)
     if (strict==TRUE) return(list(lower=c(list("alpha"=0, "beta"=NA), boundsJump$lower),upper=c(list("alpha"=NA, "beta"=NA), boundsJump$upper)))
-    else return(list(lower=c(list("alpha"=0, "beta"=-3), boundsJump$lower),upper=c(list("alpha"=0.1/delta^(3/2), "beta"=3), boundsJump$upper)))
+    else {
+      x <- as.numeric(diff(data))
+      counts <- length(x[x!=0 & !is.na(x)])
+      alpha <- counts/(length(x)*delta)
+      return(list(lower=c(list("alpha"=0, "beta"=0), boundsJump$lower),upper=c(list("alpha"=alpha, "beta"=0), boundsJump$upper)))
+    }
   }
   if (name == "Linear Intensity"){
     boundsJump <- jumpBounds(jumps = jumps, strict = strict, data = data)
     if (strict==TRUE) return(list(lower=c(list("alpha"=0, "beta"=0), boundsJump$lower),upper=c(list("alpha"=NA, "beta"=NA), boundsJump$upper)))
-    else return(list(lower=c(list("alpha"=0, "beta"=0), boundsJump$lower),upper=c(list("alpha"=1/delta, "beta"=0.1/delta^2), boundsJump$upper)))
+    else {
+      x <- as.numeric(diff(data))
+      counts <- length(x[x!=0 & !is.na(x)])
+      alpha <- counts/(length(x)*delta)
+      return(list(lower=c(list("alpha"=0, "beta"=0), boundsJump$lower),upper=c(list("alpha"=alpha, "beta"=0), boundsJump$upper)))
+    }
   }
   if (name == "Exponentially Decaying Intensity"){
     boundsJump <- jumpBounds(jumps = jumps, strict = strict, data = data)
     if (strict==TRUE) return(list(lower=c(list("alpha"=0, "beta"=0), boundsJump$lower),upper=c(list("alpha"=NA, "beta"=NA), boundsJump$upper)))
-    else return(list(lower=c(list("alpha"=0, "beta"=0), boundsJump$lower),upper=c(list("alpha"=1/delta, "beta"=1/delta), boundsJump$upper)))
+    else {
+      x <- as.numeric(diff(data))
+      counts <- length(x[x!=0 & !is.na(x)])
+      alpha <- counts/(length(x)*delta)
+      return(list(lower=c(list("alpha"=0, "beta"=0), boundsJump$lower),upper=c(list("alpha"=alpha, "beta"=0), boundsJump$upper)))
+    }
   }
   if (name == "Periodic Intensity"){
     boundsJump <- jumpBounds(jumps = jumps, strict = strict, data = data)



More information about the Yuima-commits mailing list