View source: R/groupRAR_functions.R

CRDesign | R Documentation |

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

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

`k` |
a positive integer. The value specifies the number of treatment groups involved in a clinical trial. ( |

`p` |
a positive vector of length equals to |

`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. |

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.

`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. |

```
## 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
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.