crossValidation: Performs cross-validation

Description Usage Arguments Details Value Examples

Description

Performs cross-validation for a subset of data to assess predictive performance of the final model.

Usage

1
2
crossValidation(response, finalmodel, A_mat, spde, family = "binomial",
  raster_stack, int.strategy, n_reps = 100, pct_out)

Arguments

response

A data frame containing the response data including number of positive cases (n_positive), number of individuals examined (examined), and point locations (longitude and latitude).

finalmodel

An object returned from the function findModelWithSmallestDIC.

A_mat

An observation/prediction weight matrix returned from makeMeshSPDE.

spde

An inla.spde2 model object for a Matern model returned from makeMeshSPDE.

family

A string indicating the likelihood family, Default: ‘binomial’.

raster_stack

A collection of RasterLayer objects with the same spatial extent and resolution.

int.strategy

Character. The integration strategy to use; one of ‘auto’, ‘ccd’, ‘grid’, ‘eb’ (empirical bayes), ‘user’ or ‘user.std’.

n_reps

Number of replicates of subsets of data for cross-validation, Default: ‘100’.

pct_out

Percentage of data to be used as a test set.

Details

DETAILS

Value

OUTPUT_DESCRIPTION

Examples

1
2
3
4
5
6
## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

suyunkang/PrevalenceMapping documentation built on May 10, 2019, 1:52 a.m.