[Robast-commits] r798 - branches/robast-1.0/pkg/RobExtremes/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Dec 17 20:40:19 CET 2014
Author: ruckdeschel
Date: 2014-12-17 20:40:18 +0100 (Wed, 17 Dec 2014)
New Revision: 798
Modified:
branches/robast-1.0/pkg/RobExtremes/R/GEVFamily.R
branches/robast-1.0/pkg/RobExtremes/R/GEVFamilyMuUnknown.R
Log:
[RobExtremes] found a bug in L2deriv in GEV if shape <0
Modified: branches/robast-1.0/pkg/RobExtremes/R/GEVFamily.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/R/GEVFamily.R 2014-12-04 19:13:24 UTC (rev 797)
+++ branches/robast-1.0/pkg/RobExtremes/R/GEVFamily.R 2014-12-17 19:40:18 UTC (rev 798)
@@ -342,7 +342,7 @@
Lambda1 <- function(x) {
y <- x*0
- ind <- (x > tr-sc/k) # = [later] (x1>0)
+ ind <- if(k>0)(x > tr-sc/k) else (x<tr-sc/k)# = [later] (x1>0)
x <- (x[ind]-tr)/sc
x1 <- 1 + k * x
y[ind] <- (x*(1-x1^(-1/k))-1)/x1/sc
@@ -351,7 +351,7 @@
}
Lambda2 <- function(x) {
y <- x*0
- ind <- (x > tr-sc/k) # = [later] (x1>0)
+ ind <- if(k>0)(x > tr-sc/k) else (x<tr-sc/k)# = [later] (x1>0)
x <- (x[ind]-tr)/sc
x1 <- 1 + k * x
x2 <- x / x1
Modified: branches/robast-1.0/pkg/RobExtremes/R/GEVFamilyMuUnknown.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/R/GEVFamilyMuUnknown.R 2014-12-04 19:13:24 UTC (rev 797)
+++ branches/robast-1.0/pkg/RobExtremes/R/GEVFamilyMuUnknown.R 2014-12-17 19:40:18 UTC (rev 798)
@@ -311,7 +311,7 @@
k1 <- k+1
Lambda0 <- function(x) {
y <- x*0
- ind <- (x > tr-sc/k) # = [later] (x1>0)
+ ind <- if(k>0)(x > tr-sc/k) else (x<tr-sc/k)# = [later] (x1>0)
x <- (x[ind]-tr)/sc
x1 <- 1 + k * x
t1 <- x1^(-1/k)
@@ -322,7 +322,7 @@
Lambda1 <- function(x) {
y <- x*0
- ind <- (x > tr-sc/k) # = [later] (x1>0)
+ ind <- if(k>0)(x > tr-sc/k) else (x<tr-sc/k)# = [later] (x1>0)
x <- (x[ind]-tr)/sc
x1 <- 1 + k * x
y[ind] <- (x*(1-x1^(-1/k))-1)/x1/sc
@@ -331,7 +331,7 @@
}
Lambda2 <- function(x) {
y <- x*0
- ind <- (x > tr-sc/k) # = [later] (x1>0)
+ ind <- if(k>0)(x > tr-sc/k) else (x<tr-sc/k)# = [later] (x1>0)
x <- (x[ind]-tr)/sc
x1 <- 1 + k * x
x2 <- x / x1
More information about the Robast-commits
mailing list