Skip to contents

AreaInteractionSimulate: birth-death Metropolis-Hastings for beta^n eta^(-C(x)) with the union of discs counted on a grid. ThomasSimulate and ThomasK: Thomas cluster process and its K function. LgcpSimulateGrid: log-Gaussian Cox process on a grid. AbramsonIntensity: adaptive Gaussian kernel with Abramson's square-root bandwidths. BermanTurnerFit: penalised log-linear intensity by Berman-Turner quadrature with grid counting weights. StKFunction, StGFunction, StJFunction: space-time second-order and nearest-neighbour summaries. Philox streams as the Python arm.

Usage

AreaInteractionSimulate(beta, eta, r, window, n_steps, grid = 100, seed = 0)

AbramsonIntensity(points, at, h0, trim = 5)

BermanTurnerFit(points, window, covariates, nx, ny, ridge = 0, max_iter = 100)

StKFunction(points, r_values, t_values, area, time_length, method = "diggle")

StGFunction(points, r_values, t_values)

StJFunction(
  points,
  r_values,
  t_values,
  window,
  time_range,
  n_grid = 10,
  n_time = 10
)

Arguments

beta, eta, r

Area-interaction activity, interaction and radius.

window

c(x0, x1, y0, y1).

n_steps

Birth-death steps.

grid

Union-area lattice size.

seed

Philox seed.

points

Point coordinates (rows; x, y, t for space-time).

at

Evaluation locations.

h0

Pilot bandwidth.

trim

Bandwidth trimming factor.

covariates

Function of (x, y) returning the covariate vector.

nx, ny

Grid size.

ridge

Ridge penalty (intercept unpenalised).

max_iter

Newton iterations.

r_values, t_values

Spatial and temporal distances.

area, time_length

Window area and time length.

method

"diggle" (n(n - 1) denominator) or "stpp" (n^2, as stpp::STIKhat).

time_range

c(t0, t1).

n_grid, n_time

Reference grid sizes.

Value

A list or numeric vector.

References

Baddeley, A. J. and van Lieshout, M. N. M. (1995). Ann. Inst. Statist. Math. 47, 601-619. Geyer, C. J. and Moller, J. (1994). Scand. J. Statist. 21, 359-373. Moller, J. and Waagepetersen, R. P. (2004). Statistical Inference and Simulation for Spatial Point Processes. Moller, J., Syversveen, A. R. and Waagepetersen, R. P. (1998). Scand. J. Statist. 25, 451-482. Abramson, I. S. (1982). Ann. Statist. 10, 1217-1223. Berman, M. and Turner, T. R. (1992). Applied Statistics 41, 31-38. Diggle, P. J. et al. (1995). Statistical Methods in Medical Research 4, 124-136. van Lieshout, M. N. M. (2011). Statistica Neerlandica 65, 183-201.

Examples

xy <- AreaInteractionSimulate(beta = 50, eta = 2, r = 0.05, window = c(0, 1, 0, 1),
                              n_steps = 200, grid = 40, seed = 1)
xy$n
#> [1] 28
head(xy$points)
#>            [,1]       [,2]
#> [1,] 0.37612825 0.43820850
#> [2,] 0.08714763 0.96191756
#> [3,] 0.11748041 0.62763331
#> [4,] 0.66587740 0.04462045
#> [5,] 0.79877882 0.96870980
#> [6,] 0.44924485 0.59886100