acy {tcplfit2} | R Documentation |
Activity Concentration y
Description
Returns concentration at which model equals y.
Usage
acy(
y,
modpars,
type = "hill",
returntop = FALSE,
returntoploc = FALSE,
getloss = FALSE,
verbose = FALSE
)
Arguments
y |
Activity value at which the concentration is desired. y should be less than the model's top, if there is one, and greater than zero. |
modpars |
List of named model parameters. Model parameters can include: "a", "b", "ga", "la", "p", "q", "tp". ga and la should NOT be in log units. |
type |
Model type; must be one of: "exp1", "exp2", "exp3", "exp4", "gnls", "hill", "poly1", "poly2", "pow". |
returntop |
When TRUE, returns actual top value for gnls. Has no effect for other models. |
returntoploc |
When TRUE, returns concentration of top for gnls. Has no effect for other models. If top location can't be found, NA is returned. |
getloss |
When TRUE, returns value on loss side of curve for gnls. Has no effect for other models. |
verbose |
When TRUE, shows warnings. |
Details
Mathematically inverts model functions of the given type, except for gnls, which is numerically inverted. gnls returns NA when y > tp. Other options return the actual top (as opposed to theoretical tp) and top location for gnls model. gnls model defaults to giving concentration on gain side. Only one of getloss, returntop, and returntoploc should be TRUE at a time. If top location solution fails for gnls, top is set to tp. Returns NA if gnls numerical solver fails. Returns NA if model was not successfully fit.
Value
Ouputs concentration at activity y, or gnls top or top concentration, when applicable.
Examples
acy(1, list(ga = 10, tp = 2, p = 3), type = "hill")
acy(1, list(ga = .1, tp = 2, p = 3, q = 3,la = 10), type = "gnls")
acy(1, list(ga = .1, tp = 2, p = 3, q = 3,la = 10), type = "gnls", getloss = TRUE)
acy(1, list(ga = .1, tp = 2, p = 3, q = 3,la = 10), type = "gnls", returntop = TRUE)
acy(1, list(ga = .1, tp = 2, p = 3, q = 3,la = 10), type = "gnls", returntoploc = TRUE)