[Rd] Fextremes - Error in if (xi > 0.5) (PR#9789)

From: <software_at_iangregory.com>
Date: Thu, 12 Jul 2007 09:28:20 +0200 (CEST)


Full_Name: Ian Gregory
Version: 2.41
OS: Widnows XP 64
Submission from: (NULL) (58.110.160.141)

Fextremes version: 240.10068

gpdFit(c(98,99,100),threshold=100,type="pwm")

Gives this error:
Error in if (xi > 0.5) { : missing value where TRUE/FALSE needed

This error will occur whenever a threshold value will choose a cut-off which will have identical raw values above the cut-off. In the example above; the raw values would all be the same and not exist. A larger example would identify say a cut-off at 96% and produce the error.

Line 62-66 of the function GPD:

if (xi > 0.5) {

	denom <- NA
        warning("Asymptotic standard errors not available for", 
        "PWM Method when xi > 0.5")

}

Two fixes:

(1)

Change this line:
if (xi > 0.5) {
to
if (xi > 0.5 || xi==NA) {

(2)

Change this line:
warning("Asymptotic standard errors not available for", to:
warning("Asymptotic standard errors not available for ",

ie. add a space after for.

Thank you,

Ian Gregory
Sydney University



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 12 Jul 2007 - 08:50:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 12 Jul 2007 - 09:36:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.