Learn R Programming

rpact (version 5.0.0)

compare: Start or Extend a Trial Comparison

Description

S3 generic for comparing existing trial planning objects. The ParameterSet method creates a comparison or appends to an existing TrialComparison.

The ParameterSet method starts or extends a trial comparison.

Usage

compare(x, y)

# S3 method for ParameterSet compare(x, y)

Value

A TrialComparison. When x is already a comparison, it is modified by reference if y is supplied. Without y, a new comparison is returned.

Arguments

x

A supported trial planning object or a TrialComparison.

y

A trial design, design characteristics, sample size or power plan, simulation result, list of supported objects, or TrialComparison to add. May be omitted to create a comparison containing only x.

Details

For supported ParameterSet objects, compare(x, y) calls getComparison() with x and y. Supported classes are TrialDesign, TrialDesignCharacteristics, TrialDesignPlan, SimulationResults, PowerAndAverageSampleNumberResult, EventProbabilities, NumberOfSubjects, ConditionalPowerResults (including subclasses), PerformanceScore, FisherInformation, and TrialDesignOptimalConditionalErrorCharacteristics. If x is a TrialComparison, it calls x$add(y) instead. The input validation and collection rules of getComparison() apply in both cases. Objects are retained by reference without recalculating them.

See Also

getComparison(), add(), delete(), fetch.TrialComparison(), getObjects()

Examples

Run this code
comp <- getDesignInverseNormal(kMax = 2) |>
    compare(getSampleSizeMeans(alternative = 0.2)) |>
    compare(getSampleSizeMeans(alternative = 0.59))
length(comp)

Run the code above in your browser using DataLab