[Robast-commits] r543 - in branches/robast-0.9/pkg/RobExtremes: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jan 18 21:07:02 CET 2013
Author: ruckdeschel
Date: 2013-01-18 21:07:01 +0100 (Fri, 18 Jan 2013)
New Revision: 543
Modified:
branches/robast-0.9/pkg/RobExtremes/R/QBCC.R
branches/robast-0.9/pkg/RobExtremes/R/asvarPickands.R
branches/robast-0.9/pkg/RobExtremes/man/QuantileBCCEstimator.Rd
branches/robast-0.9/pkg/RobExtremes/man/asvarPickands.Rd
branches/robast-0.9/pkg/RobExtremes/man/asvarQBCC.Rd
Log:
RobExtremes: removed some bugs
Modified: branches/robast-0.9/pkg/RobExtremes/R/QBCC.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/QBCC.R 2013-01-18 19:47:49 UTC (rev 542)
+++ branches/robast-0.9/pkg/RobExtremes/R/QBCC.R 2013-01-18 20:07:01 UTC (rev 543)
@@ -5,22 +5,22 @@
# has bdp min(p1,1-p2,p2-p1), maximal for p1=p2=1/3
#
#####################################################################
-.QBCC <- function(x, p1 = 1/3, p2 =1/3){
+.QBCC <- function(x, p1 = 1/3, p2 = 2/3){
if(p1>=p2) {p<-p1; p1 <- p2; p2 <- p}
- l1 <- -log(p1); l2 <- -log(p2)
+ l1 <- -log(1-p1); l2 <- -log(1-p2)
ms <- quantile(x,c(p1,p2))
names(ms) <- NULL
Q2 <- ms[2]
Q1 <- ms[1]
- xi <- (log(Q2)-log(Q1))/(log(l2)-log(l1))
- beta <- Q2/l2^(1/xi)
+ xi <- (log(l2)-log(l1))/(log(Q2)-log(Q1))
+ beta <- Q2*l2^(-1/xi)
###
theta <- c(beta,xi)
names(theta) <- c("scale","shape")
return(theta)
}
-QuantileBCCEstimator <- function(x, p1=1/3, p2=1/3, ParamFamily=WeibullFamily(),
+QuantileBCCEstimator <- function(x, p1=1/3, p2=2/3, ParamFamily=WeibullFamily(),
name, Infos, nuis.idx = NULL,
trafo = NULL, fixed = NULL, na.rm = TRUE,
...){
Modified: branches/robast-0.9/pkg/RobExtremes/R/asvarPickands.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/asvarPickands.R 2013-01-18 19:47:49 UTC (rev 542)
+++ branches/robast-0.9/pkg/RobExtremes/R/asvarPickands.R 2013-01-18 20:07:01 UTC (rev 543)
@@ -73,7 +73,7 @@
return(ASV_Pick)
}
-asvarQBCC <- function(model, p1 = 1/3, p2= 1/3){
+asvarQBCC <- function(model, p1 = 1/3, p2= 2/3){
if(!(is(model,"WeibullFamily")))
stop("QuantileBCC estimator only available for Weibull.")
Modified: branches/robast-0.9/pkg/RobExtremes/man/QuantileBCCEstimator.Rd
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/man/QuantileBCCEstimator.Rd 2013-01-18 19:47:49 UTC (rev 542)
+++ branches/robast-0.9/pkg/RobExtremes/man/QuantileBCCEstimator.Rd 2013-01-18 20:07:01 UTC (rev 543)
@@ -8,16 +8,16 @@
(for the Weibull) at real data and returns an object of class \code{Estimate}.
}
\usage{
-QuantileBCCEstimator(x, p1 = 1/3, p2 = 1/3,
+QuantileBCCEstimator(x, p1 = 1/3, p2 = 2/3,
name, Infos, nuis.idx = NULL,
trafo = NULL, fixed = NULL, na.rm = TRUE,
...)
-.QBCC(x, p1 = 1/3, p2 = 1/3)
+.QBCC(x, p1 = 1/3, p2 = 2/3)
}
\arguments{
\item{x}{ (empirical) data }
\item{p1,p2}{levels of the quantiles; maximal breakdown point is achieved
- for \eqn{p1=p2=1/3} which is the default.}
+ for \eqn{p1=p2-p1=1-p2=1/3} which is the default.}
\item{name}{ optional name for estimator. }
\item{Infos}{ character: optional informations about estimator }
\item{nuis.idx}{ optionally the indices of the estimate belonging
Modified: branches/robast-0.9/pkg/RobExtremes/man/asvarPickands.Rd
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/man/asvarPickands.Rd 2013-01-18 19:47:49 UTC (rev 542)
+++ branches/robast-0.9/pkg/RobExtremes/man/asvarPickands.Rd 2013-01-18 20:07:01 UTC (rev 543)
@@ -4,7 +4,7 @@
\title{ Function to compute asymptotic variance of Pickands estimator}
\description{
Function \code{asvarPickands} computes the asymptotic (co)variance of
- a Pickands estimator at a GPD model.
+ a Pickands estimator at a GPD or GEVD model.
}
\usage{
asvarPickands( model, alpha=2)
@@ -15,7 +15,7 @@
based on matching the empirical \eqn{a_1=1-1/\alpha}{a1=1-1/alpha} and
\eqn{a_1=1-1/\alpha^2}{a1=1-1/alpha^2} quantiles against the
population counter parts. The ``classical'' Pickands Estimator is
- obtained for \code{alpha=2}. }
+ obtained for \code{alpha=2} (GPD) resp. for \code{alpha=1/log(2)} (GEVD). }
}
\details{
All terms are analytic.
Modified: branches/robast-0.9/pkg/RobExtremes/man/asvarQBCC.Rd
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/man/asvarQBCC.Rd 2013-01-18 19:47:49 UTC (rev 542)
+++ branches/robast-0.9/pkg/RobExtremes/man/asvarQBCC.Rd 2013-01-18 20:07:01 UTC (rev 543)
@@ -1,21 +1,18 @@
-\name{asvarPickands}
-\alias{asvarPickands}
+\name{asvarQBCC}
+\alias{asvarQBCC}
-\title{ Function to compute asymptotic variance of Pickands estimator}
+\title{ Function to compute asymptotic variance of QuantileBCC estimator}
\description{
- Function \code{asvarPickands} computes the asymptotic (co)variance of
- a Pickands estimator at a GPD model.
+ Function \code{asvarQBCC} computes the asymptotic (co)variance of
+ a QuantileBCC estimator at a Weibull model.
}
\usage{
-asvarPickands( model, alpha=2)
+asvarQBCC( model, p1 = 1/3, p2 = 2/3)
}
\arguments{
\item{model}{an object of class \code{"ScaleShapeUnion"}. }
- \item{alpha}{ numeric > 1; determines the variant of the Pickands-Estimator
- based on matching the empirical \eqn{a_1=1-1/\alpha}{a1=1-1/alpha} and
- \eqn{a_1=1-1/\alpha^2}{a1=1-1/alpha^2} quantiles against the
- population counter parts. The ``classical'' Pickands Estimator is
- obtained for \code{alpha=2}. }
+ \item{p1,p2}{levels of the quantiles; maximal breakdown point is achieved
+ for \eqn{p1=p2-p1=1-p2=1/3} which is the default.}
}
\details{
All terms are analytic.
@@ -23,20 +20,14 @@
\value{
A 2x2 matrix; the covariance. }
-\references{
-Ruckdeschel, P. and Horbenko, N. (2011): Optimally-Robust Estimators in Generalized
-Pareto Models. ArXiv 1005.1476. To appear at \emph{Statistics}.
-DOI: 10.1080/02331888.2011.628022. \cr
-}
-
%\references{ }
\author{Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}}
%\note{}
-\seealso{\code{\link{PickandsEstimator}} }
+\seealso{\code{\link{QBCCEstimator}} }
\examples{
-GP <- GParetoFamily(scale=1,shape=0.7)
-asvarPickands(GP)
-asvarPickands(GP,alpha=2.3)
+GP <- WeibullFamily(scale=1,shape=0.7)
+asvarQBCC(GP)
+asvarQBCC(GP, p1=1/4, p2= 5/8)
}
\keyword{asymptotic variance}
More information about the Robast-commits
mailing list