| [an error occurred while processing this directive] |
Table of Contents 1. Introduction 2. Thin Plate Splines: Tps 3. Spatial Process Models: Krig
5. Spatial Predictions for Large Data Sets
Web Version of Fields Manual |
/W_i. A
mathematical summary of this type of spline is given in the last section of this
manual.
, a parameter
controlling the amount of smoothing. For the case of one dimension and
m = 2, the estimate reduces to the usual cubic
spline.
, varies from zero
to infinity. When
= 0 the spline estimate
interpolates the data and has a residual sums of squares of zero. At the other
extreme,
of infinity results in an estimate that
is a polynomial of degree m - 1 with the
coefficients estimated by least squares.
can be
chosen from the data by Generalized Cross-Validation (GCV). That is, the
estimate of the smoothing parameter can be found by minimizing the GCV function
) = N / D
))' W (I - A(
))Y and
D = (1 - trA(
)
/n)^2. Here, Y' denotes Y transposed, etc... It is also possible to include a
cost parameter that can give more (or less) weight to the effective number of
parameters beyond the base polynomial model.
, is found using the estimate for
by
= Y' (I - A(
))' W
(I - A(
))Y / (n -
tr(A(
))).
summary( ozone.tps)
Call:
Tps(x = ozone$x, Y = ozone$y, cov.function =
"Thin plate spline radial basis functions (rad.cov) ")
1. Number of Observations: 2. Number of unique points: 3. Degree of polynomial null space ( base model): 4. Number of parameters in the null space 5. Effective degrees of freedom: 6. Residual degrees of freedom: 7. MLE sigma 8. GCV est. sigma 9. MLE rho 10. Scale used for covariance (rho) 11. Scale used for nugget (sigma^2) 12. lambda (sigma2/rho) 13. Cost in GCV 14. GCV Minimum |
20 20 1 3 4.5 15.5 4.098 4.072 205.8 205.8 16.79 0.0816 1 21.41 |
Residuals:
min 1st Q median 3rd Q max
-6.801 -1.434 -0.5055 1.439 7.791
REMARKS
Covariance function: rad.cov
and is the trace
of the smoothing matrix, A(
).
by maximum likelihood.
by using residual sum of squares and effective
d.f.
. This is an estimate of the average squared
prediction error for a given value of
. If
has been estimated, then the minimum value of the
GCV function is reported.
[1] 38.35702 38.62821 38.44499 39.01395 38.79481 39.72864 38.30791 39.35719 [9] 39.19664 39.63307 40.98843 40.05890 41.11455 40.87318 41.42214 40.35936 [17] 40.03565 39.10773 41.34989 40.83722
k(x, x') and denote the variance
of e_i by
/W_i. Consistent with the spline estimate, we take
=
/
. The covariance function, k, may also depend
on other parameters that we explain how to specify below but these are not estimated directly by the Krig function.
, is found by GCV. If one assumes a Gaussian
process and Gaussian errors, then this estimate is also related to the
conditional expectation of f(x) given the observed data. Of equal value are
estimates of the standard errors of prediction and more will be said about these
below.
![]() Close-up |
![]() Zoomed-out (to see location better) |
![]() Contour Plot |
![]() Surface Plot w/ Standard Errors from Krig fit |
Call: Krig(x = ozone$x, Y = ozone$y, cov.function = exp.cov, theta = 10)
Number of Observations: 20 Number of unique points: 20 Degree of polynomial null space ( base model): 1 Number of parameters in the null space 3 Effective degrees of freedom: 4.5 Residual degrees of freedom: 15.5 MLE sigma 4.206 GCV est. sigma 4.2 MLE rho 2.374 Scale used for covariance (rho) 2.374 Scale used for nugget (sigma^2) 17.69 lambda (sigma2/rho) 7.453 Cost in GCV 1 GCV Minimum 22.8 Residuals: min 1st Q median 3rd Q max -7.037 -2.189 -0.4681 2.299 7.382 REMARKS Covariance function: exp.cov
Call:
Krig(x = coalash$x, Y = coalash$y, cov.function = exp.cov.S)
Number of Observations: 208 Number of unique points: 208 Degree of polynomial null space ( base model): 1 Number of parameters in the null space 3 Effective degrees of freedom: 29.7 Residual degrees of freedom: 178.3 MLE sigma 1.02 GCV est. sigma 1.018 MLE rho 0.2829 Scale used for covariance (rho) 0.2829 Scale used for nugget (sigma^2) 1.04 lambda (sigma2/rho) 3.675 RESIDUAL SUMMARY: min 1st Q median 3rd Q max -2.169 -0.6578 -0.09917 0.4115 6.169 COVARIANCE MODEL: exp.cov.S DETAILS ON SMOOTHING PARAMETER: Method used: GCV Cost: 1 lambda trA GCV GCV.one GCV.model shat 3.675 29.69 1.209 1.209 NA 1.018 Summary of estimates for lambda lambda trA GCV shat GCV 3.675 29.69 1.209 1.018 GCV.one 3.675 29.69 1.209 1.018

| theta | GCV Minimum |
0.5 0.75 1.0 1.25 1.5 1.75 2.0 2.25 2.5 2.75 3.0 3.25 3.5 3.75 4.0 4.25 5.0 10.0 100.0 |
1.225 1.221 1.218 1.216 1.214 1.212 1.211 1.21 1.209 1.209 1.208 1.208 1.207 1.207 1.207 1.207 1.206 1.205 1.205 |
![]() |
![]() |
Formula: vgram ~ sigma2 * (1 - rho * exp( - d/theta))
Parameters:
Value Std. Error t value
sigma2 1.696190 0.0334569 50.69770
rho 0.750553 0.2807990 2.67292
theta 1.635050 0.5580010 2.93019
Residual standard error: 3.60828 on 21523 degrees of freedom
Correlation of Parameter Estimates:
sigma2 rho
rho -0.346
theta 0.566 -0.877
CALL:
Krig(x = coalash$x, Y = coalash$y, rho = 0.750553, sigma2 = 1.69619, theta =
1.63505)
Number of Observations: 208
Number of unique points: 208
Degree of polynomial null space ( base model): 1
Number of parameters in the null space 3
Effective degrees of freedom: 48.8
Residual degrees of freedom: 159.2
MLE sigma 0.9604
GCV est. sigma 0.9647
MLE rho 0.4082
Scale used for covariance (rho) 0.7506
Scale used for nugget (sigma^2) 1.696
lambda (sigma2/rho) 2.26
RESIDUAL SUMMARY:
min 1st Q median 3rd Q max
-1.899 -0.5541 -0.1009 0.3808 5.486
COVARIANCE MODEL: exp.cov
DETAILS ON SMOOTHING PARAMETER:
Method used: user Cost: 1
lambda trA GCV GCV.one GCV.model shat
2.26 48.8 1.216 1.216 NA 0.9647
Summary of estimates for lambda
lambda trA GCV shat
GCV 3.422 37.27 1.213 0.9979
GCV.one 3.422 37.27 1.213 0.9979
Krig(x = ozone2$lon.lat[idn, ], Y = day16[idn], cov.function = exp.earth.cov,
m = 1, mean.obj = mean.tps, sd.obj = sd.tps, theta = 343)
Number of Observations: 147
Number of unique points: 147
Degree of polynomial null space ( base model): 0
Number of parameters in the null space 1
Effective degrees of freedom: 114.7
Residual degrees of freedom: 32.3
MLE sigma 0.289
GCV est. sigma 0.3172
MLE rho 7.538
Scale used for covariance (rho) 7.538
Scale used for nugget (sigma^2) 0.0835
lambda (sigma2/rho) 0.01108
Cost in GCV 1
GCV Minimum 0.4585
Y is standardized before spatial estimate is found
Residuals:
min 1st Q median 3rd Q max
-0.6091 -0.07774 0.003612 0.08233 0.433
REMARKS
Covariance function: exp.earth.cov
my.cov <- function( x1, x2, p = 1, range=1) {
cov <- exp( - (rdist(x1, x2)/range)^p)
return( cov)
}
| Table - Covariance functions in Fields | ||||
|---|---|---|---|---|
| Name/ description | S-Function | optional arguments with defaults | Fortran/S version | C argument |
| Exponential/ Gaussian | exp.cov | theta = 1, p = 1 | both | yes |
| Exponential for sphere | exp.earth.cov | theta = 1 | S | no |
| Matern | matern.cov | smoothness = 0.5 range = ?? | FORTRAN | no |
| Periodic 1-d | periodic.cov.ld | a = 0, b = 1 | both | no |
| Cylindrical | periodic.cov.cyl | a = 0, b = 365 theta = 1 | S | no |
| Poisson covariance for the sphere | poisson.cov | eta = 0.2 | S | no |
| Sample covariance | test.cov | theta = 1 | S | no |
| Generalized spline covariance | rad.cov | p | both | yes |
foo.cov.S <- function( x1, x2, range) {
exp( -(rdist(x1, x2)/range)**2)
} # end of foo.cov fcn (Note that foo.cov.S is the Gaussian covariance fcn.)
Call:
Krig(x = ozone$x, Y = ozone$y, cov.function = foo.cov.S, range = 10) Number of Observations: 20 Number of unique points: 20 Degree of polynomial null space ( base model): 1 Number of parameters in the null space 3 Effective degrees of freedom: 3.2 Residual degrees of freedom: 16.8 MLE sigma 4.402 GCV est. sigma 4.402 MLE rho 0.2765 Scale used for covariance (rho) 0.2765 Scale used for nugget (sigma^2) 19.38 lambda (sigma2/rho) 70.08 Cost in GCV 1 GCV Minimum 23.06 Residuals: min 1st Q median 3rd Q max -7.802 -2.736 -0.3941 2.757 7.472 REMARKS Covariance function: foo.cov.S