[R] spline.correlog (ncf package) - Error message: tol must be strictly positive and finite

Diego Pavon diego.pavonjordan at gmail.com
Wed Jan 20 11:17:11 CET 2016

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

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

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"],

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!



*Diego Pavón Jordán*

*Finnish Museum of Natural History*
*PO BOX 17 *

*Helsinki. Finland*


	[[alternative HTML version deleted]]

More information about the R-help mailing list