generateSensitivityCurveDatasets {robustlmm} | R Documentation |
Generate Datasets To Create Sensitivity Curves
Description
This method creates a list of datasets that can be used to create sensitivity curves. The response of the dataset is modified according to the supplied arguments.
Usage
generateSensitivityCurveDatasets(
data,
observationsToChange,
shifts,
scales,
center,
formula,
...
)
Arguments
data |
dataset to be modified. |
observationsToChange |
index or logical vector indicating which observations should be modified. |
shifts |
vector of shifts that should be applied one by one to each of the modified observations. |
scales |
vector scales that should be used to scale the observations around their original center. |
center |
optional scalar used to define the center from which the observations are scaled from. If missing, the mean of all the changed observations is used. |
formula |
formula to fit the model using |
... |
all additional arguments are added to the returned list. |
Details
Either shifts
or scales
need to be provided. Both are also
possible.
The argument shifts
contains all the values that shall be added to
each of the observations that should be changed. One value per generated
dataset.
The argument scales
contains all the values that shall be used to
move observations away from their center. If scales
is provided, then
observationsToChange
needs to select more than one observation.
The returned list can be passed to processFit
and to any of
the fitDatasets
functions. Splitting and binding of datasets
using splitDatasets
and bindDatasets
is not
supported.
Value
list that can be passed to processFit
and to any of
the fitDatasets
functions. Only generateData
is
implemented, all the other functions return an error if called.
See Also
Examples
oneWay <- generateAnovaDatasets(1, 1, 10, 5)
datasets <-
generateSensitivityCurveDatasets(oneWay$generateData(1),
observationsToChange = 1:5,
shifts = -10:10,
formula = oneWay$formula)
datasets$generateData(1)