Prevalence and Relative Standard Errors by Counts
prevcounts(N, N_H, N_testR, N_R, DE_H = 1, DE_R = 1)
N | Counts of total survey sample size(s) (vector/integer). |
---|---|
N_H | Number of HIV positive found in survey(s) (vector/integer). |
N_testR | Number tested for recency in survey(s) (vector/integer). |
N_R | Number of recent cases in survey(s) (vector/integer). |
DE_H | Design effect of HIV prevalence test (vector/numeric), greater than or equal to 1. If multiple surveys are entered but only one design effect is specified, function assumes entered design effect is identical for both surveys. |
DE_R | Design effect of recency test (vector/numeric), greater than or equal to 1. If multiple surveys are entered but only one design effect is specified, function assumes entered design effect is identical for both surveys. |
Prevalences and relative standard errors. Design effects are assumed negligible unless user specifies otherwise.
The package contains long form documentation in the form of vignettes that cover the use of the main fucntions. Use browseVignettes(package="inctools") to access them.
prevcounts(N = 5000, N_H = 1000, N_testR = 1000, N_R = 70, DE_R = 1.1)#> # A tibble: 1 x 4 #> PrevH PrevR RSE_PrevH RSE_PrevR #> <dbl> <dbl> <dbl> <dbl> #> 1 0.2 0.07 0.0282843 0.120890prevcounts (N = c(5000,5000), N_H = c(1000,1000), N_testR = c(1000,1000), N_R = c(100,70), DE_H = c(1,1.1), DE_R = c(1,1.1))#> # A tibble: 2 x 4 #> PrevH PrevR RSE_PrevH RSE_PrevR #> <dbl> <dbl> <dbl> <dbl> #> 1 0.2 0.1 0.0282843 0.0948683 #> 2 0.2 0.07 0.0296648 0.120890