[Robast-commits] r733 - branches/robast-1.0/pkg/RobExtremes/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Apr 3 03:17:48 CEST 2014
Author: ruckdeschel
Date: 2014-04-03 03:17:47 +0200 (Thu, 03 Apr 2014)
New Revision: 733
Modified:
branches/robast-1.0/pkg/RobExtremes/R/GEVFamily.R
branches/robast-1.0/pkg/RobExtremes/R/GEVFamilyMuUnknown.R
branches/robast-1.0/pkg/RobExtremes/R/startEstGEV.R
Log:
RobExtremes: bugfix bounds must be right for shape < 0 ...
eliminated some erroneous prints
Modified: branches/robast-1.0/pkg/RobExtremes/R/GEVFamily.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/R/GEVFamily.R 2014-04-02 23:09:09 UTC (rev 732)
+++ branches/robast-1.0/pkg/RobExtremes/R/GEVFamily.R 2014-04-03 01:17:47 UTC (rev 733)
@@ -256,9 +256,12 @@
e0 <- e0[c("scale", "shape")]
}
# print(e0); print(str(x)); print(head(summary(x))); print(mu)
- if(any(x < mu-e0["scale"]/e0["shape"]))
+ if(e0[3]>0) if(any(x < e0[1]-e0[2]/e0[3]))
stop("some data smaller than 'loc-scale/shape' ")
+ if(e0[3]<0) if(any(x > e0[1]-e0[2]/e0[3]))
+ stop("some data larger than 'loc-scale/shape' ")
+
names(e0) <- NULL
return(e0)
}
Modified: branches/robast-1.0/pkg/RobExtremes/R/GEVFamilyMuUnknown.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/R/GEVFamilyMuUnknown.R 2014-04-02 23:09:09 UTC (rev 732)
+++ branches/robast-1.0/pkg/RobExtremes/R/GEVFamilyMuUnknown.R 2014-04-03 01:17:47 UTC (rev 733)
@@ -142,9 +142,12 @@
e0 <- e0[c("loc","scale", "shape")]
}
# print(e0); print(str(x)); print(head(summary(x))); print(mu)
- if(any(x < e0[1]-e0[2]/e0[3]))
+ if(e0[3]>0) if(any(x < e0[1]-e0[2]/e0[3]))
stop("some data smaller than 'loc-scale/shape' ")
+ if(e0[3]<0) if(any(x > e0[1]-e0[2]/e0[3]))
+ stop("some data larger than 'loc-scale/shape' ")
+
names(e0) <- NULL
return(e0)
}
Modified: branches/robast-1.0/pkg/RobExtremes/R/startEstGEV.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/R/startEstGEV.R 2014-04-02 23:09:09 UTC (rev 732)
+++ branches/robast-1.0/pkg/RobExtremes/R/startEstGEV.R 2014-04-03 01:17:47 UTC (rev 733)
@@ -1,4 +1,4 @@
-.getXiGrid <- function(){seq(-0.4,4,by=0.3)}
+.getXiGrid <- function(){seq(-0.48,5,by=0.5)}
.getBetaXiGEV <- function(x, mu, xiGrid = .getXiGrid(), withPos=TRUE){
@@ -12,13 +12,9 @@
CvMDist(x0,mygev1)
}
sigCvMMD1 <- optimize(funl, interval=c(1e-5,s0))$minimum
- print(c("sigma"=sigCvMMD1,"xi"=xi))
mygev <- GEVFamily(loc=0,scale=sigCvMMD1,shape=xi, withPos=withPos,
start0Est = fu, ..withWarningGEV=FALSE)
- print(mygev)
- print(param(mygev))
mde0 <- MDEstimator(x0, mygev, distance=CvMDist, startPar=c("scale"=sigCvMMD1,"shape"=xi))
- print(c("roh"=estimate(mde0)))
if(criterion(mde0)<crit0){
mdeb <- mde0
crit0 <- criterion(mde0)
More information about the Robast-commits
mailing list