[Robast-commits] r974 - branches/robast-1.1/pkg/RobExtremes/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 18 18:00:18 CEST 2018


Author: ruckdeschel
Date: 2018-07-18 18:00:17 +0200 (Wed, 18 Jul 2018)
New Revision: 974

Modified:
   branches/robast-1.1/pkg/RobExtremes/R/SnQn.R
Log:
[RobExtremes] branch 1.1 changed q() to q.l in SnQn.R and new Sn method for GEVU

Modified: branches/robast-1.1/pkg/RobExtremes/R/SnQn.R
===================================================================
--- branches/robast-1.1/pkg/RobExtremes/R/SnQn.R	2018-07-18 15:58:37 UTC (rev 973)
+++ branches/robast-1.1/pkg/RobExtremes/R/SnQn.R	2018-07-18 16:00:17 UTC (rev 974)
@@ -20,9 +20,9 @@
 
 setMethod("Qn", signature(x = "UnivariateDistribution"),
     function(x, q00 = NULL,  ...){
-         if(is.null(q00)) q00 <- 10*q(x)(3/4)
+         if(is.null(q00)) q00 <- 10*q.l(x)(3/4)
 
-         intv <- function(xx,q0=q00) p(x)(q0+q(x)(xx))-5/8
+         intv <- function(xx,q0=q00) p(x)(q0+q.l(x)(xx))-5/8
          intq <- function(q){
                     sapply(q, function(q1){
                                  integrate(intv,lower=0,upper=1,q0=q1)$value})
@@ -37,7 +37,7 @@
 setMethod("Qn", signature(x = "DiscreteDistribution"),
     function(x,  ...){
          x2 <- x-x
-         q(x2)(5/8)
+         q.l(x2)(5/8)
     })
 
 
@@ -59,7 +59,7 @@
                }else{   return(m)    }
           }
 
-          x0 <- q(x)(seq(.5/accuracy,1-.5/accuracy,length=accuracy))
+          x0 <- q.l(x)(seq(.5/accuracy,1-.5/accuracy,length=accuracy))
           y  <- sapply(x0,g)
           c0 <- median(y,na.rm=TRUE)
           return(c0)
@@ -129,3 +129,6 @@
 
 setMethod("Sn", signature(x = "Weibull"),
     function(x, ...).Sn.intp(x,".Weibull") )
+
+setMethod("Sn", signature(x = "GEVU"),
+    function(x, ...).Sn.intp(x,".GEV") )



More information about the Robast-commits mailing list