pseudofitmat3: Fit a Matern-III marked point process model via MCMC sampling

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/pseudofitmat3.R

Description

Markov chain Monte Carlo sampler from Matern-III marked spatial point process

Usage

1
2
3
4
pseudofitmat3(mat3, fname = c("centers.txt", "fingers.txt"),
  win = owin(c(0, 1), c(0, 1)), R_clusters = 0.005, R_centers = 0.02,
  N = 10000, seed = NULL, resultsName = NULL,
  initialValues = pickInitialValues(), ...)

Arguments

mat3

A mat3 object, see rmat3. If reading from a data file, set to NA instead.

fname

Will only be read if mat3 is set to NA. File names with the centers and fingers dataset, to be read with read.table. The default action assumes the files "centers.txt" and "fingers.txt", each formatted with a header and three columns corresponding to a center ID (integer), and the spatial location of the center/finger end. The fingers file should have at least one finger for each center ID in the centers file.

win

Square window in which the process is to be sampled. See owin. Defaults to the unit square.

R_clusters

Nuisance parameter for the fingers' inhibition. No finger endings will be closer than R_clusters in Euclidean distance during the process sampling step (hard core inhibiition).

R_centers

Nuisance parameter for the centers' inhibition. At the birth-and-death process, process will take into account how many fingers (attached to other active centers) are currently at R_centers's distance from the candidate center being born.

N

Number of samples for integrating the area of the shadow. Defaults to 10000.

seed

Fixes the RNG seed for replication. Defaults to NULL, which does not fix the seed.

resultsName

...

initialValues

...

...

further arguments passed to read.table.

Value

fitmat3 returns a list containing at least the following components

parameters

An L by 5 matrix with the samples from beta, phi, gamma, sigma, kappa.

Author(s)

Guilherme Ludwig and Nancy Garcia

References

Garcia, N., Guttorp, P. and Ludwig, G. (2018) TBD

See Also

rmat3

Examples

1
2
3
4
5
set.seed(1234)
x <- rmat3(70, 2, 5, 0.05, 3)
plot(x)
# Changing default sampling sizes to make it run fast
model <- pseudofitmat3(x, N = 1000, seed = 1234)

guiludwig/mat3c documentation built on Dec. 2, 2019, 1:32 a.m.