ssanma {OssaNMA}R Documentation

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)

[Package OssaNMA version 0.1.2 Index]