Hank
Hank

Reputation: 80

How I can do Spline Interpolation in R

I am a newbie in R and trying to do interpolation in R(sorry if it seems a lame question) . I have some Points(Lat,Lan and one integer value for each point) that I need to interpolate them. I am a GIS user I did it in ARCGIS but ArcGIS doesn't give me RMSE for spline as far as I know, so I thought to do in in R and learn some R. I have learned basif stuff such as plotting ,,,,, Can you please tell me step by step what I should do in R language to interpolate the points(global level) and calculate RMSE?

I really appreciate any help Hank

Upvotes: 1

Views: 3247

Answers (2)

Spacedman
Spacedman

Reputation: 94307

Have you got a reason for using splines (other than that's what you had in the software)? You should probably read http://cran.r-project.org/web/views/Spatial.html and consider a good book on Geostatistics http://spatial-analyst.net/book/ and then you might want to do the interpolation using Kriging.

Upvotes: 3

Paul Hiemstra
Paul Hiemstra

Reputation: 60984

I would take a look at the Tps function from the fields package, where Tps stands for Thin plate spline. Tps (from the documentation):

Fits a thin plate spline surface to irregularly spaced data. The smoothing parameter is chosen by generalized cross-validation. The assumed model is additive Y = f(X) +e where f(X) is a d dimensional surface. This is a special case of the spatial process estimate.

See the documentation of Tps for some code examples.

Upvotes: 3

Related Questions