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: SPPPinit SPPPinitrandom SPPPsetregion SPPPgetregion SPPPkfn SPPPstrauss SPPPssi SPPPkenvl SPPPkaver

Quantlet: SPPPpsim
Description: simulates a Binomial (Poisson) spatial point process. Note that SPPPinit or SPPPsetregion must have been called before to set the domain. To be able to reproduce results, reset the random number generator for point processes by calling SPPPinitrandom first.

Reference(s):

Link:
Usage: res = SPPPpsim(nsim, n)
Input:
nsim scalar, number of simulations
n scalar, number of points in the domain
Output:
res list, consisting of components xmat, ymat and type:
res.xmat n x nsim matrix, consisting of x coordinates
res.ymat n x nsim matrix, consisting of y coordinates
res.type string, "PSIM"

Note:

Example:
; 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)
ppsim.xmat[1:3,1:3]
ppsim.ymat[1:3,1:3]

Result:
List ppsim consists of x and y coordinates of 100 Binomial
point processes, each consisting of 72 points:

Contents of _tmp
[1,]  1.0709e-06  0.25397   1.0645
[2,]   1.1978  0.62259     4.04
[3,]  0.034049   4.4376   6.1577

Contents of _tmp
[1,]  0.030269   7.9305   4.9191
[2,]   4.2072   6.0908     9.97
[3,]   2.3159   8.0506   1.1953



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