CRDesign {grouprar}R Documentation

Complete Randomization

Description

Simulating complete randomization with two-sided hypothesis testing in a clinical trial context.

Usage

CRDesign(k, p, ssn, nsim = 2000, alpha = 0.05)

Arguments

k

a positive integer. The value specifies the number of treatment groups involved in a clinical trial. (k \ge 2)

p

a positive vector of length equals to k. The values specify the true success rates for the various treatments, and these rates are used to generate data for simulations.

ssn

a positive integer. The value specifies the total number of participants involved in each round of the simulation.

nsim

a positive integer. The value specifies the total number of simulations, with a default value of 2000.

alpha

An integer between 0 and 1. The value represents the predetermined level of significance that defines the probability threshold for rejecting the null hypothesis, with a default value of 0.05.

Details

Complete randomization: Allocating participants or subjects to different treatment groups in a clinical trial in such a way that each participant has an equal and independent chance of being assigned to any of the treatment groups.

Value

name

The name of procedure.

parameter

The true parameters used to do the simulations.

assignment

The randomization sequence.

propotion

Average allocation porpotion for each of treatment groups.

failRate

The proportion of individuals who do not achieve the expected outcome in each simulation, on average.

pwClac

The probability of the study to detect a significant difference or effect if it truly exists.

k

Number of arms involved in the trial.

Examples

## a simple use
CR.res = CRDesign(k=3, p = c(0.7, 0.8, 0.6), nsim = 500, ssn = 400)
## view the output
CR.res

  ## view all simulation settings
  CR.res$name
  CR.res$parameter
  CR.res$k
  ## View the simulations results
  CR.res$propotion
  CR.res$failRate
  CR.res$pwCalc
  CR.res$assignment
  

[Package grouprar version 0.1.0 Index]