tcplFit: Fit the data with the constant, hill, and gain-loss models

View source: R/tcplFit.R

tcplFitR Documentation

Fit the data with the constant, hill, and gain-loss models

Description

tcplFit fits the constant, hill, and gain-loss models to the given data and returns some summary statistics and the fit parameters in a list.

Usage

tcplFit(
  logc,
  resp,
  bmad,
  force.fit = FALSE,
  bidirectional = FALSE,
  verbose = FALSE,
  ...
)

Arguments

logc

Numeric, log concentration values

resp

Numeric, normalized response values

bmad

Numeric, the baseline median absolute deviation for the entire assay

force.fit

Logical, TRUE indicates to attempt fitting every concentration series

bidirectional

Boolean If TRUE, bidirectional negative data before fitting (default=FALSE) The original version of the code required the data to start at small values and rise, so that negative curves had to be bidirectionalped outside the function, and TOP was always positive. Setting bidirectional to TRUE allows both rising and falling curves

verbose

Boolean If TRUE print warning messages

...

Any other data to be included in list output.

Details

when at least one median value is greater than 3*bmad.

Value

List of summary values and fit parameters for the given data.

See Also

tcplObjCnst, tcplObjHill, tcplObjGnls, constrOptim

Examples

logc <- 1:10
resp <- sapply(1:10, tcplHillVal, ga = 5, tp = 50, gw = 0.5)
params <- tcplFit(logc = logc, resp = resp, bmad = 10)
plot(resp ~ logc)
tcplAddModel(pars = params, modl = "hill")


tcpl documentation built on Oct. 10, 2024, 1:07 a.m.