Skip to main content

Sample size for external validation of a prediction model

Project description

pmvalsampsize

Sample size for external validation of a prediction model

Installation

$ pip install pmvalsampsize

Usage

pmvalsampsize computes the minimum sample size required for the external validation of an existing multivariable prediction model using the criteria proposed by Archer (2020) and Riley (2021) pmvalsampsize can currently be used to calculate the minimum sample size for the external validation of models with binary outcomes.

Continuous and survival (time-to-event) outcome model calculations are a work in progress.

from pmvalsampsize.pmvalsampsize import *

samplesize = pmvalsampsize(type="b", cstatistic=0.8, graph=True, lpbeta=(1.33, 1.75), prevalence=0.43, noprint=True) # change options to meet your requirements
plt.show()
summary(samplesize)

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

pmvalsampsize was created by Rebecca Whittle & Joie Ensor. It is licensed under the terms of the GNU General Public License v3.0 license.

Credits

pmvalsampsize is based on the original R package pmvalsampsize developed by Joie Ensor.

pmvalsampsize was created with cookiecutter and the py-pkgs-cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pmvalsampsize-0.2.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pmvalsampsize-0.2.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file pmvalsampsize-0.2.1.tar.gz.

File metadata

  • Download URL: pmvalsampsize-0.2.1.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Windows/10

File hashes

Hashes for pmvalsampsize-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c79e000cdec50f38e1cc6ade5b48ad820a36a92f7ed29e05f3be87c87e3be520
MD5 ee8dd174ee91492062409d2bbb489016
BLAKE2b-256 80a50de43beb1a742b41dca56d01ba290b42ef7891bcd579dad409100c89a0ea

See more details on using hashes here.

File details

Details for the file pmvalsampsize-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pmvalsampsize-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Windows/10

File hashes

Hashes for pmvalsampsize-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4cc1e78ff4edabae3ebc45cd936313a75f8e5d974bfca3fc96d21b868fa0b952
MD5 1348d69b37803792e140e094d89e722f
BLAKE2b-256 7ccceeec6c2394710feb5ad5a041b3615d2e446adec1b96b2aa3f1e8e2c01a70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page