effect: Effect level

View source: R/effect.R

effectR Documentation

Effect level

Description

Derives the effect level due to toxicant exposure in the supplied scenarios. Either relative to a control scenario or derived directly from model endpoints, depending on model type. For scenarios with moving exposure windows, the maximum effect is returned.

Usage

effect(x, factor = 1, max_only = TRUE, ep_only = FALSE, marginal_effect, ...)

Arguments

x

vector of EffectScenario objects

factor

optional numeric value which scales the exposure time-series

max_only

logical, if TRUE only the maximum effect is returned, else results for all effect windows are reported

ep_only

logical, if TRUE only effect endpoints are returned as a vector

marginal_effect

numeric, if set, any effect smaller than this threshold will be reported as zero to exclude pseudo-effects originating from small numerical errors

...

additional parameters passed on to simulate()

Details

By default, only the maximum effect in all moving exposure windows will be returned. If argument max_only=FALSE is set, the returned table will be converted to long-format and will contain effect levels for each assessed exposure window.

Output formatting

Start and end time of exposure windows can be disabled by setting ep_only=TRUE. Effect levels smaller than a certain threshold can be automatically set to zero (0.0) to avoid spurious effect levels introduced by numerical errors. Set marginal_effect to an adequate value less than 1%.

Computational efficiency

Calculations can be sped up by providing a data.frame of pre-calculated control scenarios for each assessed time window. As control scenarios are by definition independent of any exposure multiplication factor, they can be reused for repeated calculations, e.g. to derive effect profiles or dose-response relationships.

Value

a tibble, by default containing scenarios, effect levels, and the exposure window where the maximum effect level occurred. The number of columns depends on the enabled effect endpoints and function arguments.

By default, the first column, named scenarios, contains the original scenario objects that were the basis of the calculation. For each effect endpoint, it will be followed by one column with the maximum effect level and two columns containing start and end time of the associated exposure window. If exposure windows are disabled, the columns will just contain the start and end time of the simulation. The effect level column will have the name of the effect endpoint, start and end time will additionally have the suffixes .dat.start and .dat.end, respectively.


cvasi documentation built on Sept. 23, 2024, 9:08 a.m.