Skip to main content

Statistical Group Comparison Tool

Project description

📊 Data Analysis Toolkit

Automated comparative analysis tool for group data, supporting intelligent statistical tests for two/multiple groups with standardized output tables.

⚙️ Installation

pip install CBCgrpspy 

📖 Parameter Specifications

Parameter Type Default Description
df_path str Required Data file path (.xlsx/.csv supported)
label_series str "label" Target label column name (must specify if no "label" column exists)
skewvaranalysis list None Manually specified categorical variables
norm_rd int 2 Decimal places for normal distributions (Mean ± SD format)
sk_rd int 2 Decimal places for non-normal distributions (Median (IQR) format)
cat_rd int 0 Decimal places for categorical variable percentages
pnormtest float 0.05 Significance threshold for normality tests
phomogeneity float 0.05 Significance threshold for homogeneity of variance tests
extractp float 0.05 Threshold for identifying significant variables
minfactorlevels int 10 Maximum categorical levels (variables exceeding this become continuous)
showstatistic bool True Whether to display statistical values in output

🚀 Core Features

1. Two-Group Comparison (Binary Groups)

  • Use Cases: Control vs Treatment, Male vs Female, etc.
  • Statistical Methods:
    • 📌 Continuous variables: Auto-select T-test / Mann-Whitney U test
    • 📌 Categorical variables: Auto-select Chi-square / Fisher's exact test
  • Output:
    • Standardized comparison table
    • Flagged significant variables (p < extractp)

2. Multi-Group Comparison (≥3 Groups)

  • Use Cases: Age stratification, multiple treatment protocols, etc.
  • Statistical Methods:
    • 📌 Continuous variables: ANOVA / Kruskal-Wallis test
    • 📌 Categorical variables: Chi-square / Monte Carlo Fisher simulation
  • Output:
    • Multi-dimensional group comparison summary
    • Subgroup difference indicators

🎯 Quick Start Example

from CBCgrpspy import dataAnalysis

dataAnalysis(
    df_path="analysis.xlsx",
    label_series="label",
    norm_rd=2,
    sk_rd=2,
    cat_rd=0,
    pnormtest=0.05,
    extractp=0.05,
    phomogeneity=0.05,
    maxfactorlevels=10,
    showstatistic=True
)

📌 Important Notes

  1. Ensure the first row contains column headers
  2. Convert categorical variables to string type beforehand
  3. Recommended for use with Jupyter Notebook for optimal table rendering
  4. This package has currently only been tested on Windows 10/11 systems. Compatibility with macOS and Linux systems has not been verified.

✉️ Contact

Package Maintainer:
Jarrily9527 (Jinhui Liu)
📧 Email: ljh18620847741@gmail.com


💡 Pro Tip: Adjust *_rd parameters to control decimal precision. Use showstatistic=False for simplified outputs.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

cbcgrpspy-0.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file cbcgrpspy-0.4-py3-none-any.whl.

File metadata

  • Download URL: cbcgrpspy-0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for cbcgrpspy-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9efc1b7b291f104295ab82ab28afc860580ea8d434c125002ae85bfd6d5d19f1
MD5 598918b7e2c3557723a6231a172f0d7b
BLAKE2b-256 1daee82e19a888496d1303f3410c104ed8d46ae243cb83696c07ccfeb8085a00

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