Learn R Programming

OptimModel (version 2.0-1)

hill5_model: Five-parameter Hill model, gradient, starting values, and back-calculation functions

Description

Five-parameter Hill model, gradient, starting values, and back-calculation functions.

Usage

hill5_model(theta, x)

Value

Let N = length(x). Then

  • hill5_model(theta, x) returns a numeric vector of length N.

  • attr(hill5_model, "gradient")(theta, x) returns an N x 5 matrix.

  • attr(hill5_model, "start")(x, y) returns a numeric vector of length 5 with starting values for \((e_{\min}, e_{\max}, \text{log.ic50}, m, \text{log.sym})\).

  • attr(hill5_model, "backsolve")(theta, y) returns a numeric vector of length=length(y).

Arguments

theta

Vector of five parameters: \((e_{\min}, e_{\max}, \text{log.ic50}, m, \text{log.sym})\). See details.

x

Vector of concentrations for the five-parameter Hill model.

Author

Steven Novick

Details

The five parameter Hill model is given by:

$$y = e_{\min} + \frac{e_{\max}-e+{\min}}{ 1 + \exp( m\log(x) - m\text{ log.ic50}) )^{\exp(\text{log.sym})}}$$

\(e_{\min} = \min y\) (minimum y value), \(e_{\max} = \max y\) (maximum y value), \(\text{log.ic50} = \log( \text{ic50} )\), m is the shape parameter, and \(\text{log.sym} = \log( \text{symmetry parameter})\).

Note: ic50 is defined such that hill5_model(theta, ic50) \(= e_{\min}+(e_{\max}-e_{\min})/2^{\exp(\text{log.sym})}\)

See Also

optim_fit, rout_fitter

Examples

Run this code
set.seed(123L)
x = rep( c(0, 2^(-4:4)), each=4 )
theta = c(0, 100, log(.5), 2, log(10))
y = hill5_model(theta, x)  + rnorm( length(x), mean=0, sd=1 )
attr(hill5_model, "gradient")(theta, x)
attr(hill5_model, "start")(x, y)
attr(hill5_model, "backsolve")(theta, 50)

Run the code above in your browser using DataLab