[Robast-commits] r1151 - in branches/robast-1.2/pkg/RobExtremes: . R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 16 13:31:20 CEST 2018


Author: ruckdeschel
Date: 2018-08-16 13:31:20 +0200 (Thu, 16 Aug 2018)
New Revision: 1151

Modified:
   branches/robast-1.2/pkg/RobExtremes/NAMESPACE
   branches/robast-1.2/pkg/RobExtremes/R/GEV.R
   branches/robast-1.2/pkg/RobExtremes/R/GPareto.R
   branches/robast-1.2/pkg/RobExtremes/R/Gumbel.R
   branches/robast-1.2/pkg/RobExtremes/R/Pareto.R
   branches/robast-1.2/pkg/RobExtremes/inst/NEWS
   branches/robast-1.2/pkg/RobExtremes/man/GEV-class.Rd
   branches/robast-1.2/pkg/RobExtremes/man/GPareto-class.Rd
   branches/robast-1.2/pkg/RobExtremes/man/Gumbel-class.Rd
   branches/robast-1.2/pkg/RobExtremes/man/Pareto-class.Rd
Log:
[RobExtremes] branch 1.2
+ introduced particular liesInSupport methods for Gumbel, Pareto, GPareto, and GEV 
+ updated NEWS 


Modified: branches/robast-1.2/pkg/RobExtremes/NAMESPACE
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/NAMESPACE	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/NAMESPACE	2018-08-16 11:31:20 UTC (rev 1151)
@@ -51,7 +51,7 @@
 exportMethods("modifyModel", "getStartIC", "coerce")
 exportMethods("moveL2Fam2RefParam",
 			  "moveICBackFromRefParam")			  
-exportMethods("checkIC", "makeIC")
+exportMethods("checkIC", "makeIC", "liesInSupport")
 export("EULERMASCHERONICONSTANT","APERYCONSTANT")
 export("getCVaR", "getVaR", "getEL")
 export("Gumbel", "Pareto", "GPareto", "GEV")

Modified: branches/robast-1.2/pkg/RobExtremes/R/GEV.R
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/R/GEV.R	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/R/GEV.R	2018-08-16 11:31:20 UTC (rev 1151)
@@ -33,7 +33,6 @@
            scale(x at param))
 setMethod("shape", "GEV", function(object) shape(object at param))
 
-
 ## wrapped replace methods
 setMethod("loc<-", "GEV", function(object, value) 
            new("GEV", loc = value, scale = scale(object), shape = shape(object)))
@@ -58,6 +57,14 @@
   else return(TRUE)
 })
 
+setMethod("liesInSupport", signature(object = "GEV",
+                                     x = "numeric"),
+  function(object, x, checkFin = TRUE){
+    loc=loc(object); scale=scale(object); shape=shape(object)
+    if(shape>0) return(is.finite(x)&(x>= loc-scale/shape))
+    if(shape<0) return(is.finite(x)&(x<= loc-scale/shape))
+    if(abs(shape)<1e-8) return(is.finite(x))})
+
 ## generating function
 GEV <- function(loc = 0, scale = 1, shape = 0, location = loc){ 
            if(!missing(loc)&&!missing(location)) 

Modified: branches/robast-1.2/pkg/RobExtremes/R/GPareto.R
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/R/GPareto.R	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/R/GPareto.R	2018-08-16 11:31:20 UTC (rev 1151)
@@ -58,6 +58,13 @@
   else return(TRUE)
 })
 
+setMethod("liesInSupport", signature(object = "GPareto",
+                                     x = "numeric"),
+  function(object, x, checkFin = TRUE){
+    loc=loc(object); scale=scale(object); shape=shape(object)
+    if(shape>=0) return(is.finite(x)&(x>= loc))
+    if(shape<0) return(is.finite(x)&(x<= loc-scale/shape)&(x>=loc))})
+
 ## generating function
 GPareto <- function(loc = 0, scale = 1, shape = 0, location = loc){ 
            if(!missing(loc)&&!missing(location)) 

Modified: branches/robast-1.2/pkg/RobExtremes/R/Gumbel.R
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/R/Gumbel.R	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/R/Gumbel.R	2018-08-16 11:31:20 UTC (rev 1151)
@@ -9,6 +9,9 @@
 setReplaceMethod("scale", "GumbelParameter", 
     function(object, value){ object at scale <- value; object})
 
+setMethod("liesInSupport", signature(object = "Gumbel",
+                                     x = "numeric"),
+  function(object, x, checkFin = TRUE){is.finite(x)})
 
 ## generating function
 Gumbel <- function(loc = 0, scale = 1){ new("Gumbel", loc = loc, scale = scale) }

Modified: branches/robast-1.2/pkg/RobExtremes/R/Pareto.R
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/R/Pareto.R	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/R/Pareto.R	2018-08-16 11:31:20 UTC (rev 1151)
@@ -36,6 +36,10 @@
   else return(TRUE)
 })
 
+setMethod("liesInSupport", signature(object = "Pareto",
+                                     x = "numeric"),
+  function(object, x, checkFin = TRUE){is.finite(x)&(x>=0)})
+
 ################################
 ##            .Object at img <- new("Naturals")
 

