calcHillConfInt {basicdrm}R Documentation

Estimate an confidence interval on a Hill model property

Description

Given a function from Hill model parameters to one or more model properties, this function produces a confidence interval on that value or those values using the bootstrapped model coefficents produced by calcHillBootstrap(). This is useful for estimating confidence intervals on other values like IC50, or generating confidence intervals on fitted values for plots.

Usage

calcHillConfInt(hfit, parfunc, civals = NULL)

Arguments

hfit

An object of class hillrm, with the ciCoefs property produced by calcHillBootstrap()

parfunc

A function from a four parameter Hill model vector (see evalHillModel()) to a single value or a vector of values with a consisten length

civals

An optional set of upper and lower bounds on the confidence interval to be estimated. If NULL, the default, the ciLevs property from calcHillBootstrap() will be used.

Value

An n-by-3 array, where n is the length of the vector produced by parfunc. The first row is the lower bound of the confidence interval, the second row is the function evaluated at the best-fit Hill model, and the third row is the upper bound of the confidence interval.

Examples

conc <- c(0,2^(-6:3),Inf)
hpar <- c(1,3,0,75)
response <- evalHillModel(conc, hpar) + rnorm(length(conc),sd=7.5)

hfit <- fitHillModel(conc,response,c(1,2,3,4),start=c(0.5,1,0,100))
cihfit <- calcHillBootstrap(hfit)

ic50_ci <- calcHillConfInt(cihfit,function(h) invertHillModel(50,h))

[Package basicdrm version 0.3.0 Index]