validate_LMM: Compute accuracy metrics on test set for LMM

View source: R/validation.R

validate_LMMR Documentation

Compute accuracy metrics on test set for LMM

Description

Compute accuracy metrics on test set for LMM

Usage

validate_LMM(
  formula,
  data,
  rep = 10,
  Ncpu = 1,
  spatial = FALSE,
  seed = 123,
  return_fit = TRUE,
  ...
)

Arguments

formula

a model formula used to fit the data

data

the full dataset

rep

the number of cross validation replicates (default = 10)

Ncpu

the number of CPU cores to be used (default = 1)

spatial

either FALSE (default) or TRUE

seed

the seed used to control the reproducibility of the cross validation

return_fit

whether to return the fit on all the data as attribute (default = FALSE)

...

additional parameters to be passed to spaMM::fitme()

Value

a tibble with the CV replicates in row and accuracy metrics in columns

See Also

compute_metrics() for details on the function computing the values outputted here

Examples

validate_LMM(staff_rangers_log ~ PA_area_log, data = data_test)


courtiol/rangeRinPA documentation built on Sept. 29, 2022, 9:54 a.m.