简体   繁体   中英

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

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 ad dimensional surface. This is a special case of the spatial process estimate.

See the documentation of Tps for some code examples.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM