Learn R Programming

qle (version 0.18)

predictKM: Kriging the sample means of statistics

Description

predictKM,

wrapper for kriging the sample means of statistics

varKM,

calculate the kriging prediction variances

extract,

extract the results of kriging

Usage

predictKM(models, ...)

varKM(models, ...)

extract(X, type = c("mean", "sigma2", "weights"))

Arguments

models

list of covariance models, see setCovModel

...

further arguments passed to function estim

X

kriging result

type

return type of results, see details below

Value

predictKM

list of kriging predicted values

varKM

list of kriging prediction variances

extract

matrix of corresponding values (see details)

Details

For a list of fitted covariance models the function predictKM predicts the sample means of statistics at (unsampled) points, calculates the prediction variances, if applicable, at these points and extracts the results. Note that, since we aim on predicting the "error free" value of the sample means, we use the smoothing kriging predictor as described in [2, Sec. 3.7.1].

The function extract either returns the predicted values, the prediction variances or the kriging weights for each point.

Examples

Run this code
# NOT RUN {
data(normal)
X <- as.matrix(qsd$qldata[,1:2])
p <- c("mu"=2,"sd"=1)

# get simulated statistics at design X
Tstat <- qsd$qldata[grep("^mean[.]",names(qsd$qldata))]

# predict and extract 
predictKM(qsd$covT,p,X,Tstat)

# prediction variances
varKM(qsd$covT,p,X,Tstat)

# }

Run the code above in your browser using DataLab