print.grouprar: Print and Summarize Simulation Results

View source: R/groupRAR_tools.R

print.grouprarR Documentation

Print and Summarize Simulation Results

Description

Methods for the objects of class "grouprar" returned by the simulation functions of the package, such as DBCD_Bin or WeiUrn.

Usage

## S3 method for class 'grouprar'
print(x, ...)

## S3 method for class 'grouprar'
summary(object, ...)

## S3 method for class 'summary.grouprar'
print(x, digits = 3, ...)

Arguments

x

An object of class "grouprar" (for print) or "summary.grouprar" (for print.summary.grouprar).

object

An object of class "grouprar".

digits

The number of decimal places to print. The default is 3.

...

Further arguments passed to or from other methods.

Details

print shows the summary of the object. The full simulation results, including the per-simulation data, remain available as list elements, for example x[["data: allocation"]].

Value

summary returns an object of class "summary.grouprar", a list with the elements

method

The name of the procedure.

sample size

The sample size.

nsim

The number of simulated trials.

arms

A data frame with one row per arm: the true parameters, the mean allocation proportion and its standard deviation over the simulations.

stats

A named vector with the failure rate (or mean response for continuous designs) and its standard deviation, the power, and, when available, the type I error, the trial and enrollment durations, and the expected sample size.

stopping probability

For monitored designs, the proportion of simulated trials that stop at each look.

The print methods return their argument invisibly.

See Also

DBCD_Bin, CRDesign.

Examples

res <- CRDesign(k = 3, p = c(0.6, 0.7, 0.8), ssn = 100, nsim = 50, seed = 1)
res
s <- summary(res)
s$arms
print(s, digits = 2)

grouprar documentation built on Oct. 9, 2026, 9:07 a.m.