Open Power Samplesize is a free, open-source web application designed to help researchers and students perform power and sample size calculations for various statistical tests. Our goal is to provide an intuitive and accessible tool for study design.
This tool supports a wide range of scenarios, including tests for means, proportions, time-to-event data, and more. This project is built with Next.js.
Announcing the launch of Open Power Samplesize, a new tool designed to replace the now-discontinued powersandsamplesize.com
.
For the many researchers who relied on powersandsamplesize.com
, Open Power Samplesize
restores the essential power and sample size calculation features. A key enhancement is the newly added support for non-inferiority testing.
The source code is fully open-source and available on the Zarathu GitHub.
For R users, all functions of Open Power Samplesize
are available in the Rashnu package. The Rashnu
package also offers advanced features, including sample size calculation for survival analysis using the log-rank test (with support for non-inferiority designs).
To run the development server in your local environment, follow these steps:
- Clone the repository.
- Install the dependencies:
npm install
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser to see the result.
Alternatively, you can run the application using Docker:
- Build the Docker image:
docker build -t open-powersamplesize .
- Run the Docker container:
docker run -p 3000:3000 open-powersamplesize
- Open http://localhost:3000 in your browser to see the result.
This project is automatically deployed to GitHub Pages whenever a push is made to the main
branch. The deployment workflow is defined in .github/workflows/deploy.yml
.
The site is currently available at:
https://<your-github-username>.github.io/open-powersamplesize/
To use a custom domain for the deployed site, follow these steps:
-
Configure GitHub Repository Settings:
- Go to your repository's Settings > Pages.
- In the "Custom domain" section, enter your purchased domain name (e.g.,
www.your-domain.com
) and click Save.
-
Configure DNS:
- Go to your domain registrar's website (e.g., GoDaddy, Namecheap).
- Create a
CNAME
orA
record to point your domain to GitHub as instructed on the GitHub Pages settings page.
-
Modify Next.js Configuration:
- When using a custom domain, the
basePath
is no longer needed. Modify yournext.config.ts
file as follows:
import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "export", }; export default nextConfig;
- When using a custom domain, the
-
Deploy Changes:
- Commit and push the modified
next.config.ts
file to themain
branch. GitHub Actions will automatically rebuild and deploy the site with the new settings.
- Commit and push the modified