generateData | R Documentation |
This function is used to generate data for bootstrapping of the null distribution for various estimates. Optional arguments such as specific choice of sampling vector or corrections for heteroskedasticity can be specified in the function arguments.
generateData(
pars,
sigma,
data = NULL,
transforms = NULL,
null_model = c("loewe", "hsa", "bliss", "loewe2"),
error = 1,
sampling_errors = NULL,
means = NULL,
model = NULL,
method = "equal",
wild_bootstrap = FALSE,
rescaleResids,
invTransFun,
newtonRaphson = FALSE,
bootmethod = method,
...
)
pars |
Coefficients of the marginal model along with their appropriate
naming scheme. These will typically be estimated using
|
sigma |
Standard deviation to use for randomly generated error terms. This
argument is unused if |
data |
Data frame with dose columns |
transforms |
Transformation functions. If non-null, |
null_model |
Specified null model for the expected response surface.
Currently, allowed options are |
error |
Type of error for resampling. |
sampling_errors |
Sampling vector to resample errors from. Used only if
|
means |
The vector of mean values of the response surface, for variance modelling |
model |
The mean-variance model |
method |
What assumption should be used for the variance of on- and
off-axis points. This argument can take one of the values from
|
wild_bootstrap |
Whether special bootstrap to correct for
heteroskedasticity should be used. If |
rescaleResids |
a boolean indicating whether to rescale residuals, or else normality of the residuals is assumed. |
invTransFun |
the inverse transformation function, back to the variance domain |
newtonRaphson |
A boolean, should Newton-Raphson be used to find Loewe response surfaces? May be faster but also less stable to switch on |
bootmethod |
The resampling method to be used in the bootstraps. Defaults to the same as method |
... |
Further arguments |
Dose-response dataframe with generated data including "effect"
as well as "d1"
and "d2"
columns.
coefs <- c("h1" = 1, "h2" = 1.5, "b" = 0,
"m1" = 1, "m2" = 2, "e1" = 0.5, "e2" = 0.1)
## Dose levels are set to be integers from 0 to 10
generateData(coefs, sigma = 1)
## Dose levels are taken from existing dataset with d1 and d2 columns
data <- subset(directAntivirals, experiment == 1)
generateData(data = data[, c("d1", "d2")], pars = coefs, sigma = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.