relR_power {phylosamp}R Documentation

Calculate power for detecting differential transmission given a sample size

Description

Function to calculate the power given a sample size. This is the top level function to be called to calculate power given a sample size m and a proportion sampled.

Usage

relR_power(
  m,
  R_a,
  R_b,
  p_a,
  N = NULL,
  rho = NULL,
  alpha = 0.05,
  alternative = c("two_sided", "less", "greater"),
  sensitivity = 1,
  specificity = 1,
  overdispersion = NULL
)

Arguments

m

the sample size.

R_a

Numeric (Positive). The assumed R among the group in the denominator of the ratio. Input value must be greater than 0.

R_b

Numeric (Positive). The assumed R among the group in the numerator of the ratio. Input value must be greater than 0.

p_a

Numeric. The proportion of the population in group a. Must be between 0 and 1.

N

Numeric (Positive). The size of the infected pool. Only one of rho or N should be specified.

rho

Numeric. The proportion of the infected pool sampled. Only one of rho or N should be specified. Values should be between 0 and 1.

alpha

Numeric. The desired alpha level. Default: 0.05

alternative

Character. Specifies the alternative hypothesis. Must be: two_sided (Default), less, or greater

sensitivity

Numeric. The sensitivity of the linkage criteria. Must be between 0 and 1. Default: 1.

specificity

Numeric. The specificity of the linkage criteria. Must be between 0 and 1. Default: 1.

overdispersion

Numeric (Positive). An overdispersion parameter, set if the assumed distribution of the number of edges is negative binomial. If NULL the assumed distribution is Poisson (equivalent to an overdispersion parameter of infinity) Default: NULL Note that this is equivalent to setting the overdispersion parameter to Inf.

Value

The power given m


[Package phylosamp version 1.0.1 Index]