Type: | Package |
Title: | Optimal Sample Size and Allocation with a Network Meta-Analysis |
Version: | 0.1.2 |
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. |
License: | GPL-3 |
Imports: | NlcOptim (≥ 0.6), DEoptimR (≥ 1.0.11) |
Depends: | R(≥ 3.5.0) |
URL: | https://github.com/fangshuye/OssaNMA |
BugReports: | https://github.com/fangshuye/OssaNMA/issues |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.2.2 |
Suggests: | knitr, rmarkdown, netmeta |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2023-04-26 02:26:19 UTC; fangshu |
Author: | Fangshu Ye [aut, cre] |
Maintainer: | Fangshu Ye <fye@iastate.edu> |
Repository: | CRAN |
Date/Publication: | 2023-04-26 04:50:07 UTC |
Example dataset for network meta-analysis
Description
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.
Usage
data(BRDdat)
Format
An object of class "data.frame"
- studlab
study id (integer)
- treat1
name of treatment 1 (character)
- treat2
name of treatment 2 (character)
- TE
estimated treatment effect size (log odds ratio) between treat1 and treat2
- seTE
standard error of TE
References
Examples
data(BRDdat)
head(BRDdat)
Calculate the optimal sample size allocation for a new two-arm trial when analyze it with the existing network
Description
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.
Usage
ssanma(
p1,
p2,
enma_sigma,
N,
sig.level = 0.05,
method = "with",
allocation = "uneven"
)
Arguments
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'. |
Value
A list with the following components:
sample_alloc |
Sample size allocation to each treatment group. |
power |
Power of the test. |
Examples
ssanma(p1 = 0.2, p2 = 0.3, enma_sigma = 0.4, N = 200)
Calculate the optimal sample sizes for a new two-arm trial when analyze it with the existing network
Description
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.
Usage
ssnma(
p1,
p2,
enma_sigma = NULL,
power.level,
sig.level = 0.05,
method = "with",
allocation = "uneven"
)
Arguments
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'. |
Value
A list with the following components:
sample_size |
Sample size for each treatment group. |
power |
Power of the test. |
Examples
ssnma(p1 = 0.2, p2 = 0.3, enma_sigma = 0.4, power = 0.8)