design_means | R Documentation |
Calculate the mean egg counts/rates according to various design types
design_means(
simdata,
design = c("NS1", "NS2", "NS3", "SS", "SSR1", "SSR2", "SSR3"),
budget = 600,
second_slide_cost = 0.621,
max_screen = 0.9,
count = TRUE,
log_constant = if (count) 1 else 0,
screen_threshold = 0
)
simdata |
The data as simulated by cgpDataSim or clpDataSim |
design |
The survey design(s) to be examined |
budget |
The total budget to use for each design |
second_slide_cost |
The cost of a second examination (e.g. Kato-Katz slide) from the same faecal sample, relative to the cost of an entirely independent sample |
max_screen |
The maximum proportion of the budget to use on screening |
count |
Logical flag to base means on count data or the underlying rates |
log_constant |
A constant to add to the count data before calculating geometric means (ignored if count==FALSE) |
screen_threshold |
The threshold count on which to screen individuals |
A data frame of summary statistics
data <- cgpDataSim(10^2, 600, 0.1, 100, 1, 1, 1, 0, true_prevalence=0.8)
means <- design_means(data, second_slide_cost = c(0.1, 0.621, 1))
library("dplyr")
means %>%
group_by(Design, SecondSlideCost) %>%
summarise(N = mean(N), Budget = mean(ScreenBudget + SampleBudget),
Bias = median(ArithmeticEfficacy - TrueArithmetic),
SD = sd(ArithmeticEfficacy - TrueArithmetic))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.