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. It is licensed under the terms of the GNU General Public License v3.0 license.

Credits

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.0.tar.gz (22.9 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.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pmvalsampsize-0.2.0.tar.gz
  • Upload date:
  • Size: 22.9 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.0.tar.gz
Algorithm Hash digest
SHA256 705d7bd14c66155d5cd9ad1bbf64b9b01e905944fafe78ee9af87edb0ce7fb20
MD5 1de1e443bf11344faf7f044ddb143aa5
BLAKE2b-256 1a06a0829793824156f5b09caa044e4c27669771e2bebe17996d76f32d3ecded

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pmvalsampsize-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c025da414229360b8c8a9e5ea422e9601440c0cfe83a678a3f3e5cbc4a7303d
MD5 8bbbefee2c720b5d3ac0af3b39039dd7
BLAKE2b-256 a5bb2ef597a11a71e3365f334890ca727083625b4076d3fe141b62e6c98ad8b1

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