Modified: branches/robast-1.2/pkg/RobExtremes/inst/NEWS
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/inst/NEWS	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/inst/NEWS	2018-08-16 11:31:20 UTC (rev 1151)
@@ -27,6 +27,14 @@
 + the timings are now about ~ 2s per estimator for GEV and GPD and check/makeIC are much faster
 + script updated 
 + the makeIC methods for GPD/GEV... also gain an "..." argument 
++ fixed minor issues in scripts/RobFitsAtRealData.R
++ expectation E() of Pareto, GPD, and GEV gain argument diagnostic and use dot-filtering (like in distrEx)
++ minor bugfixes in .getBetaXiGEW 
++ new S4 classes
+  "GPDML.ALEstimate", "GPDCvMMD.ALEstimate", and "GEVML.ALEstimate", "GEVCvMMD.ALEstimate"
+  deleted classes "GPDMCALEstimate", "GEVMCALEstimate" as not every MCE is an ALE -> this gave misleading error messages
++ warning/caveat in the help to GEVFamily/GEVFamilyMuUnknown as to the accuracy of PickandsEstimator for GEV 
++ introduced particular liesInSupport methods for Gumbel, Pareto, GPareto, and GEV 
   
 #######################################
 version 1.1

Modified: branches/robast-1.2/pkg/RobExtremes/man/GEV-class.Rd
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/man/GEV-class.Rd	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/man/GEV-class.Rd	2018-08-16 11:31:20 UTC (rev 1151)
@@ -12,8 +12,8 @@
 \alias{shape<-,GEV-method}
 \alias{+,GEV,numeric-method}
 \alias{*,GEV,numeric-method}
+\alias{liesInSupport,GEV,numeric-method}
 
-
 \title{Generalized EV distribution}
 \description{[borrowed from \pkg{evd}]:
 The GEV distribution function with parameters \code{loc}\eqn{= a},
@@ -95,6 +95,8 @@
     \item{kurtosis}{\code{signature(signature(x = "GEV")}:
     exact evaluation using explicit expressions.}
 
+    \item{liesInSupport}{\code{signature(object = "GEV", x = "numeric")}:
+      checks if \code{x} lies in the support of the respective distribution. }
 
   }
 }

Modified: branches/robast-1.2/pkg/RobExtremes/man/GPareto-class.Rd
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/man/GPareto-class.Rd	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/man/GPareto-class.Rd	2018-08-16 11:31:20 UTC (rev 1151)
@@ -12,6 +12,7 @@
 \alias{shape<-,GPareto-method}
 \alias{+,GPareto,numeric-method}
 \alias{*,GPareto,numeric-method}
+\alias{liesInSupport,GPareto,numeric-method}
 
 
 \title{Generalized Pareto distribution}
@@ -92,6 +93,8 @@
     \item{kurtosis}{\code{signature(signature(x = "GPareto")}:
     exact evaluation using explicit expressions.}
 
+    \item{liesInSupport}{\code{signature(object = "GPareto", x = "numeric")}:
+      checks if \code{x} lies in the support of the respective distribution. }
 
   }
 }

Modified: branches/robast-1.2/pkg/RobExtremes/man/Gumbel-class.Rd
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/man/Gumbel-class.Rd	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/man/Gumbel-class.Rd	2018-08-16 11:31:20 UTC (rev 1151)
@@ -8,6 +8,7 @@
 \alias{scale<-,Gumbel-method}
 \alias{+,Gumbel,numeric-method}
 \alias{*,Gumbel,numeric-method}
+\alias{liesInSupport,Gumbel,numeric-method}
 
 \title{Gumbel distribution}
 \description{The Gumbel cumulative distribution function with 
@@ -91,6 +92,10 @@
 
      \item{IQR}{\code{signature(x = "Gumbel")}: 
       exact evaluation of expectation using explicit expressions.}
+
+    \item{liesInSupport}{\code{signature(object = "Gumbel", x = "numeric")}:
+      checks if \code{x} lies in the support of the respective distribution. }
+
   }
 }
 \references{Johnson et al. (1995) \emph{Continuous Univariate Distributions. Vol. 2. 2nd ed.}

Modified: branches/robast-1.2/pkg/RobExtremes/man/Pareto-class.Rd
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/man/Pareto-class.Rd	2018-08-16 11:21:12 UTC (rev 1150)
+++ branches/robast-1.2/pkg/RobExtremes/man/Pareto-class.Rd	2018-08-16 11:31:20 UTC (rev 1151)
@@ -8,6 +8,7 @@
 \alias{Min<-,Pareto-method}
 \alias{scale,Pareto-method}
 \alias{*,Pareto,numeric-method}
+\alias{liesInSupport,Pareto,numeric-method}
 
 \title{Pareto distribution}
 \description{[borrowed from \pkg{actuar}]:
@@ -85,6 +86,8 @@
     \item{*}{\code{signature(e1 = "Pareto", e2 = "numeric")}: exact method
       for this transformation --- stays within this class if \code{e2>0}. }
 
+    \item{liesInSupport}{\code{signature(object = "Pareto", x = "numeric")}:
+      checks if \code{x} lies in the support of the respective distribution. }
   }
 }
 \references{Johnson et al. (1995) \emph{Continuous Univariate Distributions. Vol. 2. 2nd ed.}



More information about the Robast-commits mailing list