prinKrige: Principal Kriging Functions

Description Usage Arguments Details Value Note References Examples

View source: R/prinKrige.R

Description

Principal Kriging Functions.

Usage

1
prinKrige(object)

Arguments

object

An object with class "gp".

Details

The Principal Kriging Functions (PKF) are the eigenvectors of a symmetric positive matrix 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 * n and rank n - p. The PKF are given in the ascending order of the eigenvalues e[i]

e[1] = e[2] = ... = e[p] = 0 < e[p + 1] <= e[p + 2] <= ... <= e[n].

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

The matrix B is such that B F = 0, so the columns of F can be thought of as the eigenvectors that are associated with the zero eigenvalues e[1], ..., e[p].

Value

A list

Note

When an eigenvalue e[i] is such that e[i-1] < e[i] < e[i+1] (which can happen only for i > p), the corresponding PKF is unique up to a change of sign. However a run of r > 1 identical eigenvalues is associated with a r-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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)

kergp documentation built on March 18, 2021, 5:06 p.m.