ModelSet: Base class for model sets

View source: R/ModelSet.R

ModelSetR Documentation

Base class for model sets

Description

This class is primarily used as a parent class for other model set implementations.

Usage

ModelSet(
  response,
  covariates,
  predict_fn,
  descriptors = list(),
  response_definition = NA_character_,
  covariate_definitions = list()
)

Arguments

response

A named list containing one element, with a name representing the response variable and a value representing the units of the response variable using the units::as_units function.

covariates

A named list containing the covariate specifications, with names representing the covariate name and the values representing the units of the coavariate using the units::as_units function

predict_fn

A function that takes the covariate names as arguments and returns a prediction of the response variable. This function should be vectorized.

descriptors

An optional named list of descriptors that describe the context of the allometric model

response_definition

A string containing an optional custom response definition, which is used instead of the description given by the variable naming system.

covariate_definitions

An optional named list of custom covariate definitions that will supersede the definitions given by the variable naming system. The names of the list must match the covariate names given in covariates.

Value

An instance of a ModelSet


allometric documentation built on Nov. 8, 2023, 1:07 a.m.