[Robast-commits] r611 - branches/robast-0.9/pkg/RobExtremes/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 16 17:04:40 CET 2013


Author: ruckdeschel
Date: 2013-02-16 17:04:40 +0100 (Sat, 16 Feb 2013)
New Revision: 611

Modified:
   branches/robast-0.9/pkg/RobExtremes/R/GEVFamily.R
   branches/robast-0.9/pkg/RobExtremes/R/GParetoFamily.R
   branches/robast-0.9/pkg/RobExtremes/R/LDEstimator.R
   branches/robast-0.9/pkg/RobExtremes/R/ParetoFamily.R
   branches/robast-0.9/pkg/RobExtremes/R/WeibullFamily.R
Log:
RobExtremes:
GEVFamily, GParetoFamily, WeibullFamily now set new slot .withMDE to FALSE (to avoid calling CvM-MDE);
GEVFamily, GParetoFamily, WeibullFamily, ParetoFamily throw an error if argument startPar is no function.
in LDEstimator.R changed ... any(is.na(es))... into  ...any(is.na(estimate(es)))...

Modified: branches/robast-0.9/pkg/RobExtremes/R/GEVFamily.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/GEVFamily.R	2013-02-16 14:57:53 UTC (rev 610)
+++ branches/robast-0.9/pkg/RobExtremes/R/GEVFamily.R	2013-02-16 16:04:40 UTC (rev 611)
@@ -225,7 +225,7 @@
            if(is(start0Est,"function")){
               e1 <- start0Est(x, ...)
               e0 <-  if(is(e1,"Estimate")) estimate(e1) else e1
-           }
+           }else stop("Argument 'start0Est' must be a function or NULL.")
            if(!is.null(names(e0)))
                e0 <- e0[c("scale", "shape")]
         }
@@ -370,6 +370,7 @@
 
     L2Fam at L2deriv <- L2deriv
     L2Fam at L2derivDistr <- L2derivDistr
+    L2Fam at .withMDE <- FALSE
     return(L2Fam)
 }
 

Modified: branches/robast-0.9/pkg/RobExtremes/R/GParetoFamily.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/GParetoFamily.R	2013-02-16 14:57:53 UTC (rev 610)
+++ branches/robast-0.9/pkg/RobExtremes/R/GParetoFamily.R	2013-02-16 16:04:40 UTC (rev 611)
@@ -125,7 +125,7 @@
            if(is(start0Est,"function")){
               e1 <- start0Est(x, ...)
               e0 <-  if(is(e1,"Estimate")) estimate(e1) else e1
-           }
+           }else stop("Argument 'start0Est' must be a function or NULL.")
            if(!is.null(names(e0)))
                e0 <- e0[c("scale", "shape")]
         }
@@ -253,8 +253,8 @@
     L2Fam at LogDeriv <- function(x) (shape+1)/(scale+shape*(x-loc))
     L2Fam at L2deriv <- L2deriv
     L2Fam at L2derivDistr <- L2derivDistr
+    L2Fam at .withMDE <- FALSE
 
-
     return(L2Fam)
 }
 

Modified: branches/robast-0.9/pkg/RobExtremes/R/LDEstimator.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/LDEstimator.R	2013-02-16 14:57:53 UTC (rev 610)
+++ branches/robast-0.9/pkg/RobExtremes/R/LDEstimator.R	2013-02-16 16:04:40 UTC (rev 611)
@@ -220,7 +220,7 @@
                             fixed = fixed, asvar.fct = asvar.fct, na.rm = na.rm,
                              ..., .withEvalAsVar = FALSE),
                              silent=TRUE)
- if(! any(is.na(es)) && !is(es,"try-error"))
+ if(! any(is.na(estimate(es))) && !is(es,"try-error"))
    {return(es)}
 
  k1 <- 3.23

Modified: branches/robast-0.9/pkg/RobExtremes/R/ParetoFamily.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/ParetoFamily.R	2013-02-16 14:57:53 UTC (rev 610)
+++ branches/robast-0.9/pkg/RobExtremes/R/ParetoFamily.R	2013-02-16 16:04:40 UTC (rev 611)
@@ -59,7 +59,7 @@
            if(is(start0Est,"function")){
               e1 <- start0Est(x, ...)
               e0 <-  if(is(e1,"Estimate")) estimate(e1) else e1
-           }
+           }else stop("Argument 'start0Est' must be a function or NULL.")
         }
         if(any(x < tr))
                stop("some data smaller than 'Min' ")

Modified: branches/robast-0.9/pkg/RobExtremes/R/WeibullFamily.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/WeibullFamily.R	2013-02-16 14:57:53 UTC (rev 610)
+++ branches/robast-0.9/pkg/RobExtremes/R/WeibullFamily.R	2013-02-16 16:04:40 UTC (rev 611)
@@ -123,7 +123,7 @@
            if(is(start0Est,"function")){
               e1 <- start0Est(x, ...)
               e0 <-  if(is(e1,"Estimate")) estimate(e1) else e1
-           }
+           }else stop("Argument 'start0Est' must be a function or NULL.")
            if(!is.null(names(e0)))
                e0 <- e0[c("scale", "shape")]
         }
@@ -245,6 +245,7 @@
             }###
     L2Fam at L2deriv <- L2deriv
     L2Fam at L2derivDistr <- L2derivDistr
+    L2Fam at .withMDE <- FALSE
 
     return(L2Fam)
 }



More information about the Robast-commits mailing list