[Robast-commits] r1226 - in branches/robast-1.3/pkg/RobExtremes: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 30 23:18:11 CEST 2019


Author: ruckdeschel
Date: 2019-04-30 23:18:11 +0200 (Tue, 30 Apr 2019)
New Revision: 1226

Modified:
   branches/robast-1.3/pkg/RobExtremes/R/Expectation.R
   branches/robast-1.3/pkg/RobExtremes/R/Functionals.R
   branches/robast-1.3/pkg/RobExtremes/R/Kurtosis.R
   branches/robast-1.3/pkg/RobExtremes/R/Skewness.R
   branches/robast-1.3/pkg/RobExtremes/inst/NEWS
   branches/robast-1.3/pkg/RobExtremes/man/E.Rd
   branches/robast-1.3/pkg/RobExtremes/man/Var.Rd
Log:
[RobExtremes] branch 1.3
+  taking up a suggestion by Andreas.Scheidegger at eawag.ch, we introduced new argument propagate.names in our functionals S4 methods for E, var, median,... controlling whether names 
   obtained from parameter coordinates should be propagated to return values of specific S4 methods 


Modified: branches/robast-1.3/pkg/RobExtremes/R/Expectation.R
===================================================================
--- branches/robast-1.3/pkg/RobExtremes/R/Expectation.R	2019-04-13 09:27:34 UTC (rev 1225)
+++ branches/robast-1.3/pkg/RobExtremes/R/Expectation.R	2019-04-30 21:18:11 UTC (rev 1226)
@@ -7,12 +7,18 @@
 setMethod("E", signature(object = "Pareto",
                          fun = "missing",
                          cond = "missing"),
-    function(object, low = NULL, upp = NULL, ..., diagnostic = FALSE){
+    function(object, low = NULL, upp = NULL,
+             propagate.names=getdistrExOption("propagate.names.functionals"), ...,
+             diagnostic = FALSE){
     if(!is.null(low)) if(low <= Min(object)) low <- NULL
     a <- shape(object); b <- Min(object)
     if(is.null(low) && is.null(upp)){
         if(a<=1) return(Inf)
-        else return(b*a/(a-1))
+        else{
+          ret.v <- b*a/(a-1)
+          if(!propagate.names){names(ret.v) <- NULL}
+          return(ret.v)
+        }
      }
     else
         return(E(object=object,fun=function(x)x, low=low, upp=upp, ...,
@@ -25,11 +31,15 @@
 setMethod("E", signature(object = "Gumbel",
                          fun = "missing",
                          cond = "missing"),
-    function(object, low = NULL, upp = NULL, ..., diagnostic = FALSE){
+    function(object, low = NULL, upp = NULL,
+             propagate.names=getdistrExOption("propagate.names.functionals"), ...,
+             diagnostic = FALSE){
     a <- loc(object); b <- scale(object)
-    if(is.null(low) && is.null(upp))
-           return(a- EULERMASCHERONICONSTANT * b)
-    else
+    if(is.null(low) && is.null(upp)){
+          ret.v <- a- EULERMASCHERONICONSTANT * b
+          if(!propagate.names){names(ret.v) <- NULL}
+          return(ret.v)
+    }else
         return(E(object=object,fun=function(x)x, low=low, upp=upp, ...,
                     diagnostic = diagnostic))
     })
@@ -38,14 +48,19 @@
 setMethod("E", signature(object = "GPareto",
                          fun = "missing",
                          cond = "missing"),
-    function(object, low = NULL, upp = NULL, ..., diagnostic = FALSE){
+    function(object, low = NULL, upp = NULL,
+             propagate.names=getdistrExOption("propagate.names.functionals"), ...,
+             diagnostic = FALSE){
     if(!is.null(low)) if(low <= Min(object)) low <- NULL
     k <- shape(object); s <- scale(object); mu <- loc(object)
     if(is.null(low) && is.null(upp)){
         if(k>=1) return(Inf)
-        else return(mu+s/(1-k))
-     }
-    else
+        else{
+          ret.v <- mu+s/(1-k)
+          if(!propagate.names){names(ret.v) <- NULL}
+          return(ret.v)
+        }
+     }else
         return(E(object=object,fun=function(x)x, low=low, upp=upp, ...,
                     diagnostic = diagnostic))
     })
@@ -120,15 +135,20 @@
 setMethod("E", signature(object = "GEV",
                          fun = "missing",
                          cond = "missing"),
-    function(object, low = NULL, upp = NULL, ..., diagnostic = FALSE){
+    function(object, low = NULL, upp = NULL,
+             propagate.names=getdistrExOption("propagate.names.functionals"), ...,
+             diagnostic = FALSE){
     if(!is.null(low)) if(low <= Min(object)) low <- NULL
     xi <- shape(object); sigma <- scale(object); mu <- loc(object)
     if(is.null(low) && is.null(upp)){
-        if (xi==0) return(mu+sigma*EULERMASCHERONICONSTANT)
-        else if(xi>=1) return(Inf)
-        else return(mu+sigma*(gamma(1-xi)-1)/xi)
-        }
-    else
+        if (xi==0) ret.v <- mu+sigma*EULERMASCHERONICONSTANT
+        else if(xi>=1) ret.v <- Inf
+        else ret.v <- mu+sigma*(gamma(1-xi)-1)/xi
+
+        if(!propagate.names){names(ret.v) <- NULL}
+        return(ret.v)
+
+        }else
         return(E(object, low=low, upp=upp, fun = function(x)x, ...,
                  diagnostic = diagnostic))
     })

Modified: branches/robast-1.3/pkg/RobExtremes/R/Functionals.R
===================================================================
--- branches/robast-1.3/pkg/RobExtremes/R/Functionals.R	2019-04-13 09:27:34 UTC (rev 1225)
+++ branches/robast-1.3/pkg/RobExtremes/R/Functionals.R	2019-04-30 21:18:11 UTC (rev 1226)
@@ -1,6 +1,6 @@
 
 setMethod("var", signature(x = "Pareto"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -8,14 +8,16 @@
     if(hasArg(upp)) upp <- dots$upp
     if(hasArg(fun)||hasArg(cond)||!is.null(low)||!is.null(upp)) 
         return(var(as(x,"AbscontDistribution"),...))
-    else{ a <- shape(x); b <- Min(x)
+    else{a <- shape(x); b <- Min(x)
         if(a<=2) return(NA)
-        return(b^2 * a/(a-1)^2/(a-2))
+        ret.v <- b^2 * a/(a-1)^2/(a-2)
+        if(!propagate.names){names(ret.v) <- NULL}
+        return(ret.v)
     }})
 ### source http://mathworld.wolfram.com/ParetoDistribution.html
 
 setMethod("var", signature(x = "Gumbel"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -24,12 +26,14 @@
     if(hasArg(fun)||hasArg(cond)||!is.null(low)||!is.null(upp)) 
         return(var(as(x,"AbscontDistribution"),...))
     else{  b <- scale(x)
-            return(b^2 * pi^2/6)
+           ret.v <- (b^2 * pi^2/6)
+           if(!propagate.names){names(ret.v) <- NULL}
+           return(ret.v)
     }})
 ## http://mathworld.wolfram.com/GumbelDistribution.html
 
 setMethod("var", signature(x = "GPareto"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -39,13 +43,15 @@
         return(var(as(x,"AbscontDistribution"),...))
     else{ k <- shape(x); s <- scale(x)
         if(k>=1/2) return(NA)
-        return(s^2/(1-k)^2/(1-2*k))
+        ret.v <- s^2/(1-k)^2/(1-2*k)
+        if(!propagate.names){names(ret.v) <- NULL}
+        return(ret.v)
     }})
 ### source http://en.wikipedia.org/wiki/Pareto_distribution
 
 
 setMethod("var", signature(x = "GEV"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -55,8 +61,10 @@
         return(var(as(x,"AbscontDistribution"),...))
     else{ xi <- shape(x); sigma <- scale(x)
         if(xi>=1/2) return(NA)
-        if(xi==0) return(sigma^2*pi^2/6)
-        if((xi!=0)&&(xi<1/2))return(sigma^2*(gamma(1-2*xi)-gamma(1-xi)^2)/xi^2)
+        if(xi==0) ret.v <- sigma^2*pi^2/6
+        if((xi!=0)&&(xi<1/2)) ret.v <- sigma^2*(gamma(1-2*xi)-gamma(1-xi)^2)/xi^2
+        if(!propagate.names){names(ret.v) <- NULL}
+        return(ret.v)
     }})
 ### http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution
 
@@ -66,21 +74,33 @@
 
 
 setMethod("median", signature(x = "Pareto"),
-    function(x) {a <- shape(x); b<- Min(x)
-              return(b*2^(1/a))
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals")) {
+    a <- shape(x); b<- Min(x)
+    ret.v <- b*2^(1/a)
+    if(!propagate.names){names(ret.v) <- NULL}
+    return(ret.v)
     })
 setMethod("median", signature(x = "Gumbel"),
-    function(x) {a <- loc(x); b <- scale(x)
-              return(a - b *log(log(2)))
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals")) {
+    a <- loc(x); b <- scale(x)
+    ret.v <- a - b *log(log(2))
+    if(!propagate.names){names(ret.v) <- NULL}
+    return(ret.v)
     })
 setMethod("median", signature(x = "GPareto"),
-    function(x) {k <- shape(x); mu <- loc(x); s <- scale(x)
-              return(mu + s*(2^k-1)/k)
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals")) {
+    k <- shape(x); mu <- loc(x); s <- scale(x)
+    ret.v <- mu + s*(2^k-1)/k
+    if(!propagate.names){names(ret.v) <- NULL}
+    return(ret.v)
     })
 setMethod("median", signature(x = "GEV"),
-    function(x) {xi <- shape(x); mu <- loc(x); sigma <- scale(x)
-              if (xi != 0) return(mu + sigma*(log(2)^(-xi)-1)/xi)
-              else return(mu-sigma*log(log(2)))
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals")) {
+    xi <- shape(x); mu <- loc(x); sigma <- scale(x)
+    if (xi != 0) ret.v <- (mu + sigma*(log(2)^(-xi)-1)/xi)
+       else ret.v <- (mu-sigma*log(log(2)))
+    if(!propagate.names){names(ret.v) <- NULL}
+    return(ret.v)
     })
 
 #################################################################
@@ -89,19 +109,31 @@
 
 
 setMethod("IQR", signature(x = "Pareto"),
-    function(x) {a <- shape(x); b<- Min(x)
-              return(b*(4^(1/a)-(4/3)^(1/a)))
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals")) {
+    a <- shape(x); b<- Min(x)
+    ret.v <- (b*(4^(1/a)-(4/3)^(1/a)))
+    if(!propagate.names){names(ret.v) <- NULL}
+    return(ret.v)
     })
 setMethod("IQR", signature(x = "Gumbel"),
-    function(x) { b <- scale(x)
-              return(b * (log(log(4))-log(log(4/3))))
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals")) {
+    b <- scale(x)
+    ret.v <- (b * (log(log(4))-log(log(4/3))))
+    if(!propagate.names){names(ret.v) <- NULL}
+    return(ret.v)
     })
 setMethod("IQR", signature(x = "GPareto"),
-    function(x) {k <- shape(x); s<- scale(x)
-              return(s/k*4^k*(1-3^(-k)))
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals")) {
+    k <- shape(x); s<- scale(x)
+    ret.v <- (s/k*4^k*(1-3^(-k)))
+    if(!propagate.names){names(ret.v) <- NULL}
+    return(ret.v)
     })
 setMethod("IQR", signature(x = "GEV"),
-    function(x) {xi <- shape(x); sigma<- scale(x)
-             if (xi != 0) return(sigma*((log(4/3))^(-xi)-(log(4))^(-xi))/xi)
-             else return(sigma*(log(log(4))-log(log(4/3))))
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals")) {
+    xi <- shape(x); sigma<- scale(x)
+    if (xi != 0) ret.v <- (sigma*((log(4/3))^(-xi)-(log(4))^(-xi))/xi)
+            else ret.v <- (sigma*(log(log(4))-log(log(4/3))))
+    if(!propagate.names){names(ret.v) <- NULL}
+    return(ret.v)
     })

Modified: branches/robast-1.3/pkg/RobExtremes/R/Kurtosis.R
===================================================================
--- branches/robast-1.3/pkg/RobExtremes/R/Kurtosis.R	2019-04-13 09:27:34 UTC (rev 1225)
+++ branches/robast-1.3/pkg/RobExtremes/R/Kurtosis.R	2019-04-30 21:18:11 UTC (rev 1226)
@@ -4,7 +4,7 @@
 
 
 setMethod("kurtosis", signature(x = "Pareto"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -15,9 +15,12 @@
     else{
          a <- shape(x)
          if(a<=4) return(NA)
-         else
-         return( 6*(a^3+a^2-6*a-2)/a/(a-3)/(a-4) ) 
+         else{
+         ret.v <- ( 6*(a^3+a^2-6*a-2)/a/(a-3)/(a-4) )
+         if(!propagate.names){names(ret.v) <- NULL}
+         return(ret.v)
     }
+    }
 })
 ### source http://mathworld.wolfram.com/ParetoDistribution.html
 
@@ -37,7 +40,7 @@
 })
 
 setMethod("kurtosis", signature(x = "GPareto"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -48,14 +51,16 @@
     else{
          k <- shape(x)
          if(k>=1/4) return(NA)
-         else
-         return( 3*(3+k+2*k^2)*(1-2*k)/(1-4*k)/(1-3*k)-3) 
-    }
+         else{
+         ret.v<- ( 3*(3+k+2*k^2)*(1-2*k)/(1-4*k)/(1-3*k)-3)
+         if(!propagate.names){names(ret.v) <- NULL}
+         return(ret.v)
+    }}
 })
 ### source Maple ...
 
 setMethod("kurtosis", signature(x = "GEV"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -67,9 +72,11 @@
          xi <- shape(x)
          if(xi>=1/4) return(NA)
          if(xi==0) return(12/5)
-         else
-         return((gamma(1-4*xi)- 4*gamma(1-xi)*gamma(1-3*xi)+6*gamma(1-2*xi)*gamma(1-xi)^2 - 3*gamma(1-xi)^4)/(gamma(1-2*xi)-gamma(1-xi)^2)^(2)) 
-    }
+         else{
+         ret.v <- ((gamma(1-4*xi)- 4*gamma(1-xi)*gamma(1-3*xi)+6*gamma(1-2*xi)*gamma(1-xi)^2 - 3*gamma(1-xi)^4)/(gamma(1-2*xi)-gamma(1-xi)^2)^(2))
+         if(!propagate.names){names(ret.v) <- NULL}
+         return(ret.v)
+    }}
 })
 ### source http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution
 ###        http://en.wikipedia.org/wiki/Gumbel_distribution

Modified: branches/robast-1.3/pkg/RobExtremes/R/Skewness.R
===================================================================
--- branches/robast-1.3/pkg/RobExtremes/R/Skewness.R	2019-04-13 09:27:34 UTC (rev 1225)
+++ branches/robast-1.3/pkg/RobExtremes/R/Skewness.R	2019-04-30 21:18:11 UTC (rev 1226)
@@ -1,7 +1,7 @@
 
 #    
 setMethod("skewness", signature(x = "Pareto"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -12,9 +12,11 @@
     else{
          a <- shape(x)
          if(a<=3) return(NA)
-         else
-         return( 2*(a+1)/(a-3)*sqrt(1-2/a) ) 
-    }
+         else{
+         ret.v <- ( 2*(a+1)/(a-3)*sqrt(1-2/a) )
+         if(!propagate.names){names(ret.v) <- NULL}
+         return(ret.v)
+    }}
 })
 ### source http://mathworld.wolfram.com/ParetoDistribution.html
 
@@ -28,13 +30,13 @@
     if(hasArg(fun)||hasArg(cond)||!is.null(low)||!is.null(upp))  
         return(skewness(as(x,"AbscontDistribution"),...))
     else{
-         return( -12 * sqrt(6) * APERYCONSTANT / pi^3 ) 
+         return( -12 * sqrt(6) * APERYCONSTANT / pi^3 )
 # http://mathworld.wolfram.com/GumbelDistribution.html         
     }
 })
 
 setMethod("skewness", signature(x = "GPareto"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -45,14 +47,16 @@
     else{
          k <- shape(x)
          if(k>=1/3) return(NA)
-         else
-         return( 2*(1+k)*sqrt(1-2*k)/(1-3*k) ) 
-    }
+         else{
+         ret.v <- ( 2*(1+k)*sqrt(1-2*k)/(1-3*k) )
+         if(!propagate.names){names(ret.v) <- NULL}
+         return(ret.v)
+    }}
 })
 ### source Maple...
 
 setMethod("skewness", signature(x = "GEV"),
-    function(x, ...){
+    function(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...){
     dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
     fun <- NULL; cond <- NULL; low <- NULL; upp <- NULL
@@ -64,9 +68,11 @@
          xi <- shape(x)
          if(xi>=1/3) return(NA)
          if(xi==0) return(APERYCONSTANT/pi^3*12*6^.5)
-         else
-         return((gamma(1-3*xi)-3*gamma(1-xi)*gamma(1-2*xi) + 2*gamma(1-xi)^3)/(gamma(1-2*xi)-gamma(1-xi)^2)^(3/2)) 
-    }
+         else{
+         ret.v <- ((gamma(1-3*xi)-3*gamma(1-xi)*gamma(1-2*xi) + 2*gamma(1-xi)^3)/(gamma(1-2*xi)-gamma(1-xi)^2)^(3/2))
+         if(!propagate.names){names(ret.v) <- NULL}
+         return(ret.v)
+    }}
 })
 
 ### source http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution

