getTransformations {BIGL} | R Documentation |
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
.
getTransformations(data, shift = FALSE, args = list(N0 = 1, time.hours = 1))
data |
Dose-response dataframe. |
shift |
If |
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 |
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.
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"
).
data <- subset(directAntivirals, experiment == 1)
## Data must contain d1, d2 and effect columns
getTransformations(data)