getTransformations {BIGL}R Documentation

Return a list with transformation functions

Description

This function takes in response data from a dose-response model and attempts to find an optimal Box-Cox power transform based on optim.boxcox function. It then returns a list of transformation functions which contains this power transform and its inverse which can be subsequently used in fitMarginals and fitSurface.

Usage

getTransformations(data, shift = FALSE, args = list(N0 = 1, time.hours = 1))

Arguments

data

Dose-response dataframe.

shift

If TRUE or is a numeric value, then a two-parameter Box-Cox transformation is assumed. This parameter will be passed on to optim.boxcox function.

args

List with elements that are added to the list of transformation function and which can be used by these functions. In particular, this list should be of type args = list("N0" = 1, "time.hours" = 1) where N0 and time.hours are arguments used for the biological transform.

Details

Additionally, returned list contains biological transform and its inverse based on a simple exponential growth model, especially useful when response data is provided in cell counts. User can additionally provide arguments for these biological transforms where N0 stands for initial cell count and time.hours indicates number in hours after which response data was measured.

getTransformations relies on optim.boxcox to obtain the optimal Box-Cox transformation parameters. However, optim.boxcox optimizes for the power parameter only within the interval (0.1, 0.9). Hence, if obtained power parameter is close to 0.1, then a logarithmic transformation is applied instead.

Value

This function returns a list with transformation functions. These include power transformation ("PowerT") and its inverse ("InvPowerT") as well as biological transformation ("BiolT") and its inverse ("InvBiolT").

Power transformation is a 1-parameter Box-Cox transformation. If shift = TRUE, then power transformation is a 2-parameter Box-Cox transformation. Optimal values for power and shift operators are selected by means of optim.boxcox function.

Biological transformation y = N0 * exp(x * t) where N0 is the initial cell count and t is the incubation time. If response/effect variable (y) is given in terms of cell counts, biological transformation ensures that modelisation is done for the growth rate instead (x).

Returned list also contains "compositeArgs" elements shared by all the transformation functions. These arguments include initial cell count ("N0") and incubation time ("time.hours").

Examples

  data <- subset(directAntivirals, experiment == 1)
  ## Data must contain d1, d2 and effect columns
  getTransformations(data)

[Package BIGL version 1.9.0 Index]