Learn R Programming

cvasi (version 1.4.0)

dose_response: 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,
  ...
)

Value

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

Arguments

scenario

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.

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.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab