knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
Warning: R-package in development.
The goal of presize is to provide functions for precision based sample size calculation. For a given sample size, the functions will return the precision (half the width of the confidence interval), and vice versa.
You can install presize from github with:
# install.packages("devtools") devtools::install_github("CTU-Bern/presize")
presize will provide functions for
descriptive statistics
prec_mean
)prec_prop
)prec_rate
)absolute and relative differences
prec_meandiff
)prec_riskdiff
)prec_or
)prec_riskratio
)correlation measures
prec_cor
)prec_icc
)diagnostic measures
This is a basic example which shows you how to solve a common problem:
library(presize) # calculate sample size for a proportion of 0.2, or 0.4 with a precision of 0.2 prec_prop(p = c(.2, .4), n = 10, method = "wilson")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.