Learn R Programming

doseSens (version 1.0.0)

extract_below_threshold_vs_baseline: Compute average of outcomes below dose threshold minus average of outcomes.

Description

Compute average of outcomes below dose threshold minus average of outcomes.

Usage

extract_below_threshold_vs_baseline(z, r, threshold)

Value

the average of the outcomes with dose z below threshold c minus the average of the outcomes r.

Arguments

z

a vector of doses

r

a vector of outcomes

threshold

a dose threshold

Examples

Run this code
# dose vector
dose <- c(0, 0.1, 0.4)
# outcome vector
outcome <- c(1, 1.1, 1.5)
theta <- extract_below_threshold_vs_baseline(z = dose, r = outcome, threshold = 0.3)

Run the code above in your browser using DataLab