powerly is an
R package for conducting sample size analysis that implements the method by Constantin et al. (2021). The implementation takes the form of a three-step recursive algorithm designed to find an optimal sample size given a model specification and an outcome measure of interest. It starts with a Monte Carlo simulation step for computing the outcome at various sample sizes. It continues with a monotone curve-fitting step for interpolating the outcome. The final step employs stratified bootstrapping to quantify the uncertainty around the fitted curve. For more details, consult the manuscript or check out the tutorial section.