View source: R/groupRAR_tools.R
| print.grouprar | R Documentation |
Methods for the objects of class "grouprar" returned by the simulation functions of the package, such as DBCD_Bin or WeiUrn.
## S3 method for class 'grouprar'
print(x, ...)
## S3 method for class 'grouprar'
summary(object, ...)
## S3 method for class 'summary.grouprar'
print(x, digits = 3, ...)
x |
An object of class |
object |
An object of class |
digits |
The number of decimal places to print. The default is 3. |
... |
Further arguments passed to or from other methods. |
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"]].
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.
DBCD_Bin, CRDesign.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.