sim.ns: Simulating points from a Neyman-Scott point process

Description Usage Arguments Details Value Examples

View source: R/fit-ns.r

Description

Generates points from a Neyman-Scott point process using parameters provided by the user.

Usage

1
2
sim.ns(pars, lims, disp = "gaussian", child.dist = "pois",
  child.info = NULL)

Arguments

pars

A named vector containing the values of the parameters of the process that generates the points.

lims

A matrix with two columns, corresponding to the upper and lower limits of each dimension, respectively.

disp

A character string indicating the distribution of children around their parents. Use "gaussian" for multivariate normal dispersion with standard deviation sigma, or "uniform" for uniform dispersion within distance tau of the parent.

child.dist

The distribution of the number of children generated by a randomly selected parent. For a Poisson distribution, use "pois"; for a binomial distribution, use "binomx", where "x" is replaced by the fixed value of the number of independent trials (e.g., "binom5" for a Binomial(5, p) distribution, and "binom50" for a Binomial(50, p) distribution); and "twoplane" for a child distribution appropriate for a two-plane aerial survey.

child.info

A list of further information that is required about the distribution for the number of children generated by parents. See ‘Details’.

Details

For a list of possible parameter names, see fit.ns.

The "child.info" argument is required when child.dist is set to "twoplane". It must be a list that comprises (i) a component named w, providing the halfwidth of the detection zone; (ii) a component named b, providing the halfwidth of the survey area; (iii) a component named l, providing the time lag between planes (in seconds); and (iv) a component named tau, providing the mean dive-cycle duration. See Stevenson, Borchers, and Fewster (in prep) for details.

Value

A list. The first component gives the Cartesian coordinates of the generated points. A second component may provide sibling information.

Examples

1
2
3
4
5
6
7
8
9
set.seed(1234)
## One-dimensional Thomas process.
data.thomas <- sim.ns(c(D = 10, lambda = 5, sigma = 0.025), lims = rbind(c(0, 1)))
## Fitting a model to these data.
fit.thomas <- fit.ns(data.thomas$points, lims = rbind(c(0, 1)), R = 0.5)
## Three-dimensional Matern process.
data.matern <- sim.ns(c(D = 10, lambda = 10, tau = 0.1), disp = "uniform", lims = rbind(c(0, 1), c(0, 2), c(0, 3)))
## Fitting a model to these data.
fit.matern <- fit.ns(data.matern$points, lims = rbind(c(0, 1), c(0, 2), c(0, 3)), R = 0.5, disp = "uniform")

b-steve/nspp documentation built on June 4, 2017, 12:10 a.m.