Creates matrix of low order polynomial in the spatial coordinates and adds any other spatial covariates that are part of the linear model.
LKrigDefaultFixedFunction(x, Z = NULL, m=2,distance.type="Euclidean")
LKrigPeriodicFixedFunction(x, Z = NULL, m = 2, distance.type = "Euclidean")
predictLKrigFixedFunction(object, xnew, Znew = NULL, drop.Z = FALSE,
collapseFixedEffect = FALSE)
A matrix where rows index the locations and columns are the different spatial polynomial and covariates.
If FALSE the fixed part of the model is found separately for each replicated data set. If TRUE the estimate is polled across replicates.
If TRUE only spatial drift is evaluated the contribution for covariates is omitted.
The distance metric. See the entry in
LKrig
for details.
The order of the polynomial. Following the convention for splines the polynomial will have maximum order (m-1). Throughout LKrig m==2 is the default giving a linear polynomial.
A LKrig object.
A 2 column matrix of 2-d locations to evaluate the polynomial.
Locations for predictions.
A matrix specifying additional spatial covariates.
Same as Z.
Doug Nychka
LKrigDefaultFixedFunction This function creates the regression matrix for the fixed part of the spatial model. The default is a low order polynomial regression matrix of degree m-1. To this matrix are bound as columns any covariates passed as Z. Typically one would not need to modify this function. For more exotic fixed part models one can specify create and then specify a different function. See LKrig.setup and LKrig. NOTE: If the argument for this function is passed as NULL then the subsequent computations do not include a fixed part in the model.
LKrigDefaultFixedFunction This is same as LKrigDefaultFixedFunction except the first coordinate is ignored. i.e. it is assumed to be periodic so adding a polynomial does not make sense.
predictLKrigFixedFunction This function is simple, but is introduced to make the code modular and to handle the case for cylindrical geometry where only latitude should have a spatial term (to preserve periodicity in longitude).
LKrig.basis, LKrig
x<- matrix( runif(100), nrow=50)
# linear polynomial
T.matrix<- LKrigDefaultFixedFunction(x, m=2)
# quadratic polynomial
T.matrix<- LKrigDefaultFixedFunction(x, m=3)
Run the code above in your browser using DataLab