blockedCV {PointedSDMs} | R Documentation |
blockedCV: run spatial blocked cross-validation on the integrated model.
Description
This function is used to perform spatial blocked cross-validation with regards to model selection for the integrated model. It does so by leaving out a block of data in the full model, running a model with the remaining data, and then calculating the deviance information criteria (DIC) as a score of model fit.
Usage
blockedCV(data, options = list())
Arguments
data |
An object produced by either |
options |
A list of INLA or inlabru options to be used in the model. Defaults to |
Value
An object of class blockedCV
, which is essentially a list of DIC values obtained from each iteration of the model.
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 model up
organizedData <- startISDM(data, Mesh = mesh,
responsePA = 'Present',
Projection = proj)
#Set up spatial block
organizedData$spatialBlock(k = 2, rows = 2, cols = 1)
#Run spatial block cross-validation
blocked <- blockedCV(organizedData)
#Print summary
blocked
}
## End(Not run)
[Package PointedSDMs version 2.1.0 Index]