Modified: branches/robast-1.3/pkg/RobExtremes/inst/NEWS
===================================================================
--- branches/robast-1.3/pkg/RobExtremes/inst/NEWS	2019-04-13 09:27:34 UTC (rev 1225)
+++ branches/robast-1.3/pkg/RobExtremes/inst/NEWS	2019-04-30 21:18:11 UTC (rev 1226)
@@ -8,6 +8,16 @@
  information) 
 
 #######################################
+version 1.3
+#######################################
+
+user-visible CHANGES:
++  taking up a suggestion by Andreas.Scheidegger at eawag.ch, we introduced new 
+   argument propagate.names in our functionals controlling whether names 
+   obtained from parameter coordinates should be propagated to return values 
+   of specific S4 methods for functionals for Gumbel, GEV, GPD, Pareto
+
+#######################################
 version 1.2
 #######################################
 

Modified: branches/robast-1.3/pkg/RobExtremes/man/E.Rd
===================================================================
--- branches/robast-1.3/pkg/RobExtremes/man/E.Rd	2019-04-13 09:27:34 UTC (rev 1225)
+++ branches/robast-1.3/pkg/RobExtremes/man/E.Rd	2019-04-30 21:18:11 UTC (rev 1226)
@@ -20,7 +20,9 @@
 \usage{
 E(object, fun, cond, ...)
 
-\S4method{E}{GEV,missing,missing}(object, low = NULL, upp = NULL, ..., diagnostic = FALSE)
+\S4method{E}{GEV,missing,missing}(object, low = NULL, upp = NULL,
+             propagate.names=getdistrExOption("propagate.names.functionals"), ...,
+             diagnostic = FALSE)
 \S4method{E}{DistributionsIntegratingByQuantiles,function,missing}(object,
          fun, low = NULL, upp = NULL,
          rel.tol= getdistrExOption("ErelativeTolerance"),
@@ -27,14 +29,20 @@
          lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"),
          upperTruncQuantile = getdistrExOption("EupperTruncQuantile"),
          IQR.fac = max(1e4,getdistrExOption("IQR.fac")), ..., diagnostic = FALSE)
-\S4method{E}{Gumbel,missing,missing}(object, low = NULL, upp = NULL, ..., diagnostic = FALSE)
-\S4method{E}{GPareto,missing,missing}(object, low = NULL, upp = NULL, ..., diagnostic = FALSE)
+\S4method{E}{Gumbel,missing,missing}(object, low = NULL, upp = NULL,
+             propagate.names=getdistrExOption("propagate.names.functionals"), ...,
+             diagnostic = FALSE)
+\S4method{E}{GPareto,missing,missing}(object, low = NULL, upp = NULL,
+             propagate.names=getdistrExOption("propagate.names.functionals"), ...,
+             diagnostic = FALSE)
 \S4method{E}{GPareto,function,missing}(object, fun, low = NULL, upp = NULL,
              rel.tol= getdistrExOption("ErelativeTolerance"),
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"),
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"),
              IQR.fac = max(1e4,getdistrExOption("IQR.fac")), ..., diagnostic = FALSE)
-\S4method{E}{Pareto,missing,missing}(object, low = NULL, upp = NULL, ..., diagnostic = FALSE)
+\S4method{E}{Pareto,missing,missing}(object, low = NULL, upp = NULL,
+             propagate.names=getdistrExOption("propagate.names.functionals"), ...,
+             diagnostic = FALSE)
 }
 \arguments{
   \item{object}{ object of class \code{"Distribution"}}
@@ -56,6 +64,10 @@
     or \code{"GLIntegrate"}), \code{call}, \code{result} (the complete return
     value of the method),  \code{args} (the args with which the
     method was called), and \code{time} (the time to compute the integral). }
