invertBraidModel: Invert a BRAID Response Surface Model

View source: R/braidModel.R

invertBraidModelR Documentation

Invert a BRAID Response Surface Model

Description

Given a particular effect and one of the doses in a combined action response surface, this function calculates the other dose that will produce the desired effect. Used in the estimation of the IAE (see estimateIAE()) but also useful for calculating something like the IC50 of one drug in the presence of various doses of the other. invertBraidModelA and invertBraidModelB are convenience wrapper functions that set DA or DB to NULL to estimate the necessary concentrations of drug A and drug B respectively.

Usage

invertBraidModel(
  DA = NULL,
  DB = NULL,
  effect,
  bpar,
  invalidNA = FALSE,
  lowerBound = FALSE
)

invertBraidModel_A(DB, effect, bpar, invalidNA = FALSE, lowerBound = FALSE)

invertBraidModel_B(DA, effect, bpar, invalidNA = FALSE, lowerBound = FALSE)

Arguments

DA

If not NULL, a vector of doses of drug A. Must be length 1 or the same length as effect. Only one of DA and DB may be not null.

DB

If not NULL, a vector of doses of drug B. Must be length 1 or the same length as effect. Only one of DA and DB may be not null.

effect

A vector of desired effect values to be reached. Must be length 1 or the same length as whichever of DA or DB is not null.

bpar

A BRAID response surface parameter vector (see evalBraidModel() for details)

invalidNA

Specifies what to do with values that are outside the range of the given BRAID model or doses. If FALSE (the default), values "below" the given range will be set to zero, and values "above" the given range will be set to Inf. If TRUE, all invalid values will be set to NA.

lowerBound

Primarily used by estimateIAE(). If set to TRUE, will return the lowest non-negative dose that produces an effect no greater than the specified effect, rather than the highest

Value

A vector of concentrations the same length as either DA or DB (whichever is not NULL) and/or effect, representing the concentration of the other drug producing the specified effect in combination with the given dose of the provided drug

Examples

baseIC <- invertBraidModel_A(
    DB=0,
    effect=seq(10,90,by=10),
    bpar=c(1, 1, 3, 3, 2, 0, 100, 100, 100)
)

potentiatedIC <- invertBraidModel_A(
    DB=1,
    effect=seq(10,90,by=10),
    bpar=c(1, 1, 3, 3, 2, 0, 100, 100, 100)
)

braidrm documentation built on Sept. 30, 2024, 9:40 a.m.