Calculates and returns the analysis results for the specified design and data.
getAnalysisResults(
design,
dataInput,
...,
directionUpper = C_DIRECTION_UPPER_DEFAULT,
thetaH0 = NA_real_,
nPlanned = NA_real_
)
The trial design.
The summary data used for calculating the test results.
This is either an element of DatasetMeans
, of DatasetRates
, or of DatasetSurvival
.
For more information see details
below.
Further arguments to be passed to methods (cp. separate functions in See Also), e.g.,
The stage number (optional). Default: total number of existing stages in the data input.
The allocation ratio n1/n2 for two treatment groups planned for the subsequent stages, the default value is 1.
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
.
Iterations for simulating the power for Fisher's combination test.
If the power for more than one remaining stages is to be determined for
Fisher's combination test, it is estimated via simulation with specified
iterations
, the default value is 10000.
Seed for simulating the power for Fisher's combination test. See above, default is a random seed.
The direction of one-sided testing.
Default is directionUpper = TRUE
which means that larger values of the
test statistics yield smaller p-values.
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 sample size planned for the subsequent stages. It should be a vector with length equal to the remaining stages and is the overall sample size in the two treatment groups if two groups are considered.
Returns an AnalysisResults
object.
Given a design and a dataset, at given stage the function calculates the test results (effect sizes, stage-wise test statistics and p-values, overall p-values and test statistics, conditional rejection probability (CRP), conditional power, Repeated Confidence Intervals (RCIs), repeated overall p-values, and final stage p-values, median unbiased effect estimates, and final confidence intervals.
dataInput
is either an element of DatasetMeans
, of DatasetRates
, or of
DatasetSurvival
and should be created with the function getDataset
.
Alternatively the analysis results can be calculated separately using one of the following functions:
# NOT RUN {
# }
# NOT RUN {
design <- getDesignGroupSequential()
dataMeans <- getDataset(
n = c(10,10),
means = c(1.96,1.76),
stDevs = c(1.92,2.01))
getAnalysisResults(design, dataMeans)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab