[Robast-commits] r1166 - in branches/robast-1.2/pkg: ROptEst/R RobExtremes/inst/scripts RobExtremes/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Aug 19 01:49:28 CEST 2018


Author: ruckdeschel
Date: 2018-08-19 01:49:27 +0200 (Sun, 19 Aug 2018)
New Revision: 1166

Modified:
   branches/robast-1.2/pkg/ROptEst/R/roptest.new.R
   branches/robast-1.2/pkg/RobExtremes/inst/scripts/RobFitsAtRealData.R
   branches/robast-1.2/pkg/RobExtremes/man/E.Rd
Log:
[RobExtremes]
+ adopted the script to the new diagnostic functionality
+ documented that E methods if (diagnostic==TRUE) return diagnostic attributes of S3 class  "DiagnosticClass"
[ROptEst] 
+ forgot to call kStepEstimator  from roptest with argument diagnostic 


Modified: branches/robast-1.2/pkg/ROptEst/R/roptest.new.R
===================================================================
--- branches/robast-1.2/pkg/ROptEst/R/roptest.new.R	2018-08-18 23:37:17 UTC (rev 1165)
+++ branches/robast-1.2/pkg/ROptEst/R/roptest.new.R	2018-08-18 23:49:27 UTC (rev 1166)
@@ -401,7 +401,7 @@
               na.rm = na.rm, scalename = kStepCtrl$scalename,
               withLogScale = kStepCtrl$withLogScale,
               withEvalAsVar = withEvalAsVarkStep,
-              withMakeIC = withMakeICkStep)
+              withMakeIC = withMakeICkStep, diagnostic = diagnostic)
          if(!is.null(kStepCtrl$E.arglist)){
              nms <- names(kStepCtrl$E.arglist)
              for(nmi in nms) kStepArgList[[nmi]] <- kStepCtrl$E.arglist[[nmi]]

Modified: branches/robast-1.2/pkg/RobExtremes/inst/scripts/RobFitsAtRealData.R
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/inst/scripts/RobFitsAtRealData.R	2018-08-18 23:37:17 UTC (rev 1165)
+++ branches/robast-1.2/pkg/RobExtremes/inst/scripts/RobFitsAtRealData.R	2018-08-18 23:49:27 UTC (rev 1166)
@@ -7,8 +7,8 @@
 require(fitdistrplus) ## for dataset groundbeef
 
 
-help(package="RobExtremes")
-help("RobExtremes-package")
+#help(package="RobExtremes")
+#help("RobExtremes-package")
 
 #----------------------------------------
 ## data sets
@@ -46,6 +46,17 @@
 system.time(MBRi <- MBREstimator(portpiriei, GEVFam))
 ## synonymous to
 ## system.time(MBRi0 <- roptest(portpiriei, GEVFam,risk=MBRRisk()))
+
+## some diagnostics as to timings and integrations:
+system.time(MBRiD <- MBREstimator(portpiriei, GEVFam, diagnostic = TRUE))
+showDiagnostic(MBRiD)
+timings(MBRiD)
+kStepTimings(MBRiD)
+(int.times <- getDiagnostic(MBRiD, what="time"))
+
+IC <- pIC(MBRiD)
+es <- checkIC(IC,diagnostic = TRUE)
+
 system.time(RMXi <- RMXEstimator(portpiriei, GEVFam))
 ## synonymous to
 ## system.time(RMXi <- roptest(portpiriei, GEVFam,risk=RMXRRisk()))
@@ -61,7 +72,7 @@
 system.time(RMXiw2 <- RMXEstimator(portpiriei, GEVFam,withMakeIC=TRUE))
 checkIC(pIC(RMXiw2))
 setMethod("makeIC", signature(IC = "ContIC", L2Fam = "L2ParamFamily"),oldM)
-getMethod("checkIC", signature(IC = "IC", L2Fam = "missing"))(pIC(RMXiw2),
+erg <- getMethod("checkIC", signature(IC = "IC", L2Fam = "missing"))(pIC(RMXiw2),
            out=TRUE, diagnostic=TRUE)
 
 estimate(RMXi)
@@ -80,9 +91,6 @@
 estimate(MBRi)
 estimate(RMXi)
 estimate(RMXiw)
-### where do the robust estimators spend their time?
-attr(MBRi, "timings")
-attr(MBRi, "kStepTimings")
 
 ## our return values can be plugged into ismev-diagnostics:
 devNew()

Modified: branches/robast-1.2/pkg/RobExtremes/man/E.Rd
===================================================================
--- branches/robast-1.2/pkg/RobExtremes/man/E.Rd	2018-08-18 23:37:17 UTC (rev 1165)
+++ branches/robast-1.2/pkg/RobExtremes/man/E.Rd	2018-08-18 23:49:27 UTC (rev 1166)
@@ -70,6 +70,13 @@
   classes \code{"GPareto"}, \code{"Pareto"}, \code{"Weibull"}, \code{"GEV"}.
   In addition, the specific method for \code{"GPareto", "function", "missing"}
   uses integration on [0,1] via the substitution method (y := log(x)).
+
+  Diagnostics on the involved integrations are available
+  if argument   \code{diagnostic} is \code{TRUE}. Then there is attribute
+  \code{diagnostic} attached to the return value, which may be inspected
+  and accessed through \code{\link[distrEx:distrExIntegrate]{showDiagnostic}} and
+  \code{\link[distrEx:distrExIntegrate]{getDiagnostic}}.
+
   }
 
 \value{



More information about the Robast-commits mailing list