createPartition function

createPartition

createPartition

Constructs a partition vector given the number of folds and column of study design

createPartition(hM, nfolds = 10, column = NULL)

Arguments

  • hM: a fitted Hmsc model object
  • nfolds: number of cross-validation folds
  • column: name or index of the column in the studyDesign matrix, corresponding to the level for which units are splitted into folds

Returns

a vector describing the fold of each sampling unit

Examples

# Create 3 folds for a HMSC object partition = createPartition(TD$m, nfolds = 3)
  • Maintainer: Otso Ovaskainen
  • License: GPL-3 | file LICENSE
  • Last published: 2022-08-11