Diego Pavon
2016-Jan-20 10:17 UTC
[R] spline.correlog (ncf package) - Error message: tol must be strictly positive and finite
Dear all I am trying to run the spline.correlogram in package ncf to check for spatial autocorrelation in the residuals of my models, but I get an error message: Error in smooth.spline(u, v, df = df) : 'tol' must be strictly positive and finite I have googled the error and I got to the website inside-r.org/packages/cran/ncf/docs/spline.correlog However, I could not figure out how to solve this error. My data consists in a time series (29 years) of counts in 92 sites in Finland. I have run the model I wanted and then I want to use the residuals to check for spatial autocorrelation. Hence, my code looks like: DucksCorr <- spline.correlog(x=Ducks2[, "Lon"], y=Ducks2[, "Lat"], z=Ducks2[, "Resid"], xmax=FALSE) When I run this code, I get the error message. I have removed NAs (although this can deal with it) and coordinates are correct and also the residuals. Do you have an idea or suggestions on how to deal with this error message? Thank you very much for your time and help! Best Diego -- *Diego Pav?n Jord?n* *Finnish Museum of Natural History* *PO BOX 17 * *Helsinki. Finland* *0445061210tuhat.halvi.helsinki.fi/portal/en/persons/diego-pavon-jordan(8d5db37c-eddd-4fca-92cd-9c9956a42b4a).html <tuhat.halvi.helsinki.fi/portal/en/persons/diego-pavon-jordan(8d5db37c-eddd-4fca-92cd-9c9956a42b4a).html>linkedin.com/profile/view?id=170617924&trk=nav_responsive_tab_profile <linkedin.com/profile/view?id=170617924&trk=nav_responsive_tab_profile>helsinki.academia.edu/DiegoPavon <helsinki.academia.edu/DiegoPavon>* [[alternative HTML version deleted]]