I am trying to fit a distribution to my max scores to get a significance threshold. I am using evir::gev() to do so. When I pull my values directly from the object I have, which contains the extreme values, this fitting method throws an error. If I import the values as a vector that I have defined by hand, there is no error. From what I can tell, the data object is virtually the same in both runs, but clearly is being handled differently. (both are a vector of doubles)
This code works:
data<- c(5.401319,6.580631,6.120880,5.686255,6.640302,6.990672,5.797920,6.902248,5.694203,6.853788)
print(data)
typeof(data)
fit<- evir::gev(data)
This does not::
data<- permuted_scans$max.statistics$LOD
print(data)
typeof(data)
fit<- evir::gev(data)
Error in optim(theta, negloglik, hessian = TRUE, ..., tmp = data) : non-finite finite-difference value 1