findBestHill {braidrm} | R Documentation |
Fit Hill Model with Model Selection
Description
Fits the given concentration and response data with several Hill (or log-likelihood) models, and selects the model that best balances simplicity and accuracy according to the Akaike Information Criterion.
Usage
## Default S3 method:
findBestHill(model,data,defaults,startparv=NULL,llims=NULL,ulims=NULL,...)
## S3 method for class 'formula'
findBestHill(model,data,...)
Arguments
model |
a vector of concentrations, or a symbolic formula (e.g. |
data |
if |
defaults |
two-element vector specifying the default initial and maximal effects for the Hill model. These values will be used in several of the models that are tried (see Details below). |
startparv |
an optional parameter specifying starting parameter values for the optimization. Any parameters that do not have a starting value can have a value of NA (and will be estimated from the concentrations and responses. |
llims |
a four-element vector of lower limits on parameters being fit. Any parameters that do not require a limit can
have a value of NA. If NULL (the default), |
ulims |
a vector of upper limits on parameters being fit. Follows same behavior as |
... |
Not used |
Details
As many dose response experiments fail to capture the full sigmoidal behavior of a compound, estimation of the initial and maximal
effect parameters for a four-parameter Hill equation (see evalHillEqn
for a description of the equation used in this
package) can be quite unstable. To avoid estimation of wildly divergent parameters and overfitting, this function fits a
four-parameter Hill equation to the given data four times, with the initial and maximal effect parameters either varying freely or
fixed to the provided default values. The most parsimonious model is selected from the four fits according to the Akaike Information
Criterion. The model also fits a constant flat function to the data; though this fifth "model" is not included in the model
selection, it is included in the output for reference, as a check that the given data shows any signal at all.
Value
A list describing the results of the model fits, with the following components:
conc |
The vector of concentrations used in the fit |
act |
The vector of responses used in the fit |
bestModIdx |
The index of the model among those fit which yielded the most parsimonious fit |
bestModName |
The name of the best-fit model. The names of the models are
The fifth "model", a constant linear fit, is named "Lin", but will not be selected by the model selection. |
mlims |
A matrix of upper and lower limits applied to the four Hill parameters in the fit |
allfits |
A list of the five fits (including the trivial linear fit) applied to the data. Each fit is described by a list with the following components:
|
Author(s)
Nathaniel R. Twarog
See Also
evalHillEqn
, getHillBootstrap
, runBRAIDanalysis
Examples
data(es8olatmz)
drv <- es8olatmz$compound2=="DMSO"
hfit <- findBestHill(es8olatmz$conc1[drv],es8olatmz$act[drv],defaults=c(0,-2.7))
coef(hfit$allfits[[hfit$bestModIdx]])
hfit <- findBestHill(act~conc1,es8olatmz[drv,],defaults=c(0,-4))
coef(hfit$allfits[[hfit$bestModIdx]])