Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/LKrigDefaultFixedFunction.R
Creates matrix of low order polynomial in the spatial coordinates and adds any other spatial covariates that are part of the linear model.
1 2 3 4  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)

drop.Z 
If TRUE only spatial drift is evaluated the contribution for covariates is omitted. 
distance.type 
The distance metric. See the entry in

m 
The order of the polynomial. Following the convention for splines the polynomial will have maximum order (m1). Throughout LKrig m==2 is the default giving a linear polynomial. 
object 
A LKrig object. 
x 
A 2 column matrix of 2d locations to evaluate the polynomial. 
xnew 
Locations for predictions. 
Z 
A matrix specifying additional spatial covariates. 
Znew 
Same as Z. 
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 m1. 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).
A matrix where rows index the locations and columns are the different spatial polynomial and covariates.
Doug Nychka
LKrig.basis, LKrig
1 2 3 4 5  x< matrix( runif(100), nrow=50)
# linear polynomial
T.matrix< LKrigDefaultFixedFunction(x, m=2)
# quadratic polynomial
T.matrix< LKrigDefaultFixedFunction(x, m=3)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.