| Library: | spatial |
| See also: | SPKRsurfls SPKRsurfgls SPKRexpcov SPKRgaucov SPKRtrmat SPKRprmat SPKRsemat SPKRcorrelogram SPKRvariogram SPKRmultcontours |
| Quantlet: | SPKRsphercov | |
| Description: | spatial covariance function for use with SPKRsurfgls |
| Usage: | res = SPKRsphercov(r, d, alpha, se {, D}) | |
| Input: | ||
| r | n x 1 vector, distances used to evaluate the covariance | |
| d | scalar, range parameter | |
| alpha | scalar, proportion of nugget effect | |
| se | scalar, standard deviation at distance zero | |
| D | optional scalar, dimension of spheres; default D = 2 | |
| Output: | ||
| res | n x 1 vector, covariance values | |
; loads the spatial statistics library
library("spatial")
; calculates spatial covariance function SPKRsphercov
; with d = 0.7, alpha = 0, se = 1, and D = 2 on a grid
; from 0 through 7
ddat = grid(0, 0.1, 71)
linedat = ddat ~ SPKRsphercov(ddat, 0.7, 0, 1, 2)
; creates a display and draws the covariance
disp = createdisplay(1, 1)
show(disp, 1, 1, linedat)
A plot of the vector of covariance values. Typically, this quantlet is used together with SPKRsurfgls or SPKRcorrelogram.