Skip to contents

The hill parameter controls the slope at the ac50 (slope) but the slope also depends on the top and bottom parameters. This helper function facilitates computing the slope from the parameters.

To prove the this function is correct, consider the derivative of the response of the sigmoid() function with respect to the log_dose:


  d(response)/d(log_dose) =
    hill * log(10) * (top - bottom) * 10 ^ ((ac50 - log_dose) * hill) /
    ((10 ^ ((ac50 - log_dose) * hill) + 1) ^ 2)

Evaluating this derivative at log_dose == ac50 simplifies the exponents:


  slope = hill * log(10) * (top - bottom) / (1 + 1) ^ 2)
        = hill * log(10) * (top - bottom) / 4

Usage

sigmoid_hill_to_slope(hill, top, bottom)

Arguments

hill

numeric the hill coefficient for the sigmoid() function.

top

numeric the top parameter for the sigmoid() function.

bottom

numeric the bottom parameter for the sigmoid() function.

Value

numeric the slope of the sigmoid() function at the ac50.