Returns summary statistics and p-values for a given data set and a given design.
getStageResults(design, dataInput, ...)
The trial design.
The summary data used for calculating the test results.
This is either an element of DatasetMeans
, of DatasetRates
, or of DatasetSurvival
.
See getDataset
.
Further (optional) arguments to be passed:
The stage number (optional). Default: total number of existing stages in the data input.
The null hypothesis value, default is 0 for the normal and the binary case, it is 1 for the survival case. For testing a rate in one sample, a value thetaH0 in (0, 1) has to be specified for defining the null hypothesis H0: pi = thetaH0. For non-inferiority designs, this is the non-inferiority bound.
The assumed effect size or assumed rates to calculate the conditional power. Depending on the type of dataset, either thetaH1 (means and survival) or pi1, pi2 (rates) can be specified. Additionally, if testing means is specified, an assumed standard deviation can be specified, default is 1.
The type of computation of the p-values. Default is FALSE for
testing means (i.e., the t test is used) and TRUE for testing rates and the hazard ratio.
For testing rates, if
normalApproximation = FALSE
is specified, the binomial test
(one sample) or the test of Fisher (two samples) is used for calculating the p-values.
In the survival setting,
normalApproximation = FALSE
has no effect.
The type of t test. For testing means in two treatment groups, either
the t test assuming that the variances are equal or the t test without assuming this,
i.e., the test of Welch-Satterthwaite is calculated, default is equalVariances = TRUE
.
The direction of one-sided testing.
Default is directionUpper = TRUE
which means that larger values of the
test statistics yield smaller p-values.
Returns a StageResults
object.
Calculates and returns the stage results of the specified design and data input at the specified stage.
# NOT RUN {
design <- getDesignInverseNormal()
dataRates <- getDataset(
n1 = c(10,10),
n2 = c(20,20),
events1 = c(8,10),
events2 = c(10,16))
getStageResults(design, dataRates)
# }
Run the code above in your browser using DataLab