The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Sample size calculations for the study designs most used in health and social research, each with a ready-to-use methods paragraph: every assumption, the target before and after nonresponse, the adjustments made, the formula and the references.
The same calculations power the free sample size calculator at researchite.com/sample-size, so a student gets the same number in R and in the browser.
install.packages("researchite")library(researchite)
# A cross-sectional survey: prevalence about 50%, +/- 5 percentage points,
# multistage sampling (design effect 1.5) and 10% nonresponse
x <- ss_proportion(p = 0.5, precision = 0.05, deff = 1.5, nonresponse = 0.1)
x
#> Sample size: Estimating a single population proportion
#>
#> 642 participants
#> (577 completed observations, before 10% nonresponse)
cat(methods_text(x))
#> The sample size was calculated for estimating a single population
#> proportion. Assuming an expected proportion of 50%, 95% confidence and an
#> absolute precision of 5 percentage points, 577 completed observations are
#> required. After allowing for 10% nonresponse, the recruitment target is 642
#> participants. No finite-population correction was applied, and a design
#> effect of 1.5 was applied for the sampling design. ...
#>
#> References:
#> Cochran WG (1977). Sampling Techniques, 3rd ed. New York: Wiley.
#> ...| Purpose | Functions |
|---|---|
| Estimating a quantity | ss_proportion(), ss_mean(),
ss_sensitivity(), ss_specificity() |
| Comparing groups | ss_two_proportions(), ss_two_means(),
ss_paired(), ss_one_proportion(),
ss_one_mean(), ss_mcnemar(),
ss_anova() |
| Epidemiological studies | ss_case_control(), ss_cohort(),
ss_incidence_rates(), ss_logistic(),
ss_logrank(), ss_correlation() |
| Trials | ss_noninferiority_means(),
ss_noninferiority_proportions() |
| Measured over time | ss_repeated_within(),
ss_repeated_groups(), ss_ancova() |
| Clusters | design_effect(), ss_cluster_means(),
ss_cluster_proportions() |
| Writing it up | methods_text(), formula_text(),
references() |
Test-based calculations can allow for several primary outcomes (Bonferroni, or co-primary outcomes that must all succeed), and the t-test options use the exact noncentral t-distribution.
The tests compare the results with base R
(power.t.test(), power.prop.test(), the
noncentral F distribution), with textbook values, and with the
researchite.com calculator. During development the package was also
compared with the pwr, longpower and
presize packages.
citation("researchite")These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.