estim: Kriging prediction and numerical approximation of derivatives

Description Usage Arguments Details Value Author(s) Examples

View source: R/krige.R

Description

Jacobian of mean values of statistics

Usage

1
2
3
estim(models, points, Xs, data, krig.type = c("dual", "var", "both"))

jacobian(models, points, Xs, data, krig.type = c("dual", "var", "both"))

Arguments

models

object of class krige either as a list of covariance models or class covModel as a single covariance model, see setCovModel

points

matrix or list of points to predict the sample means of statistics

Xs

matrix of sample points

data

data frame of sample means of statistics at sampled points

krig.type

name of kriging type, either "dual" (default) or "var"

Details

The function can be used to predict any values by kriging given a covariance model. Each covariance model is given as an element of the list 'models' including its own trend model and covariance function name. There are two types of kriging predictors available. First, the dual kriging predictor, set by 'krig.type'="dual" or the one based on the calculation of prediction variances, setting 'krig.type' to "var". Both types result in exactly the same predicted values and only differ by whether or not kriging variances should be computed. The data, e. g. sample means of each statistic, must be given as column vectors where each row corresponds to a sample point in the data frame given in the argument 'data'.

The function 'jacobian' computes the partial derivatives of sample means of the statistics as columns and for each component of the parameter vector as rows by forward difference approximations.

Value

estim

list of predicted values of sample means of statistics (including prediction variances if 'krig.type' equals to "var")

jacobian

list of Jacobians at predicted values of sample means of statistics

Author(s)

M. Baaske

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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))]

# low level prediction, variances and weights
estim(qsd$covT,p,X,Tstat,krig.type="var")

# Jacobian 
jacobian(qsd$covT,p,X,Tstat)
 
   

qle documentation built on May 2, 2019, 9:55 a.m.