ppSpaceTime: Spatio-temporal point process model

Description Usage Arguments Details Value

View source: R/ppSpaceTime.R

Description

Spatio-temporal point process model using INLA. This function is essentially a sophisticated wrapper over inla

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ppSpaceTime(
  formula,
  ST,
  ppWeight,
  explanaMesh,
  meshTime,
  timeRes,
  offset = NULL,
  smooth = 2,
  prior.range = c(0.05, 0.01),
  prior.sigma = c(1, 0.01),
  prior.pccor = c(0.7, 0.7),
  many = FALSE,
  ...
)

Arguments

formula

A formula that only relates the response y and some (or all) of the explanatory variables X. A paricularity of the is formula is that the response has to be defined as y.

ST

An object of class STF*, STI* or STS*.

ppWeight

An object of class ppWeight

explanaMesh

An object of class dataPrep

meshTime

An object of class inla.mesh.1d

timeRes

A character string defining the temporal resolution to use to perform the analysis. The character string choices are given in the Details section of DateTimeClasses help.

offset

A character string defining the explanatory variable in explanaMesh$X to use as offset.

smooth

A single value ranging between 0 and 2 passed to inla.spde2.pcmatern. It defines the smoothness of the Matern SPDE model. Default is set at 2.

prior.range

A vector of length 2, with (range0, Prange) specifying that P(ρ < ρ_0) = p_ρ, where ρ is the spatial range of the random field. If Prange is NA, then range0 is used as a fixed range value. Default is c(0.05, 0.01).

prior.sigma

A vector of length 2, with (sigma0, Psigma) specifying that P(σ > σ_0) = p_σ, where σ is the marginal standard deviation of the field. If Psigma is NA, then sigma0 is used as a fixed range value. Default is c(1, 0.01).

prior.pccor

A vector of length 2, with (cor, Pcor) specifying that P(cor > cor_0) = p_cor, where cor is the temporal autocorrelation. Default is c(0.7, 0.7).

many

Logical. Whether the data in sPoints is large or not. See details. Default is FALSE.

...

Arguments passed to inla

Details

If the argument many = TRUE, the estimation and the prediction will be carried out solely at the mesh edges, whereas when many = FALSE the estimation will be carried out at the mesh edges and at the sampled location. When the number of samples is very large (e.g. tens of thousands of samples or more) using many = TRUE can be much more computationally efficient. However, there is a precision trade-off. When many = TRUE, each sample is associated to an edge and the model is constructed using the number of samples associated to an edge as an importance value. In doing so, some precision is lost at the expense of speed.

Value

A list including an inla object, aninla.stack object, an inla.mesh.2d object for the spatial component of the model and an inla.mesh.1d object for the temporal component of the model.


ReseauBiodiversiteQuebec/mapSpecies documentation built on Dec. 18, 2021, 9:57 a.m.