Skip to main content

A Power Analysis Toolkit for Python

Project description

PyStatPower

PyPI - Version PyPI - Python Version GitHub License PyPI - Status PyPI - Downloads

Build Status Test Status Documentation Status codecov pre-commit.ci status

Ruff pytest sphinx

简体中文 | English

PyStatPower 是一个专注于统计领域功效分析的开源的 Python 库。

主要功能:样本量和检验效能的计算,以及给定参数下估算所需效应量大小。

安装

pip install pystatpower

示例

from pystatpower.models import one_proportion

result = one_proportion.solve_for_sample_size(
    alpha=0.05, power=0.80, nullproportion=0.80, proportion=0.95, alternative="two_sided", test_type="exact_test"
)
print(result)

输出:

Size(41.59499160228066)

构建

  1. 克隆本仓库

    git clone https://github.com/Snoopy1866/pystatpower.git
    
  2. 安装依赖

    pip install .[docs]
    
  3. 安装 pre-commit

    pre-commit install
    pre-commit install --hook-type commit-msg
    
  4. 切换到文档目录

    cd docs
    
  5. 构建文档

    make clean
    make html
    

你可以在 docs/build/html 目录下看到生成的文档,双击 index.html 即可在浏览器中查看。

鸣谢

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

pystatpower-0.0.3.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

pystatpower-0.0.3-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file pystatpower-0.0.3.tar.gz.

File metadata

  • Download URL: pystatpower-0.0.3.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pystatpower-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a9258d8e03a6fd6853d0d5354e20daf75e09e10f7f08a307a40f79cb7b4e0684
MD5 4ee8629f28e97ffdf552b7e3617572df
BLAKE2b-256 29c0f3d8ab6462d3b21562aa45e4d7b39715dda9a29459c180f37f83b4fb867b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pystatpower-0.0.3.tar.gz:

Publisher: release.yml on Snoopy1866/pystatpower

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pystatpower-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pystatpower-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pystatpower-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 20675fec653f73c801fea57d4eaf5a573ef02ba03a8b4a74591635467f568e15
MD5 9194b7c584a8d65297ba8aedd760f9d7
BLAKE2b-256 1294cd5d8b3c2ed282d4282673e508266fdc33bfdd3cd8ca9e710c0395d07bf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pystatpower-0.0.3-py3-none-any.whl:

Publisher: release.yml on Snoopy1866/pystatpower

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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