dose_response: Calculate a dose response curve

View source: R/dose_response.R

dose_responseR Documentation

Calculate a dose response curve

Description

Returns a data.frame with points on the dose response curve for the given effect scenario.

Usage

dose_response(
  scenario,
  range = c(1, 99),
  n = 20,
  strategy = c("exponential", "decadic", "vanilla"),
  verbose = FALSE,
  ...
)

Arguments

scenario

EffectScenario used for calculation

range

numeric vector specifying the required range of effect levels in percent (%), defaults to c(1,99)

n

minimum number of points on the dose response curve

strategy

controls how multiplication factors are chosen, vanilla uses a fixed set of multiplication factors, decadic and exponential have varying step lengths if this is feasible depends on the environment setup as defined by the future package

verbose

logical, set to TRUE for additional status messages

...

additional arguments passed on to effect()

Details

Derives a dose response curve from a scenario. The result will cover the requested range of effect levels. The tested multiplication factors can be chosen by different strategies, i.e. a vanilla approach using a fixed set of factors, or decadic and exponential approaches employing logarithmic and exponential factor scaling, respectively.

Value

data.frame with two columns, i.e. factor and effect

Examples

# basic dose response curve
minnow_sd %>% dose_response()

# modify the minimum number of points on the curve
minnow_sd %>% dose_response(n=10)

# select a subset of the effect range
minnow_sd %>% dose_response(range=c(10,20))

# use an alternative strategy for the selection of multiplication factors
minnow_sd %>% dose_response(strategy="decadic")

# provide additional output how multiplication factors were selected
minnow_sd %>% dose_response(verbose=TRUE)

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