[Robast-commits] r738 - branches/robast-1.0/pkg/RobExtremes/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 3 11:37:25 CEST 2014


Author: ruckdeschel
Date: 2014-04-03 11:37:25 +0200 (Thu, 03 Apr 2014)
New Revision: 738

Modified:
   branches/robast-1.0/pkg/RobExtremes/R/startEstGEV.R
Log:
RobExtremes: packed startEstGEV.R into a try-catch...

Modified: branches/robast-1.0/pkg/RobExtremes/R/startEstGEV.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/R/startEstGEV.R	2014-04-03 09:28:38 UTC (rev 737)
+++ branches/robast-1.0/pkg/RobExtremes/R/startEstGEV.R	2014-04-03 09:37:25 UTC (rev 738)
@@ -15,10 +15,12 @@
       sigCvMMD1 <- optimize(funl, interval=intv)$minimum
       mygev <- GEVFamily(loc=0,scale=sigCvMMD1,shape=xi, withPos=withPos,
                          start0Est = fu, ..withWarningGEV=FALSE)
-      mde0 <- MDEstimator(x0, mygev, distance=CvMDist, startPar=c("scale"=sigCvMMD1,"shape"=xi))
-      if(criterion(mde0)<crit0){
-         mdeb <- mde0
-         crit0 <- criterion(mde0)
+      mde0 <- try(MDEstimator(x0, mygev, distance=CvMDist, startPar=c("scale"=sigCvMMD1,"shape"=xi)),silent=TRUE)
+      if(!is(mde0,"try-error")){
+          if(criterion(mde0)<crit0){
+             mdeb <- mde0
+             crit0 <- criterion(mde0)
+          }
       }
   }
   es <- estimate(mdeb)



More information about the Robast-commits mailing list