represampling_kmeans_bootstrap: Spatial block bootstrap at the level of spatial k-means...

View source: R/sperrorest_resampling.R

represampling_kmeans_bootstrapR Documentation

Spatial block bootstrap at the level of spatial k-means clusters

Description

represampling_kmeans_bootstrap performs a non-overlapping spatial block bootstrap by resampling at the level of irregularly-shaped partitions generated by partition_kmeans.

Usage

represampling_kmeans_bootstrap(
  data,
  coords = c("x", "y"),
  repetition = 1,
  nfold = 10,
  nboot = nfold,
  seed1 = NULL,
  oob = FALSE,
  ...
)

Arguments

data

data.frame containing at least the columns specified by coords

coords

vector of length 2 defining the variables in data that contain the x and y coordinates of sample locations.

repetition

numeric vector: cross-validation repetitions to be generated. Note that this is not the number of repetitions, but the indices of these repetitions. E.g., use repetition = c(1:100) to obtain (the 'first') 100 repetitions, and repetition = c(101:200) to obtain a different set of 100 repetitions.

nfold

see partition_kmeans

nboot

see represampling_factor_bootstrap

seed1

seed1+i is the random seed that will be used by set.seed in repetition i (i in repetition) to initialize the random number generator before sampling from the data set.

oob

see represampling_factor_bootstrap

...

additional arguments to be passed to partition_kmeans


sperrorest documentation built on Oct. 16, 2022, 5:05 p.m.