extract_dispatcher-familiarEnsemble-familiarDataElement-method: Internal function to dispatch extraction functions.

extract_dispatcher,familiarEnsemble,familiarDataElement-methodR Documentation

Internal function to dispatch extraction functions.

Description

This function provides a unified access point to extraction functions. Some of these functions require bootstrapping and result aggregation, which are handled here.

Usage

## S4 method for signature 'familiarEnsemble,familiarDataElement'
extract_dispatcher(
  cl = NULL,
  FUN,
  object,
  proto_data_element,
  aggregate_results,
  has_internal_bootstrap,
  ...,
  message_indent = 0L,
  verbose = TRUE
)

Arguments

cl

Cluster created using the parallel package. This cluster is then used to speed up computation through parallellisation.

FUN

Extraction function or method to which data and parameters are dispatched.

object

A familiarEnsemble object.

proto_data_element

A familiarDataElement object, or an object that inherits from it.

aggregate_results

A logical flag indicating whether results should be aggregated.

has_internal_bootstrap

A logical flag that indicates whether FUN has internal bootstrapping capabilities.

...

Unused arguments.

message_indent

Number of indentation steps for messages shown during computation and extraction of various data elements.

verbose

Flag to indicate whether feedback should be provided on the computation and extraction of various data elements.

Details

This function first determines how many data points need to be evaluated to complete the desired estimation, i.e. 1 for point estimates, 20 for bias-corrected estimates, and 20 / (1 - confidence level) for bootstrap confidence intervals.

Subsequently, we determine the number of models. This number is used to set external or internal clusters, the number of bootstraps, and to evaluate whether the estimation can be done in case FUN does not support bootstrapping.

Value

A list of familiarDataElement objects.


familiar documentation built on Sept. 30, 2024, 9:18 a.m.