Learn R Programming

braidrm (version 1.0.3)

invertFlippedBraidModel: Invert Flipped BRAID Surfaces

Description

Given a particular effect and one of the doses in a flipped combined action response surface, this function calculates the other dose that will produce the desired effect.invertFlippedBraidModelA and invertFlippedBraidModelB are convenience wrapper functions that set DA or DB to NULL to estimate the necessary concentrations of drug A and drug B respectively.

Usage

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

invertFlippedBraidModel_A( DB, effect, bpar, flip, invalidNA = FALSE, lowerBound = FALSE )

invertFlippedBraidModel_B( DA, effect, bpar, flip, invalidNA = FALSE, lowerBound = FALSE )

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

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

Flipped-BRAID parameter of the flipped response surface. See evalFlippedBraidModel() for more information on specifying atypical surfaces

flip

String specifying the direction or directions of the surface's flip. Must be one of "A", "B", or "both".

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

Examples

Run this code
fbfit <- fitProtectiveBraid_A(measure ~ concA + concB,
                              protectiveExample, getCIs=FALSE)

invertFlippedBraidModel_A(DB=0, effect=0.5, coef(fbfit), fbfit$flip)
invertFlippedBraidModel_A(DB=0.75, effect=0.5, coef(fbfit), fbfit$flip)

Run the code above in your browser using DataLab