Package 'OssaNMA'

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

Help Index


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

O’Connor, A. M., Yuan, C., Cullen, J. N., Coetzee, J. F., Da Silva, N., & Wang, C. (2016). A mixed treatment meta-analysis of antibiotic treatment options for bovine respiratory disease–an update. Preventive veterinary medicine, 132, 130-139..

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)