fitSurface {BIGL}  R Documentation 
This function computes predictions for offaxis dose combinations according
to the BIGL or HSA null model and, if required, computes appropriate meanR
and maxR statistics. Function requires as input doseresponse dataframe and
output of fitMarginals
containing estimates for the monotherapy
model. If transformation functions were used in monotherapy estimation, these
should also be provided.
fitSurface(
data,
fitResult,
transforms = fitResult$transforms,
null_model = c("loewe", "hsa", "bliss", "loewe2"),
effect = "effect",
d1 = "d1",
d2 = "d2",
statistic = c("none", "meanR", "maxR", "both"),
CP = NULL,
B.CP = 50,
B.B = NULL,
nested_bootstrap = FALSE,
error = 4,
sampling_errors = NULL,
wild_bootstrap = FALSE,
cutoff = 0.95,
parallel = FALSE,
progressBar = TRUE,
method = c("equal", "model", "unequal"),
confInt = TRUE,
bootRS = TRUE,
trans = "identity",
rescaleResids = FALSE,
invtrans = switch(trans, identity = "identity", log = "exp"),
newtonRaphson = FALSE,
asymptotes = 2,
bootmethod = method
)
data 
Doseresponse dataframe. 
fitResult 
Monotherapy (onaxis) model fit, e.g. produced by

transforms 
Transformation functions. If nonnull, 
null_model 
Specified null model for the expected response surface.
Currently, allowed options are 
effect 
Name of the response column in the data ("effect") 
d1 
Name of the column with doses of the first compound ("d1") 
d2 
Name of the column with doses of the second compound ("d2") 
statistic 
Which statistics should be computed. This argument can take
one of the values from 
CP 
Prediction covariance matrix. If not specified, it will be estimated
by bootstrap using 
B.CP 
Number of bootstrap iterations to use for CP matrix estimation 
B.B 
Number of iterations to use in bootstrapping null distribution for either meanR or maxR statistics. 
nested_bootstrap 
When statistics are calculated, if

error 
Type of error for resampling in the bootstrapping procedure.
This argument will be passed to 
sampling_errors 
Sampling vector to resample errors from. Used only if

wild_bootstrap 
Whether special bootstrap to correct for
heteroskedasticity should be used. If 
cutoff 
Cutoff to use in maxR procedure for declaring nonadditivity (default is 0.95). 
parallel 
Whether parallel computing should be used for bootstrap. This
parameter can take either integer value to specify the number of threads to
be used or logical 
progressBar 
A boolean, should progress of bootstraps be shown? 
method 
What assumption should be used for the variance of on and
offaxis points. This argument can take one of the values from

confInt 
a boolean, should confidence intervals be returned? 
bootRS 
a boolean, should bootstrapped response surfaces be used in the calculation of the confidence intervals? 
trans, invtrans 
the transformation function for the variance and its inverse, possibly as strings 
rescaleResids 
a boolean indicating whether to rescale residuals, or else normality of the residuals is assumed. 
newtonRaphson 
A boolean, should NewtonRaphson be used to find Loewe response surfaces? May be faster but also less stable to switch on 
asymptotes 
Number of asymptotes. It can be either 
bootmethod 
The resampling method to be used in the bootstraps. Defaults to the same as method 
Please see the example vignette vignette("analysis", package = "BIGL")
and the report "Lack of fit test for detecting synergy" included in the
papers
folder for further details on the test statistics used:
system.file("papers", "newStatistics.pdf", package = "BIGL")
This function returns a ResponseSurface
object with estimates
of the predicted surface. ResponseSurface
object is essentially a
list with appropriately named elements.
Elements of the list include input data, monotherapy model coefficients and
transformation functions, null model used to construct the surface as well
as estimated CP matrix, occupancy level at
each dose combination according to the generalized Loewe model and
"offAxisTable"
element which contains observed and predicted effects
as well as estimated zscores for each dose combination.
If statistical testing was done, returned object contains "meanR"
and "maxR"
elements with output from meanR
and
maxR
respectively.
## Not run:
data < subset(directAntivirals, experiment == 4)
## Data should contain d1, d2 and effect columns
transforms < list("PowerT" = function(x, args) with(args, log(x)),
"InvPowerT" = function(y, args) with(args, exp(y)),
"BiolT" = function(x, args) with(args, N0 * exp(x * time.hours)),
"InvBiolT" = function(y, args) with(args, 1/time.hours * log(y/N0)),
"compositeArgs" = list(N0 = 1, time.hours = 72))
fitResult < fitMarginals(data, transforms)
surf < fitSurface(data, fitResult, statistic = "meanR")
summary(surf)
## End(Not run)