I am using the following code:
Ozone<-Z
Ozone
LonLatAlt<-data.matrix(OzoneLotLatAlt_NSG1)
LonLatAlt
form.loc <- loc ~ Long + Lat + Alt
form.scale <- scale ~ 1
form.shape <- shape ~ 1
dim(Ozone)
dim(LonLatAlt)
fit1 <- fitspatgev(Z,scale(LonLatAlt,scale = FALSE),form.loc,form.scale,form.shape);fit1
TIC(fit1)
Here is the error I am receiving:
Error in optim(start, nllh, ..., method = method) : non-finite value supplied by optim
How can I solve the error?