Description Usage Arguments Value Examples
Calculates sample size required (clusters and units) for a 2-stage risk-based survey with risk factors at either cluster level or unit level, or both.
1 2 | n.rb.2stage.2(rr.c, ppr.c, spr.c, pstar.c, rr.u = 1, ppr.u = 1,
spr.u = 1, pstar.u, se = 1, sep.c = 0.95, sep.sys = 0.95)
|
rr.c |
relative risk values at the cluster level (vector of values, corresponding to the number of risk strata) |
ppr.c |
population proportions at the cluster level, corresponding to rr.c values (vector of equal length to rr.c) |
spr.c |
planned surveillance proportions at the cluster level, corresponding to rr.c values - the proportions of the total sample to be collected from each risk stratum (vector of equal length to rr.c). |
pstar.c |
cluster (herd) level design prevalence, scalar, either proportion or integer |
rr.u |
relative risk values at the unit level (vector of values, corresponding to the number of risk strata) |
ppr.u |
population proportions at the unit level, corresponding to rr.u values (vector of equal length to rr.u) |
spr.u |
planned surveillance proportions at the unit level, corresponding to rr.u values - the proportions of the total sample to be collected from each risk stratum (vector of equal length to rr.u). |
pstar.u |
unit (animal) level design prevalence, scalar, either proportion or integer |
se |
unit sensitivity of test (proportion), scalar, default = 1 |
sep.c |
desired cluster-level sensitivity (proportion), scalar, default = 0.95 |
sep.sys |
desired population-level sensitivity (proportion), scalar, default = 0.95 |
A list of cluster and unit level results number of clusters/units to sample per risk stratum, the total number of clusters or units per cluster to be sampled and vectors of EPI and adjusted risk values for each risk stratum.
1 2 3 4 5 6 7 8 9 10 | rr.c<- c(5,3,1)
ppr.c<- c(0.1, 0.2, 0.7)
spr.c<- c(0.4, 0.4, 0.2)
rr.u<- c(4,1)
ppr.u<- c(0.1, 0.9)
spr.u<- c(1, 0)
n.rb.2stage.2(rr.c, ppr.c, spr.c, pstar.c=0.02, rr.u, ppr.u,
spr.u, 0.1, se=0.9, sep.c=0.5, sep.sys=0.95)
n.rb.2stage.2(c(3,1), c(0.2,0.8), c(0.7,0.3), pstar.c=0.05,
pstar.u=0.1, se=0.9, sep.c=0.95, sep.sys=0.99)
|
$clusters
$clusters$n
[1] 64 64 30
$clusters$total
[1] 158
$clusters$epi
[1] 0.05555556 0.03333333 0.01111111
$clusters$adj.risk
[1] 2.7777778 1.6666667 0.5555556
$units
$units$n
[1] 3 0
$units$total
[1] 3
$units$epi
[1] 0.30769231 0.07692308
$units$adj.risk
[1] 3.0769231 0.7692308
$clusters
$clusters$n
[1] 39 16
$clusters$total
[1] 55
$clusters$epi
[1] 0.10714286 0.03571429
$clusters$adj.risk
[1] 2.1428571 0.7142857
$units
$units$n
[1] 32
$units$total
[1] 32
$units$epi
[1] 0.1
$units$adj.risk
[1] 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.