fitMusycModel: MuSyC Response Surface Fitting

View source: R/musycModel.R

fitMusycModelR Documentation

MuSyC Response Surface Fitting

Description

Fits the Multidimensional Synergy of Combinations (MuSyC) model of combined action to the given data (Wooten et al. 2021).

Usage

fitMusycModel(
  formula,
  data,
  variant = "standard",
  weights = NULL,
  direction = 0,
  lower = NULL,
  upper = NULL
)

## S3 method for class 'formula'
fitMusycModel(
  formula,
  data,
  variant = "standard",
  weights = NULL,
  direction = 0,
  lower = NULL,
  upper = NULL
)

## Default S3 method:
fitMusycModel(
  formula,
  data,
  variant = "standard",
  weights = NULL,
  direction = 0,
  lower = NULL,
  upper = NULL
)

Arguments

formula

Either an object of class formula such as would be provided to a modeling function like stats::lm(), or a width-2 numeric array vector of concentration pairs (including 0 or Inf). A formula should specify a single output as a function of two inputs, eg. activity ~ conc1 + conc2.

data

If forumula is a symbolic formula, a data frame containing the specified values. If formula is a numeric array of concentrations, a numeric vector of response values, the same length as the number of rows of formula.

variant

String specifying which variant of the MuSyC model is to be fit to the data. If "standard" (the default), all MuSyC parameters except gamma12 and gamma21 will be fit (these will be fixed at 1). If "independent", the four individual dose-response parameters (IDMA, IDMB, na, and nb) and the four maximal effect parameters (E0, EfA, EfB and Ef) will be fit, while the four interaction parameters (alpha12, alpha21, gamma12, and gamma12) will all be fixed at 1. If "full", the full twelve-parameter MuSyC vector will be fit.

weights

An optional vector of weights the same length as act. If NULL (the default), will be set to 1 for all measurements

direction

Determines the possible directionality of the BRAID model. If 0 (the default) no additional constraints are placed on the parameters. If greater than 0, the fitting will require that the maximal effects are all greater than or equal to the minimal effect. If less than 0, the fitting will require that all maximal effect is less than or equal to the minimal effect.

lower

An optional set of lower bounds on the fitted MuSyC response parameters. Any values set to NA will be filled with default calculated bounds. May be length 4 (will be treated as a set of lower bounds on the minimal and maximal effect parameters only), length 8 (will be treated as lower bounds on the four individual dose response parameters and the four minimal and maximla effect parameters), the same length as the space of parameters being optimized (8 for "independent", 10 for "standard", or 12 for "full"), or length 12.

upper

An optional set of lower bounds on the fitted MuSyC response parameters. Behaves the same as lower.

Value

An object of class braidAltFit with the following values:

  • concs: The array of concentrations passed to the functions

  • act: The vector of measurements associated with the given dose pairs

  • weights: The vector of weights for the given measurements, set to 1 for all measurements by default

  • method: Specifying the alternate surface model being used (in this case "MuSyC")

  • variant: A string specifying which MuSyC variant was fit: "independent", "standard", or "full"

  • coefficients: A parameter vector of the appropriate length for variant specifying the best fit response surface

  • fitted.values: The predicted response surface value for the given dose pairs and best-fit response surface

  • residuals: The difference between the predicted and measured values for the given dose pairs, always equal to "measured minus predicted"

  • direction: The direction value passed to the function

  • pbounds': A 2-by-k array of bounds on the MuSyC parameters used in the parameter optimization

References

Wooten, David J, Christian T Meyer, Alexander LR Lubbock, Vito Quaranta, and Carlos F Lopez. 2021. “MuSyC Is a Consensus Framework That Unifies Multi-Drug Synergy Metrics for Combinatorial Drug Discovery.” Nature Communications 12 (1): 4607.

Examples

mfit1 <- fitMusycModel(measure ~ concA + concB, synergisticExample)
coef(mfit1)

mfit2 <- fitMusycModel(measure ~ concA + concB, oppositionalExample,
                       variant = "independent")
coef(mfit2)

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