smooth.sspline {sspline} | R Documentation |
It fits a smoothing splines on the sphere with the smoothing parameter chosen by the generalized cross validation (GCV) criteria or given by the user.
smooth.sspline(lon, lat, y, m = 2, smth = 0, lambda = 0)
lon |
numeric vector, the longitudes |
lat |
numeric vector, the latitudes |
y |
numeric vector, the observations at (lon, lat) |
m |
integer, order of smoothing, takes value from 1 to 10. Default to 2 |
smth |
method for choosing the smoothing parameter: 0, gcv method; 1, user specified. Default to 0 |
lambda |
used only when smth = 1. |
It calls Fortran subroutine with the .Fortran interface.
A smooth.sspline
object with the components
lon |
the original longitude |
lat |
the original latitude |
obs |
the original observation |
lambda |
the lambda that minimizes the gcv score |
gcv |
the corresponding gcv value at lambda |
varhat |
the estimated variance |
c |
the coefficient vector c for the estimated function |
d |
the coefficient d for the estimated function |
yhat |
the estimated (smoothed) observation |
call |
the call to smooth.sspline |
The longitudes and latitudes are measured in degrees.
Xianhong Xie
Grace Wahba (1981), Spline Interpolation and Smoothing on the Sphere, SIAM J. SCI. STAT. COMPUT.
data(WTdiff) subdat <- WTdiff[sample(nrow(WTdiff), 200), 2:4] attach(subdat) smooth.sspline(lon, lat, avgd) detach(subdat)