software at iangregory.com
2007-Jul-12 07:28 UTC
[Rd] Fextremes - Error in if (xi > 0.5) (PR#9789)
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