evalBraidModel {braidrm}R Documentation

Evaluate the BRAID response surface model

Description

Evaluate the BRAID response surface model

Usage

evalBraidModel(DA, DB, bpar, calcderivs = FALSE)

Arguments

DA

A vector of concentrations of drug A in a combination (values 0 and Inf are permitted). Must be length 1 or the same length as DB.

DB

A vector of concentrations of drug B in a combination (values 0 and Inf are permitted). Must be length 1 or the same length as DA.

bpar

A BRAID response surface parameter vector (see Details)

calcderivs

Primarily used by fitting functions for non-linear optimization. If FALSE (the default), the function returns a vector of response values; if TRUE, it returns a list including the partial derivatives of the BRAID parameters.

Details

The BRAID response model is, in total, described by nine response surface parameters. A BRAID parameter vector should uniquely determine all these values. They are

In many cases, however, it is easier to specify only some of the final three parameters. braidrm functions therefore support BRAID parameter vectors of length 7 (in which the sixth and seventh values are assumed to be E0 and Ef, and EfA and EfB are assumed to be equal to Ef), length 8 (in which the seventh and eighth values are EfA and EfB, and Ef is assumed to be equal to whichever of these two values is further from E0), or the full length 9 parameter vector.

Value

If calcderivs is FALSE, a numeric vector the same length as DA and/or DB with the predicted BRAID response surface values. If calcderivs is TRUE, a list with two elements: value, containing the response surface values, and derivatives, a matrix with as many rows as value has elements, and nine columns containing the partial derivatives of the response surface with respect to the nine BRAID response surface parameters

Examples

concentrations <- c(0, 2^(-3:3))
surface <- data.frame(
    concA = rep(concentrations,each=length(concentrations)),
    concB = rep(concentrations,times=length(concentrations))
)

surface$additive <- evalBraidModel(
    surface$concA,
    surface$concB,
    c(1, 1, 3, 3, 0, 0, 100, 100, 100)
)

surface$synergy <- evalBraidModel(
    surface$concA,
    surface$concB,
    c(1, 1, 3, 3, 2, 0, 80, 90)
)

surface$antagonism <- evalBraidModel(
    surface$concA,
    surface$concB,
    c(1, 1, 3, 3, -1, 0, 100)
)

head(surface)

[Package braidrm version 1.0.3 Index]