Title: | Optimal Sample Size and Allocation with a Network Meta-Analysis |
---|---|
Description: | A system for calculating the minimum total sample size needed to achieve a prespecified power or the optimal allocation for each treatment group with a fixed total sample size to maximize the power. |
Authors: | Fangshu Ye [aut, cre] |
Maintainer: | Fangshu Ye <[email protected]> |
License: | GPL-3 |
Version: | 0.1.2 |
Built: | 2025-03-22 04:29:54 UTC |
Source: | https://github.com/fangshuye/ossanma |
This example dataset represents a previously published network of interventions for the treatment of Bovine Respiratory Disease (BRD) in feedlot cattle (O’Connor, Yuan, Cullen, Coetzee, Da Silva, and Wang, 2016). The dataset is comprised of 98 trials, 13 treatments and 204 arms. Each row represents the summary statistics for a pairwise comparison between two treatment in a trial.
data(BRDdat)
data(BRDdat)
An object of class "data.frame"
study id (integer)
name of treatment 1 (character)
name of treatment 2 (character)
estimated treatment effect size (log odds ratio) between treat1 and treat2
standard error of TE
data(BRDdat) head(BRDdat)
data(BRDdat) head(BRDdat)
This function calculates the optimal sample size allocation for each treatment group with a fixed total sample size when planning a new two-arm trial with binary outcome.
ssanma( p1, p2, enma_sigma, N, sig.level = 0.05, method = "with", allocation = "uneven" )
ssanma( p1, p2, enma_sigma, N, sig.level = 0.05, method = "with", allocation = "uneven" )
p1 |
Risk of treatment 1 |
p2 |
Risk of treatment 2 |
enma_sigma |
Standard error of the estimated effect size (log odds ratio) between treatment 1 and treatment 2 from the existing network |
N |
Number of total sample size |
sig.level |
Significance level, the default value is 0.05 |
method |
a character string specifying the method of analyzing the new trial, must be one of 'with' (default) or 'without' |
allocation |
a character string specifying the type of sample size allocation between two groups, must be one of 'uneven' (default) or 'even'. |
A list with the following components:
sample_alloc |
Sample size allocation to each treatment group. |
power |
Power of the test. |
ssanma(p1 = 0.2, p2 = 0.3, enma_sigma = 0.4, N = 200)
ssanma(p1 = 0.2, p2 = 0.3, enma_sigma = 0.4, N = 200)
This function calculates the optimal sample size for each treatment group to achieve a pre-specified power when planning a new two-arm trial with binary outcome.
ssnma( p1, p2, enma_sigma = NULL, power.level, sig.level = 0.05, method = "with", allocation = "uneven" )
ssnma( p1, p2, enma_sigma = NULL, power.level, sig.level = 0.05, method = "with", allocation = "uneven" )
p1 |
Risk of treatment 1 |
p2 |
Risk of treatment 2 |
enma_sigma |
Standard error of the estimated effect size (log odds ratio) between treatment 1 and treatment 2 from the existing network |
power.level |
Power of test we want to obtain |
sig.level |
Significance level, the default value is 0.05 |
method |
a character string specifying the method of analyzing the new trial, must be one of 'with' (default) or 'without' |
allocation |
a character string specifying the type of sample size allocation between two groups, must be one of 'uneven' (default) or 'even'. |
A list with the following components:
sample_size |
Sample size for each treatment group. |
power |
Power of the test. |
ssnma(p1 = 0.2, p2 = 0.3, enma_sigma = 0.4, power = 0.8)
ssnma(p1 = 0.2, p2 = 0.3, enma_sigma = 0.4, power = 0.8)