This function calculates the sample size needed to obtain at least a defined false discovery rate given
a final outbreak size \(N\).
samplesize(eta, chi, N, R = NULL, phi, min_pairs = 1, assumption = "mtml")
scalar or vector giving the sensitivity of the linkage criteria
scalar or vector giving the specificity of the linkage criteria
scalar or vector giving the final outbreak size
scalar or vector giving the effective reproductive number of the pathogen
scalar or vector giving the desired true discovery rate (1-false discovery rate)
minimum number of linked pairs observed in the sample, defaults to 1 pair (2 samples); this is to ensure reasonable results are obtained
a character vector indicating which assumptions about transmission and linkage criteria. Default = 'mtml'
. Accepted arguments are:
'stsl'
for the single-transmission single-linkage assumption (prob_trans_stsl()
).
'mtsl'
for the multiple-transmission single-linkage assumption (prob_trans_mtsl()
).
'mtml'
for the multiple-transmission multiple-linkage assumption (prob_trans_mtml()
).
scalar or vector giving the sample size needed to meet the given conditions
samplesize(eta=0.99, chi=0.995, N=100, R=1, phi=0.75)
#> Warning: `samplesize()` was deprecated in phylosamp 1.0.0.
#> ℹ Please use `translink_samplesize()` instead.
#> Warning: The `eta` argument of `samplesize()` is deprecated as of phylosamp 1.0.0.
#> ℹ Please use the `sensitivity` argument of `translink_samplesize()` instead.
#> Warning: The `chi` argument of `samplesize()` is deprecated as of phylosamp 1.0.0.
#> ℹ Please use the `specificity` argument of `translink_samplesize()` instead.
#> Warning: The `phi` argument of `samplesize()` is deprecated as of phylosamp 1.0.0.
#> ℹ Please use the `tdr` argument of `translink_samplesize()` instead.
#> [1] 10