I am now using the extremes
package to fit a generalized extreme value (GEV) distribution, and I want to use the Kolmogorov-Smirnov test to estimate the goodness of fit, but get the following error:
library(extRemes)
library(eva)
data("PORTw", package = "extRemes")
fit1 <- fevd(TMX1, PORTw, units = "deg C")
ks.test(PORTw$TMX1,"pgev",fit1$results$par[[1]],fit1$results$par[[2]],shape=fit1$results$par[[3]])
`Warning message:
In ks.test(PORTw$TMX1, "pgev", fit1$results$par[[1]], fit1$results$par[[2]], :
ties should not be present for the Kolmogorov-Smirnov test`
So, my question is, how to perform a Kolmogorov-Smirnov test for the GEV fit with ties? Or, is there any other goodness of fit test for fitting a distribution available in R? Thanks a lot.
this == _what_?
in R". You cannot possibly be asking how to do a KS test in R, right? At least not without doing your own search, right? – IRTFMtable(PORTw$TMX1)
– IRTFMfit1
and a theoretical GEV distribution? The aim is to evaluate the goodness of fit for thefit1
model. – Yang Yang