# NOT RUN {
# Determine optimal pool size and number of assays to detect a difference in
# group means of 0.5, with a common variance of 1, processing errors with
# variance of 0.1, and measurement errors with variance of 0.2. Assume costs
# of $100 per assay and $10 per subject.
poolcost_t(
g = 1: 10,
d = 0.5,
sigsq = 1,
sigsq_p = 0.1,
sigsq_m = 0.2,
assay_cost = 100,
other_costs = 10
)
# Visualize how power of the study will be affected if the true processing
# error variance is not exactly 0.1.
poolcushion_t(
g = 7,
n = 29,
d = 0.5,
sigsq = 1,
sigsq_p_predicted = 0.1,
sigsq_m = 0.2
)
# }
Run the code above in your browser using DataLab