Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: spatial
See also: SPKRsurfls SPKRsurfgls SPKRexpcov SPKRgaucov SPKRsphercov SPKRtrmat SPKRsemat SPKRcorrelogram SPKRvariogram SPKRmultcontours

Quantlet: SPKRprmat
Description: evaluates a Kriging surface over a grid

Reference(s):

Link:
Usage: res = SPKRprmat(obj, xl, xu, yl, yu, n)
Input:
obj list, (of type "trgls") calculated by SPKRsurfgls
xl scalar, lower limit in x-direction of the rectangle for grid
xu scalar, upper limit in x-direction of the rectangle for grid
yl scalar, lower limit in y-direction of the rectangle for grid
yu scalar, upper limit in y-direction of the rectangle for grid
n scalar, used to create a n x n grid within the rectangle
Output:
res list, consisting of components z, xl, xu, yl, yu, n and type for further usage with SPKRmultcontours:
res.z (n+1)^2 x 3 matrix, grid
res.xl scalar, same as input value xl
res.xu scalar, same as input value xu
res.yl scalar, same as input value yl
res.yu scalar, same as input value yu
res.n scalar, same as input value n
res.type string, "prmat"

Note:

Example:
; loads the spatial statistics library
library("spatial")
; reads a spatial data set
topo = read("topo.dat")
; calculates a trend surface of order 2, using expcov as
; spatial covariance function with dval = 0.7, alph = 0,
; and se = 1
myres = SPKRsurfgls(2, 0, topo, 1000, 0.7, 0, 1)
; calculates a 30 x 30 grid within [0, 6.5] x [0, 6.5]
; using trend surface myres
mygrid = SPKRprmat(myres, 0, 6.5, 0, 6.5, 30)
mygrid

Result:
A grid suitable for displaying through SPKRmultcontours:

Contents of mygrid.z
[  1,]        0        0   966.14
[  2,]  0.21667        0   956.07
[  3,]  0.43333        0   946.02
[  4,]     0.65        0   935.67
[  5,]  0.86667        0   924.82
...

Contents of mygrid.xl
[1,]        0

Contents of mygrid.xu
[1,]      6.5

Contents of mygrid.yl
[1,]        0

Contents of mygrid.yu
[1,]      6.5

Contents of mygrid.n
[1,]       30

Contents of mygrid.type
[1,] "prmat"



Author: J. Symanzik, 20000725 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006