prinKrige {kergp}R Documentation

Principal Kriging Functions

Description

Principal Kriging Functions.

Usage


prinKrige(object)

Arguments

object

An object with class "gp".

Details

The Principal Kriging Functions (PKF) are the eigenvectors of a symmetric positive matrix B\mathbf{B} named the Bending Energy Matrix which is met when combining a linear trend and a covariance kernel as done in gp. This matrix has dimension n×nn \times n and rank npn - p. The PKF are given in the ascending order of the eigenvalues eie_i

e1=e2==ep=0<ep+1ep+2en.e_1 = e_2 = \dots = e_p = 0 < e_{p+1} \leq e_{p+2} \leq \dots \leq e_n.

The pp first PKF generate the same space as do the pp columns of the trend matrix F\mathbf{F}, say colspan(F)\textrm{colspan}(\mathbf{F}). The following npn-p PKFs generate a supplementary of the subspace colspan(F)\textrm{colspan}(\mathbf{F}), and they have a decreasing influence on the response. So the p+1p +1-th PKF can give a hint on a possible deterministic trend functions that could be added to the pp existing ones.

The matrix B\mathbf{B} is such that BF=0\mathbf{B} \mathbf{F} = \mathbf{0}, so the columns of F\mathbf{F} can be thought of as the eigenvectors that are associated with the zero eigenvalues e1e_1, \dots, epe_p.

Value

A list

values

The eigenvalues of the energy bending matrix in ascending order. The first pp values must be very close to zero, but will not be zero since they are provided by numerical linear algebra.

vectors

A matrix U\mathbf{U} with its columns ui\mathbf{u}_i equal to the eigenvectors of the energy bending matrix, in correspondence with the eigenvalues eie_i.

B

The Energy Bending Matrix B\mathbf{B}. Remind that the eigenvectors are used here in the ascending order of the eigenvalues, which is the reverse of the usual order.

Note

When an eigenvalue eie_i is such that ei1<ei<ei+1e_{i-1} < e_i < e_{i+1} (which can happen only for i>pi > p), the corresponding PKF is unique up to a change of sign. However a run of r>1r > 1 identical eigenvalues is associated with a rr-dimensional eigenspace and the corresponding PKFs have no meaning when they are considered individually.

References

Sahu S.K. and Mardia K.V. (2003). A Bayesian kriged Kalman model for short-term forecasting of air pollution levels. Appl. Statist. 54 (1), pp. 223-244.

Examples

library(kergp)
set.seed(314159)
n <- 100
x <- sort(runif(n))
y <- 2 + 4 * x  + 2 * x^2 + 3 * sin(6 * pi * x ) + 1.0 * rnorm(n)
nNew <- 60; xNew <- sort(runif(nNew))
df <- data.frame(x = x, y = y)

##-------------------------------------------------------------------------
## use a Matern 3/2 covariance and a mispecified trend. We should guess
## that it lacks a mainily linear and slightly quadratic part.
##-------------------------------------------------------------------------

myKern <- k1Matern3_2
inputNames(myKern) <- "x"
mygp <- gp(formula = y ~ sin(6 * pi * x),
           data = df, 
           parCovLower = c(0.01, 0.01), parCovUpper = c(10, 100),
           cov = myKern, estim = TRUE, noise = TRUE)
PK <- prinKrige(mygp)

## the third PKF suggests a possible linear trend term, and the
## fourth may suggest a possible quadratic linear trend

matplot(x, PK$vectors[ , 1:4], type = "l", lwd = 2)


[Package kergp version 0.5.7 Index]