intModel {PointedSDMs} | R Documentation |
intModel: Function used to initialize the integrated species distribution model.
Description
This function is depreciated. Please use one of startISDM
or startSpecies
.
Usage
intModel(
...,
spatialCovariates = NULL,
Coordinates,
Projection,
Mesh,
IPS = NULL,
Boundary = NULL,
speciesSpatial = "copy",
speciesIndependent = FALSE,
markNames = NULL,
markFamily = NULL,
pointCovariates = NULL,
pointsIntercept = TRUE,
marksIntercept = TRUE,
speciesEffects = list(randomIntercept = FALSE, Environmental = TRUE),
Offset = NULL,
pointsSpatial = "copy",
marksSpatial = TRUE,
responseCounts = "counts",
responsePA = "present",
trialsPA = NULL,
trialsMarks = NULL,
speciesName = NULL,
temporalName = NULL,
temporalModel = list(model = "ar1"),
copyModel = list(beta = list(fixed = FALSE)),
Formulas = list(covariateFormula = NULL, biasFormula = NULL)
)
Arguments
... |
The datasets to be used in the model. May come as either |
spatialCovariates |
The spatial covariates used in the model. These covariates must be measured at every location (pixel) in the study area, and must be a |
Coordinates |
A vector of length 2 containing the names (class |
Projection |
The coordinate reference system used by both the spatial points and spatial covariates. Must be of class |
Mesh |
An |
IPS |
The integration points to be used in the model (that is, the points on the map where the intensity of the model is calculated). See |
Boundary |
A |
speciesSpatial |
Argument to specify if each species should have their own spatial effect with different hyperparameters to be estimated using INLA's "replicate" feature, of if a the field's should be estimated per species copied across datasets using INLA's "copy" feature. Possible values include: |
speciesIndependent |
Logical argument: Should species effects be made independent of one another. Defaults to |
markNames |
A vector with the mark names (class |
markFamily |
A vector with the statistical families (class |
pointCovariates |
The non-spatial covariates to be included in the integrated model (for example, in the field of ecology the distance to the nearest road or time spent sampling could be considered). These covariates must be included in the same data object as the points. |
pointsIntercept |
Logical argument: should the points be modeled with intercepts. Defaults to |
marksIntercept |
Logical argument: should the marks be modeled with intercepts. Defaults to |
speciesEffects |
List specifying if intercept terms and environments effects should be made for the species. Defaults to |
Offset |
Name of the offset variable (class |
pointsSpatial |
Argument to determine whether the spatial field is shared between the datasets, or if each dataset has its own unique spatial field. The datasets may share a spatial field with INLA's "copy" feature if the argument is set to |
marksSpatial |
Logical argument: should the marks have their own spatial field. Defaults to |
responseCounts |
Name of the response variable in the counts/abundance datasets. This variable name needs to be standardized across all counts datasets used in the integrated model. Defaults to |
responsePA |
Name of the response variable (class |
trialsPA |
Name of the trials response variable (class |
trialsMarks |
Name of the trials response variable (class |
speciesName |
Name of the species variable name (class |
temporalName |
Name of the temporal variable (class |
temporalModel |
List of model specifications given to the control.group argument in the time effect component. Defaults to |
copyModel |
List of model specifications given to the hyper parameters for the |
Formulas |
A named list with two objects. The first one, |
Value
A specifyISDM
object (class R6
). Use ?specifyISDM
to get a comprehensive description of the slot functions associated with this object.
Note
The idea with this function is to describe the full model: that is, all the covariates and spatial effects will appear in all the formulas for the datasets and species.
If some of these terms should not be included in certain observation models in the integrated model, they can be thinned out using the .$updateFormula
function.
Note: the point covariate and mark terms will only be included in the formulas for where they are present in a given dataset, and so these terms do not need to be thinned out if they are not required by certain observation models.
Examples
## Not run:
if (requireNamespace('INLA')) {
#Get Data
data("SolitaryTinamou")
proj <- "+proj=longlat +ellps=WGS84"
data <- SolitaryTinamou$datasets
mesh <- SolitaryTinamou$mesh
mesh$crs <- proj
#Set base model up
baseModel <- intModel(data, Mesh = mesh, Coordinates = c('X', 'Y'),
Projection = proj, responsePA = 'Present')
#Print summary
baseModel
#Set up model with dataset specific spatial fields
indSpat <- intModel(data, Mesh = mesh, Coordinates = c('X', 'Y'),
Projection = proj, pointsSpatial = 'individual', responsePA = 'Present')
#Model with offset variable
offSet <- intModel(data, Mesh = mesh, Coordinates = c('X', 'Y'),
Projection = proj, Offset = 'area', responsePA = 'Present')
#Assume area as a mark
markModel <- intModel(data, Mesh = mesh, Coordinates = c('X', 'Y'),
Projection = proj, markNames = 'area', markFamily = 'gamma',
responsePA = 'Present')
}
## End(Not run)