hill_model | R Documentation |
Four-parameter Hill model, gradient, starting values, and back-calculation functions.
hill_model(theta, x)
theta |
Vector of four parameters: |
x |
Vector of concentrations for the Hill model. |
The four parameter Hill model is given by:
y = e_{\min} + \frac{(e_{\max}-e_{\min})}{( 1 + \exp( m\log(x) - m*\text{lec50} ) )}\text{, where }
e_{\min} = \min y
(minimum y value), e_{\max} = \max y
(maximum y value), \text{lec50} = \log( \text{ec5} )
, and m is the shape parameter.
Note: ec50 is defined such that hill.model(theta, ec50) = .5*( emin+ emax ).
Let N = length(x). Then
hill_model(theta, x) returns a numeric vector of length N.
attr(hill_model, "gradient")(theta, x) returns an N x 4 matrix.
attr(hill_model, "start")(x, y) returns a numeric vector of length 4 with starting values for
(e_{\min}, e_{\max}, \text{lec50}, m)
.
attr(hill_model, "backsolve")(theta, y) returns a numeric vector of length=length(y).
Steven Novick
optim_fit
, rout_fitter
set.seed(123L)
x = rep( c(0, 2^(-4:4)), each=4 )
theta = c(0, 100, log(.5), 2)
y = hill_model(theta, x) + rnorm( length(x), mean=0, sd=1 )
attr(hill_model, "gradient")(theta, x)
attr(hill_model, "start")(x, y)
attr(hill_model, "backsolve")(theta, 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.