##
## A note on the kriging with external trend
##
To perform " kriging with external trend" and/ou "universal kriging"
you need the value of the covariates on both:
data locations and prediction locations.
Therefore in geoR implementation you use:
- "trend.d" to specify the trend values at data locations
- "trend.l" to specify the trend values at prediction locations
For example to perform a kriging
with a 2nd degree polynomial + a covariate
you will need the values of this covariate at both,
data and prediction locations.
Consider the following example having the objects:
"foo" : is a geodata object with a covariate called "foocov"
"gr" : is a matrix with coordinates of the prediction locations
"grcov" : is the covariate values at the prediction locations
Now assume you are performing kriging with 2nd degree polynomial trend
plus the covariate.
The code would be something along the lines:
> kc <- krige.control(obj.m=fit,
trend.d = trend.spatial("2nd", geodata=foo,
add = ~foocov),
trend.l = trend.spatial("2nd", geodata=list(coords=gr),
add = ~grcov))
> kc <- krige.conv(foo, loc=gr, krige=kc)