+  \item{propagate.names}{ logical: should names obtained from parameter
+     coordinates be propagated to return values of specific S4 methods
+     for functionals; defaults to the value of the respective
+     \code{distrExoption} \code{propagate.names.functionals}. }
 }
 \details{The precision of the computations can be controlled via 
   certain global options; cf. \code{\link{distrExOptions}}. 

Modified: branches/robast-1.3/pkg/RobExtremes/man/Var.Rd
===================================================================
--- branches/robast-1.3/pkg/RobExtremes/man/Var.Rd	2019-04-13 09:27:34 UTC (rev 1225)
+++ branches/robast-1.3/pkg/RobExtremes/man/Var.Rd	2019-04-30 21:18:11 UTC (rev 1226)
@@ -56,36 +56,37 @@
 \usage{
 IQR(x, ...)
 
-\S4method{IQR}{Gumbel}(x)
-\S4method{IQR}{GEV}(x)
-\S4method{IQR}{GPareto}(x)
-\S4method{IQR}{Pareto}(x)
+\S4method{IQR}{Gumbel}(x, propagate.names=getdistrExOption("propagate.names.functionals"))
+\S4method{IQR}{GEV}(x, propagate.names=getdistrExOption("propagate.names.functionals"))
+\S4method{IQR}{GPareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"))
+\S4method{IQR}{Pareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"))
 
 median(x, ...)
 
-\S4method{median}{Gumbel}(x)
-\S4method{median}{GEV}(x)
-\S4method{median}{GPareto}(x)
-\S4method{median}{Pareto}(x)
+\S4method{median}{Gumbel}(x, propagate.names=getdistrExOption("propagate.names.functionals"))
+\S4method{median}{GEV}(x, propagate.names=getdistrExOption("propagate.names.functionals"))
+\S4method{median}{GPareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"))
+\S4method{median}{Pareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"))
 
+
 var(x, ...)
 
-\S4method{var}{Gumbel}(x, ...)
-\S4method{var}{GEV}(x, ...)
-\S4method{var}{GPareto}(x, ...)
-\S4method{var}{Pareto}(x, ...)
+\S4method{var}{Gumbel}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
+\S4method{var}{GEV}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
+\S4method{var}{GPareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
+\S4method{var}{Pareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
 
 skewness(x, ...)
 \S4method{skewness}{Gumbel}(x, ...)
-\S4method{skewness}{GEV}(x, ...)
-\S4method{skewness}{GPareto}(x, ...)
-\S4method{skewness}{Pareto}(x, ...)
+\S4method{skewness}{GEV}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
+\S4method{skewness}{GPareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
+\S4method{skewness}{Pareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
 
 kurtosis(x, ...)
 \S4method{kurtosis}{Gumbel}(x, ...)
-\S4method{kurtosis}{GEV}(x, ...)
-\S4method{kurtosis}{GPareto}(x, ...)
-\S4method{kurtosis}{Pareto}(x, ...)
+\S4method{kurtosis}{GEV}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
+\S4method{kurtosis}{GPareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
+\S4method{kurtosis}{Pareto}(x, propagate.names=getdistrExOption("propagate.names.functionals"), ...)
 
 Sn(x, ...)
 \S4method{Sn}{ANY}(x,  ...)
@@ -119,6 +120,10 @@
              Y (a real constant) runs over the range of x; defaults to \code{1.01}.
             Is used internally as \code{upp*(mad(x)+abs(median(x)-Y))}. }
   \item{accuracy}{numeric; number of grid points for \code{Sn}; defaults to \code{1000}. }
+  \item{propagate.names}{ logical: should names obtained from parameter
+     coordinates be propagated to return values of specific S4 methods
+     for functionals; defaults to the value of the respective
+     \code{distrExoption} \code{propagate.names.functionals}. }
   }
 \value{
   The value of the corresponding functional at the distribution in the argument is computed.



More information about the Robast-commits mailing list