prevalence_predictor_spamm_st: Function to fit spatio (and spatio-temporal) model and...

Description Usage Arguments

View source: R/prevalence_predictor_spamm_st.R

Description

Function to fit spatio (and spatio-temporal) model and predict prevalence and excedance probabilities at spatial locations. Currently only supports binomial data.

Usage

1
2
3
4
5
6
prevalence_predictor_spamm_st(point_data, time_field = NULL,
  layer_names = NULL, v = 20, exceedance_threshold,
  batch_size = NULL, uncertainty_fieldname = NULL,
  additional_covariates = NULL,
  covariate_extractor_url = "https://faas.srv.disarm.io/function/fn-covariate-extractor",
  seed = 1981, fixed = FALSE, fix_cov = NULL)

Arguments

point_data

Required. An sf object of points containing at least 'n_trials', 'n_positive' fields. Any points for which observations are not available but predictions are required should be included with 'n_trials' and 'n_positive' marked with 'NA'

time_field

Optional name of column referring to time. Time should be coded as an integer not date.

layer_names

Optional names of column corresponding covariates to use. Choose from 'Layer names' as outlined [here](https://github.com/disarm-platform/fn-covariate-extractor/blob/master/SPECS.md). If none provided then spatial only model assumed.

v

The number of folds to use in the machine learning step. Defaults to 10.

exceedance_threshold

Required. The prevalence threshold for which exceedance probabilities are required

batch_size

The number of adaptively selected locations required. Defaults to NULL.

uncertainty_fieldname

If 'batch_size' is specified (>0), adaptive sampling is performed. To sample in order to minimize classification uncertainty choose 'exceedance_probability'. To sample in order to minimize prediction error choose 'prevalence_bci_width'.

additional_covariates

Optional vector of column names of 'point_data' referencing additional covariates to include in the model. Defulats to NULL

covariate_extractor_url

The function currently makes use of the temporary DiSARM API function 'fn-covariate-extractor' to extract values of 'layer_names' at locations specified in 'point_data'. If this algorithm is hosted somewhere other than the DiSARM API, include the URL here.

fixed

Logical indicating whether to use logit transformed cv predictions and fix the intercept at 0 and coefficient for cv_predicions_logit to 1. Defaults to FALSE, i.e. uses untransformed cv predictions without fixing coefficient


disarm-platform/DiSARM documentation built on March 4, 2020, 3:49 p.m.