Library: | spatial |
See also: | SPPPinit SPPPinitrandom SPPPsetregion SPPPgetregion SPPPkfn SPPPpsim SPPPstrauss SPPPssi SPPPkenvl |
Quantlet: | SPPPkaver | |
Description: | computes average of simulations of K-fns |
Usage: | res = SPPPkaver(fs, k, obj) | |
Input: | ||
fs | scalar, full scale of the plot | |
k | scalar, number of regularly spaced distances in (0, fs) | |
obj | list, consisting of xmat, ymat, and type, caculated by SPPPpsim, SPPPstrauss, or SPPPssi (list type is "PSIM", "STRAUSS", or "SSI") | |
Output: | ||
res | list, consisting of components hx and aver: | |
res.hx | k x 1 vector, distances | |
res.aver | k x 1 vector, averages of K-fn |
; loads the spatial statistics library library("spatial") ; reads a spatial data set pines = read("pines.dat") ; initializes a point process pinesobj = SPPPinit(pines, 0, 96, 0, 100, 10) ; resets random number generator SPPPinitrandom(0) ; simulates 100 Binomial point processes, each consisting ; of 72 points, in the previously determined domain ppsim = SPPPpsim(100, 72) ; calculates the average in interval(0, 5), split ; into 100 segments ppkaver = SPPPkaver(5, 100, ppsim) ppkaver
List, consisting of distances and averages of K-fn: Contents of ppkaver.hx [ 1,] 0.05 [ 2,] 0.1 [ 3,] 0.15 [ 4,] 0.2 [ 5,] 0.25 ... [ 99,] 4.95 [100,] 5 Contents of ppkaver.aver [ 1,] 0.049757 [ 2,] 0.096131 [ 3,] 0.15146 [ 4,] 0.20405 [ 5,] 0.24841 ... [ 99,] 4.9111 [100,] 4.9623