MCPower


NameMCPower JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/pawlenartowicz/MCPower
SummaryMonte Carlo Power Analysis for Statistical Models
upload_time2025-07-17 20:22:14
maintainerNone
docs_urlNone
authorPaweł Lenartowicz
requires_python>=3.10
licenseNone
keywords power analysis statistics monte carlo linear regression
VCS
bugtrack_url
requirements numpy pandas matplotlib scipy numba joblib
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MCPower

**Simple Monte Carlo power analysis for complex models.** Find the sample size you need or check if your study has enough power - even with complex models that traditional power analysis can't handle.

## Why MCPower?

**Traditional power analysis breaks down** with interactions, correlated predictors, or non-normal data. MCPower uses simulation instead of formulas - it generates thousands of datasets exactly like yours, then sees how often your analysis finds real effects.

✅ **Works with complexity**: Interactions, correlations, any distribution  
✅ **R-style formulas**: `outcome = treatment + covariate + treatment*covariate`  
✅ **Two simple commands**: Find sample size or check power  
✅ **Scenario analysis**: Test robustness under realistic conditions  
✅ **Minimal math required**: Just specify your model and effects

## Get Started in 2 Minutes

### Install
```bash
pip install mcpower
```

### Update to the latest version (every few days).
```bash
pip install --upgrade mcpower
```

### Your First Power Analysis
```python

# 0. First initialization could take a few seconds, due to compilation (package is not distributed yet with compiled files)
import mcpower

# 1. Define your model (just like R)
model = mcpower.LinearRegression("satisfaction = treatment + motivation")

# 2. Set effect sizes (how big you expect effects to be)
model.set_effects("treatment=0.5, motivation=0.3")

# 3. Change the treatment to "binary" (people receive treatment or not).
model.set_variable_type("treatment=binary")

# 4. Find the sample size you need
model.find_sample_size(target_test="treatment", from_size=50, to_size=200)
```
**Output**: "You need N=75 for 80% power to detect the treatment effect"

That's it! 🎉

## 🎯 Scenario Analysis: Test Your Assumptions

**Real studies rarely match perfect assumptions.** MCPower's scenario analysis tests how robust your power calculations are under realistic conditions.

```python
# Test robustness with scenario analysis
model.find_sample_size(
    target_test="treatment", 
    from_size=50, to_size=300,
    scenarios=True  # 🔥 The magic happens here
)
```

**Output:**
```
SCENARIO SUMMARY
================================================================================

Uncorrected Sample Sizes:
Test                                     Optimistic   Realistic    Doomer      
-------------------------------------------------------------------------------
treatment                                75           85           100         
================================================================================
```

**What each scenario means:**
- **Optimistic**: Your ideal conditions (original settings)
- **Realistic**: Moderate real-world complications (small effect variations, mild assumption violations)
- **Doomer**: Conservative estimate (larger effect variations, stronger assumption violations)

**💡 Pro tip**: Use the **Realistic** scenario for planning. If **Doomer** is acceptable, you're really safe!

## Understanding Effect Sizes

**Effect sizes tell you how much the outcome changes when predictors change.**

- **Effect size = 0.5** means the outcome increases by **0.5 standard deviations** when:
  - **Continuous variables**: Predictor increases by 1 standard deviation  
  - **Binary variables**: Predictor changes from 0 to 1 (e.g., control → treatment)

**Practical examples:**
```python
model.set_effects("treatment=0.5, age=0.3, income=0.2")
```

- **`treatment=0.5`**: Treatment increases outcome by 0.5 SD (medium-large effect)
- **`age=0.3`**: Each 1 SD increase in age → 0.3 SD increase in outcome  
- **`income=0.2`**: Each 1 SD increase in income → 0.2 SD increase in outcome

**Effect size guidelines:**
- **0.1** = Small effect (detectable but modest)
- **0.25** = Medium effect (clearly noticeable) 
- **0.4** = Large effect (substantial impact)

**Effect size guidelines (binary variables):**
- **0.2** = Small effect (detectable but modest)
- **0.5** = Medium effect (clearly noticeable) 
- **0.8** = Large effect (substantial impact)

**Your uploaded data is automatically standardized** (mean=0, SD=1) so effect sizes work the same way whether you use synthetic or real data.

## Copy-Paste Examples for Common Studies

### Randomized Controlled Trial
```python
import mcpower

# RCT with treatment + control variables
model = mcpower.LinearRegression("outcome = treatment + age + baseline_score")
model.set_effects("treatment=0.6, age=0.2, baseline_score=0.8")
model.set_variable_type("treatment=binary")  # 0/1 treatment

# Find sample size for treatment effect with scenario analysis
model.find_sample_size(target_test="treatment", from_size=100, to_size=500, 
                      by=50, scenarios=True)
```

### A/B Test with Interaction
```python
import mcpower

# Test if treatment effect depends on user type
model = mcpower.LinearRegression("conversion = treatment + user_type + treatment*user_type")
model.set_effects("treatment=0.4, user_type=0.3, treatment:user_type=0.5")
model.set_variable_type("treatment=binary, user_type=binary")

# Check power robustness for the interaction
model.find_power(sample_size=400, target_test="treatment:user_type", scenarios=True)
```

### Survey with Correlated Predictors
```python
import mcpower

# Predictors are often correlated in real data
model = mcpower.LinearRegression("wellbeing = income + education + social_support")
model.set_effects("income=0.4, education=0.3, social_support=0.6")
model.set_correlations("corr(income, education)=0.5, corr(income, social_support)=0.3")

# Find sample size for any effect
model.find_sample_size(target_test="all", from_size=200, to_size=800, 
                      by=100, scenarios=True)
```

## Customize for Your Study

### Different Variable Types
```python
# Binary (0/1), skewed, or other distributions
model.set_variable_type("treatment=binary, income=right_skewed, age=normal")

# Binary with custom proportions (30% get treatment)
model.set_variable_type("treatment=(binary,0.3)")
```

### Your Own Data (be careful, not yet well tested)
```python
import pandas as pd

# Use your pilot data for realistic simulations
df = pd.read_csv('examples/cars.csv')
model.upload_own_data(df)  # Automatically preserves correlations
```

### Multiple Testing
```python
# Testing multiple effects? Control false positives
model.find_power(
    sample_size=200, 
    target_test="treatment,covariate,treatment:covariate",
    correction="Benjamini-Hochberg",
    scenarios=True  # Test robustness too!
)
```

### Test the single violation of assumptions.
```python
# Customize how much "messiness" to add in scenarios
model.set_heterogeneity(0.2)        # Effect sizes vary between people
model.set_heteroskedasticity(0.15)  # Violation of equal variance assumption

# Then run scenario analysis
model.find_sample_size(target_test="treatment", scenarios=False)
```

### More precision
```python
# To make a more precise estimation, consider increasing the number of simulations.
model.set_simulations(10000)

# MCPower is already heavily optimized, but there is old code that allows for parallelization. Use it to speed up your largest simulations.
model.set_parallel(True)

```

## Quick Reference

| **Want to...** | **Use this** |
|-----------------|--------------|
| Find required sample size | `model.find_sample_size(target_test="effect_name")` |
| Check power for specific N | `model.find_power(sample_size=150, target_test="effect_name")` |
| **Test robustness** | **Add `scenarios=True` to either method** |
| Test overall model | `target_test="overall"` |
| Test multiple effects | `target_test="effect1, effect2"` or `"all"` |
| Binary variables | `model.set_variable_type("var=binary")` |
| Correlated predictors | `model.set_correlations("corr(var1, var2)=0.4")` |
| Multiple testing correction | Add `correction="FDR", or "Holm" pr "Bonferroni"`|

## When to Use MCPower

**✅ Use MCPower when you have:**
- Interaction terms (`treatment*covariate`)
- Binary or non-normal variables
- Correlated predictors
- Multiple effects to test
- **Need to test assumption robustness**
- Complex models where traditional power analysis fails

**✅ Use Scenario Analysis when:**
- Planning important studies (grants, dissertations)
- Working with messy real-world data
- Effect sizes are uncertain
- Want conservative sample size estimates
- Stakeholders need confidence in your numbers

**❌ Use traditional power analysis for:**
- For models that are not yet implemented
- When all assumptions are clearly met

## What Makes Scenarios Different? (Be careful, unvalidated, preliminary scenarios)

**Traditional power analysis assumes perfect conditions.** MCPower's scenarios add realistic "messiness":

| **Scenario** | **What's Different** | **When to Use** |
|-------------|---------------------|------------------|
| **Optimistic** | Your exact settings | Best-case planning |
| **Realistic** | Mild effect variations, small assumption violations | **Recommended for most studies** |
| **Doomer** | Larger effect variations, stronger assumption violations | Conservative/worst-case planning |

**Behind the scenes**, scenarios randomly vary:
- Effect sizes between participants
- Correlation strengths  
- Variable distributions
- Assumption violations

This gives you a **range of realistic outcomes** instead of a single optimistic estimate.
⚠️ **Important**: Scenario analysis and uploaded data features are experimental. 
Use with caution for critical decisions.

<details>
<summary><strong>📚 Advanced Features (Click to expand)</strong></summary>

## Advanced Options

### All Variable Types
```python
model.set_variable_type("""
    treatment=binary,           # 0/1 with 50% split
    ses=(binary,0.3),          # 0/1 with 30% split  
    age=normal,                # Standard normal (default)
    income=right_skewed,       # Positively skewed
    depression=left_skewed,    # Negatively skewed
    response_time=high_kurtosis, # Heavy-tailed
    rating=uniform             # Uniform distribution
""")
```

### Complex Correlation Structures
```python
import numpy as np

# Full correlation matrix for 3 variables
corr_matrix = np.array([
    [1.0, 0.4, 0.6],    # Variable 1 with others
    [0.4, 1.0, 0.2],    # Variable 2 with others
    [0.6, 0.2, 1.0]     # Variable 3 with others
])
model.set_correlations(corr_matrix)
```

### Performance Tuning
```python
# Adjust for your needs
model.set_power(90)           # Target 90% power instead of 80%
model.set_alpha(0.01)         # Stricter significance (p < 0.01)
model.set_simulations(10000)  # High precision (slower)
```

### Formula Syntax
```python
# These are equivalent:
"y = x1 + x2 + x1*x2"        # Assignment style
"y ~ x1 + x2 + x1*x2"        # R-style formula  
"x1 + x2 + x1*x2"            # Predictors only

# Interactions:
"x1*x2"         # Main effects + interaction (x1 + x2 + x1:x2)
"x1:x2"         # Interaction only
"x1*x2*x3"      # All main effects + all interactions
```

### Correlation Syntax
```python
# String format (recommended)
model.set_correlations("corr(x1, x2)=0.3, corr(x1, x3)=-0.2")

# Shorthand format  
model.set_correlations("(x1, x2)=0.3, (x1, x3)=-0.2")
```

</details>

## Requirements

- Python ≥ 3.7
- NumPy, SciPy, scikit-learn, matplotlib
- joblib (optional, for parallel processing)

## Need Help?

- **Issues**: [GitHub Issues](https://github.com/pawlenartowicz/MCPower/issues)
- **Questions**: pawellenartowicz@europe.com

## Aim for future (waiting for suggestions)
- ✅ Linear Regression
- ✅ Scenarios, robustness analysis
- 🚧 Logistic Regression (coming soon)
- 🚧 ANOVA (and factor as variables) (coming soon)
- 🚧 Guide about methods, corrections (coming soon)
- 📋 Rewriting to Cython (backend change)
- 📋 Mixed Effects Models
- 📋 2 groups comparision with alternative tests
- 📋 Robust regression methods


## License & Citation

GPL v3. If you use MCPower in research, please cite:

```bibtex
@software{mcpower2025,
  author = {Pawel Lenartowicz},
  title = {MCPower: Monte Carlo Power Analysis for Statistical Models},
  year = {2025},
  url = {https://github.com/pawlenartowicz/MCPower}
}
```

---

**🚀 Ready to start?** Copy one of the examples above and adapt it to your study!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pawlenartowicz/MCPower",
    "name": "MCPower",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "power analysis, statistics, monte carlo, linear regression",
    "author": "Pawe\u0142 Lenartowicz",
    "author_email": "pawellenartowicz@europe.com",
    "download_url": "https://files.pythonhosted.org/packages/c7/20/4a697220535a28397a2bffedcfd893c0c3497dcbd9cffe00b0909bc0b0b2/mcpower-0.3.1.tar.gz",
    "platform": null,
    "description": "# MCPower\n\n**Simple Monte Carlo power analysis for complex models.** Find the sample size you need or check if your study has enough power - even with complex models that traditional power analysis can't handle.\n\n## Why MCPower?\n\n**Traditional power analysis breaks down** with interactions, correlated predictors, or non-normal data. MCPower uses simulation instead of formulas - it generates thousands of datasets exactly like yours, then sees how often your analysis finds real effects.\n\n\u2705 **Works with complexity**: Interactions, correlations, any distribution  \n\u2705 **R-style formulas**: `outcome = treatment + covariate + treatment*covariate`  \n\u2705 **Two simple commands**: Find sample size or check power  \n\u2705 **Scenario analysis**: Test robustness under realistic conditions  \n\u2705 **Minimal math required**: Just specify your model and effects\n\n## Get Started in 2 Minutes\n\n### Install\n```bash\npip install mcpower\n```\n\n### Update to the latest version (every few days).\n```bash\npip install --upgrade mcpower\n```\n\n### Your First Power Analysis\n```python\n\n# 0. First initialization could take a few seconds, due to compilation (package is not distributed yet with compiled files)\nimport mcpower\n\n# 1. Define your model (just like R)\nmodel = mcpower.LinearRegression(\"satisfaction = treatment + motivation\")\n\n# 2. Set effect sizes (how big you expect effects to be)\nmodel.set_effects(\"treatment=0.5, motivation=0.3\")\n\n# 3. Change the treatment to \"binary\" (people receive treatment or not).\nmodel.set_variable_type(\"treatment=binary\")\n\n# 4. Find the sample size you need\nmodel.find_sample_size(target_test=\"treatment\", from_size=50, to_size=200)\n```\n**Output**: \"You need N=75 for 80% power to detect the treatment effect\"\n\nThat's it! \ud83c\udf89\n\n## \ud83c\udfaf Scenario Analysis: Test Your Assumptions\n\n**Real studies rarely match perfect assumptions.** MCPower's scenario analysis tests how robust your power calculations are under realistic conditions.\n\n```python\n# Test robustness with scenario analysis\nmodel.find_sample_size(\n    target_test=\"treatment\", \n    from_size=50, to_size=300,\n    scenarios=True  # \ud83d\udd25 The magic happens here\n)\n```\n\n**Output:**\n```\nSCENARIO SUMMARY\n================================================================================\n\nUncorrected Sample Sizes:\nTest                                     Optimistic   Realistic    Doomer      \n-------------------------------------------------------------------------------\ntreatment                                75           85           100         \n================================================================================\n```\n\n**What each scenario means:**\n- **Optimistic**: Your ideal conditions (original settings)\n- **Realistic**: Moderate real-world complications (small effect variations, mild assumption violations)\n- **Doomer**: Conservative estimate (larger effect variations, stronger assumption violations)\n\n**\ud83d\udca1 Pro tip**: Use the **Realistic** scenario for planning. If **Doomer** is acceptable, you're really safe!\n\n## Understanding Effect Sizes\n\n**Effect sizes tell you how much the outcome changes when predictors change.**\n\n- **Effect size = 0.5** means the outcome increases by **0.5 standard deviations** when:\n  - **Continuous variables**: Predictor increases by 1 standard deviation  \n  - **Binary variables**: Predictor changes from 0 to 1 (e.g., control \u2192 treatment)\n\n**Practical examples:**\n```python\nmodel.set_effects(\"treatment=0.5, age=0.3, income=0.2\")\n```\n\n- **`treatment=0.5`**: Treatment increases outcome by 0.5 SD (medium-large effect)\n- **`age=0.3`**: Each 1 SD increase in age \u2192 0.3 SD increase in outcome  \n- **`income=0.2`**: Each 1 SD increase in income \u2192 0.2 SD increase in outcome\n\n**Effect size guidelines:**\n- **0.1** = Small effect (detectable but modest)\n- **0.25** = Medium effect (clearly noticeable) \n- **0.4** = Large effect (substantial impact)\n\n**Effect size guidelines (binary variables):**\n- **0.2** = Small effect (detectable but modest)\n- **0.5** = Medium effect (clearly noticeable) \n- **0.8** = Large effect (substantial impact)\n\n**Your uploaded data is automatically standardized** (mean=0, SD=1) so effect sizes work the same way whether you use synthetic or real data.\n\n## Copy-Paste Examples for Common Studies\n\n### Randomized Controlled Trial\n```python\nimport mcpower\n\n# RCT with treatment + control variables\nmodel = mcpower.LinearRegression(\"outcome = treatment + age + baseline_score\")\nmodel.set_effects(\"treatment=0.6, age=0.2, baseline_score=0.8\")\nmodel.set_variable_type(\"treatment=binary\")  # 0/1 treatment\n\n# Find sample size for treatment effect with scenario analysis\nmodel.find_sample_size(target_test=\"treatment\", from_size=100, to_size=500, \n                      by=50, scenarios=True)\n```\n\n### A/B Test with Interaction\n```python\nimport mcpower\n\n# Test if treatment effect depends on user type\nmodel = mcpower.LinearRegression(\"conversion = treatment + user_type + treatment*user_type\")\nmodel.set_effects(\"treatment=0.4, user_type=0.3, treatment:user_type=0.5\")\nmodel.set_variable_type(\"treatment=binary, user_type=binary\")\n\n# Check power robustness for the interaction\nmodel.find_power(sample_size=400, target_test=\"treatment:user_type\", scenarios=True)\n```\n\n### Survey with Correlated Predictors\n```python\nimport mcpower\n\n# Predictors are often correlated in real data\nmodel = mcpower.LinearRegression(\"wellbeing = income + education + social_support\")\nmodel.set_effects(\"income=0.4, education=0.3, social_support=0.6\")\nmodel.set_correlations(\"corr(income, education)=0.5, corr(income, social_support)=0.3\")\n\n# Find sample size for any effect\nmodel.find_sample_size(target_test=\"all\", from_size=200, to_size=800, \n                      by=100, scenarios=True)\n```\n\n## Customize for Your Study\n\n### Different Variable Types\n```python\n# Binary (0/1), skewed, or other distributions\nmodel.set_variable_type(\"treatment=binary, income=right_skewed, age=normal\")\n\n# Binary with custom proportions (30% get treatment)\nmodel.set_variable_type(\"treatment=(binary,0.3)\")\n```\n\n### Your Own Data (be careful, not yet well tested)\n```python\nimport pandas as pd\n\n# Use your pilot data for realistic simulations\ndf = pd.read_csv('examples/cars.csv')\nmodel.upload_own_data(df)  # Automatically preserves correlations\n```\n\n### Multiple Testing\n```python\n# Testing multiple effects? Control false positives\nmodel.find_power(\n    sample_size=200, \n    target_test=\"treatment,covariate,treatment:covariate\",\n    correction=\"Benjamini-Hochberg\",\n    scenarios=True  # Test robustness too!\n)\n```\n\n### Test the single violation of assumptions.\n```python\n# Customize how much \"messiness\" to add in scenarios\nmodel.set_heterogeneity(0.2)        # Effect sizes vary between people\nmodel.set_heteroskedasticity(0.15)  # Violation of equal variance assumption\n\n# Then run scenario analysis\nmodel.find_sample_size(target_test=\"treatment\", scenarios=False)\n```\n\n### More precision\n```python\n# To make a more precise estimation, consider increasing the number of simulations.\nmodel.set_simulations(10000)\n\n# MCPower is already heavily optimized, but there is old code that allows for parallelization. Use it to speed up your largest simulations.\nmodel.set_parallel(True)\n\n```\n\n## Quick Reference\n\n| **Want to...** | **Use this** |\n|-----------------|--------------|\n| Find required sample size | `model.find_sample_size(target_test=\"effect_name\")` |\n| Check power for specific N | `model.find_power(sample_size=150, target_test=\"effect_name\")` |\n| **Test robustness** | **Add `scenarios=True` to either method** |\n| Test overall model | `target_test=\"overall\"` |\n| Test multiple effects | `target_test=\"effect1, effect2\"` or `\"all\"` |\n| Binary variables | `model.set_variable_type(\"var=binary\")` |\n| Correlated predictors | `model.set_correlations(\"corr(var1, var2)=0.4\")` |\n| Multiple testing correction | Add `correction=\"FDR\", or \"Holm\" pr \"Bonferroni\"`|\n\n## When to Use MCPower\n\n**\u2705 Use MCPower when you have:**\n- Interaction terms (`treatment*covariate`)\n- Binary or non-normal variables\n- Correlated predictors\n- Multiple effects to test\n- **Need to test assumption robustness**\n- Complex models where traditional power analysis fails\n\n**\u2705 Use Scenario Analysis when:**\n- Planning important studies (grants, dissertations)\n- Working with messy real-world data\n- Effect sizes are uncertain\n- Want conservative sample size estimates\n- Stakeholders need confidence in your numbers\n\n**\u274c Use traditional power analysis for:**\n- For models that are not yet implemented\n- When all assumptions are clearly met\n\n## What Makes Scenarios Different? (Be careful, unvalidated, preliminary scenarios)\n\n**Traditional power analysis assumes perfect conditions.** MCPower's scenarios add realistic \"messiness\":\n\n| **Scenario** | **What's Different** | **When to Use** |\n|-------------|---------------------|------------------|\n| **Optimistic** | Your exact settings | Best-case planning |\n| **Realistic** | Mild effect variations, small assumption violations | **Recommended for most studies** |\n| **Doomer** | Larger effect variations, stronger assumption violations | Conservative/worst-case planning |\n\n**Behind the scenes**, scenarios randomly vary:\n- Effect sizes between participants\n- Correlation strengths  \n- Variable distributions\n- Assumption violations\n\nThis gives you a **range of realistic outcomes** instead of a single optimistic estimate.\n\u26a0\ufe0f **Important**: Scenario analysis and uploaded data features are experimental. \nUse with caution for critical decisions.\n\n<details>\n<summary><strong>\ud83d\udcda Advanced Features (Click to expand)</strong></summary>\n\n## Advanced Options\n\n### All Variable Types\n```python\nmodel.set_variable_type(\"\"\"\n    treatment=binary,           # 0/1 with 50% split\n    ses=(binary,0.3),          # 0/1 with 30% split  \n    age=normal,                # Standard normal (default)\n    income=right_skewed,       # Positively skewed\n    depression=left_skewed,    # Negatively skewed\n    response_time=high_kurtosis, # Heavy-tailed\n    rating=uniform             # Uniform distribution\n\"\"\")\n```\n\n### Complex Correlation Structures\n```python\nimport numpy as np\n\n# Full correlation matrix for 3 variables\ncorr_matrix = np.array([\n    [1.0, 0.4, 0.6],    # Variable 1 with others\n    [0.4, 1.0, 0.2],    # Variable 2 with others\n    [0.6, 0.2, 1.0]     # Variable 3 with others\n])\nmodel.set_correlations(corr_matrix)\n```\n\n### Performance Tuning\n```python\n# Adjust for your needs\nmodel.set_power(90)           # Target 90% power instead of 80%\nmodel.set_alpha(0.01)         # Stricter significance (p < 0.01)\nmodel.set_simulations(10000)  # High precision (slower)\n```\n\n### Formula Syntax\n```python\n# These are equivalent:\n\"y = x1 + x2 + x1*x2\"        # Assignment style\n\"y ~ x1 + x2 + x1*x2\"        # R-style formula  \n\"x1 + x2 + x1*x2\"            # Predictors only\n\n# Interactions:\n\"x1*x2\"         # Main effects + interaction (x1 + x2 + x1:x2)\n\"x1:x2\"         # Interaction only\n\"x1*x2*x3\"      # All main effects + all interactions\n```\n\n### Correlation Syntax\n```python\n# String format (recommended)\nmodel.set_correlations(\"corr(x1, x2)=0.3, corr(x1, x3)=-0.2\")\n\n# Shorthand format  \nmodel.set_correlations(\"(x1, x2)=0.3, (x1, x3)=-0.2\")\n```\n\n</details>\n\n## Requirements\n\n- Python \u2265 3.7\n- NumPy, SciPy, scikit-learn, matplotlib\n- joblib (optional, for parallel processing)\n\n## Need Help?\n\n- **Issues**: [GitHub Issues](https://github.com/pawlenartowicz/MCPower/issues)\n- **Questions**: pawellenartowicz@europe.com\n\n## Aim for future (waiting for suggestions)\n- \u2705 Linear Regression\n- \u2705 Scenarios, robustness analysis\n- \ud83d\udea7 Logistic Regression (coming soon)\n- \ud83d\udea7 ANOVA (and factor as variables) (coming soon)\n- \ud83d\udea7 Guide about methods, corrections (coming soon)\n- \ud83d\udccb Rewriting to Cython (backend change)\n- \ud83d\udccb Mixed Effects Models\n- \ud83d\udccb 2 groups comparision with alternative tests\n- \ud83d\udccb Robust regression methods\n\n\n## License & Citation\n\nGPL v3. If you use MCPower in research, please cite:\n\n```bibtex\n@software{mcpower2025,\n  author = {Pawel Lenartowicz},\n  title = {MCPower: Monte Carlo Power Analysis for Statistical Models},\n  year = {2025},\n  url = {https://github.com/pawlenartowicz/MCPower}\n}\n```\n\n---\n\n**\ud83d\ude80 Ready to start?** Copy one of the examples above and adapt it to your study!\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Monte Carlo Power Analysis for Statistical Models",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/pawlenartowicz/MCPower"
    },
    "split_keywords": [
        "power analysis",
        " statistics",
        " monte carlo",
        " linear regression"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "25e9bf2847063c30b6060d8788cb39eed73f22fb4499fd7799f913e12192b75a",
                "md5": "d9637177fcca01d75004cff199494760",
                "sha256": "ee43fc8c0b4dcf69d5c9bdaeb0c428f134bc65a035833689681752f08b914ce4"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp310-cp310-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "d9637177fcca01d75004cff199494760",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 233384,
            "upload_time": "2025-07-17T20:22:02",
            "upload_time_iso_8601": "2025-07-17T20:22:02.748737Z",
            "url": "https://files.pythonhosted.org/packages/25/e9/bf2847063c30b6060d8788cb39eed73f22fb4499fd7799f913e12192b75a/mcpower-0.3.1-cp310-cp310-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "631334046b7bb503815e2d6f48b4bddaf870c253392831826ab08ed2c9f127f8",
                "md5": "81b25d6b8fb201035857f45d24a62846",
                "sha256": "1d0ce7453d2015b864dcfaa3db6e7321ac9ffcc10fac03d69848656069e4609d"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "81b25d6b8fb201035857f45d24a62846",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 611847,
            "upload_time": "2025-07-17T20:22:04",
            "upload_time_iso_8601": "2025-07-17T20:22:04.534092Z",
            "url": "https://files.pythonhosted.org/packages/63/13/34046b7bb503815e2d6f48b4bddaf870c253392831826ab08ed2c9f127f8/mcpower-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "19b7654a2f9575b03792dab156886738eb39eb97e3bb07a8fa277d9002cdcb97",
                "md5": "077364c9345a0a77594a89c4633fc722",
                "sha256": "a80b64525f6eec24679db6c33d484b6a3929be2a2ad44709f5778fca1d7c512b"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "077364c9345a0a77594a89c4633fc722",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10",
            "size": 178874,
            "upload_time": "2025-07-17T20:22:05",
            "upload_time_iso_8601": "2025-07-17T20:22:05.910425Z",
            "url": "https://files.pythonhosted.org/packages/19/b7/654a2f9575b03792dab156886738eb39eb97e3bb07a8fa277d9002cdcb97/mcpower-0.3.1-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bd1d742736446c55d0def0a1416327fb3928b49eed98483f00c6589d4f135c83",
                "md5": "526b8037cfcc5de7376dca32ea070ba0",
                "sha256": "b8c7e5619b84d9fe1cbe2ff9e0d007b8ed9bc88f94e55754f9070e03a68870f2"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp311-cp311-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "526b8037cfcc5de7376dca32ea070ba0",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.10",
            "size": 409865,
            "upload_time": "2025-07-17T20:22:07",
            "upload_time_iso_8601": "2025-07-17T20:22:07.441370Z",
            "url": "https://files.pythonhosted.org/packages/bd/1d/742736446c55d0def0a1416327fb3928b49eed98483f00c6589d4f135c83/mcpower-0.3.1-cp311-cp311-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "768e9536271b200744f5cc2feb4db35e553d4378928e10f10f6253d3bf7e0ed5",
                "md5": "8851a8257b8ff5e08630b1722f232be6",
                "sha256": "1582b6854502950e96705cb5817b46469db2f1630c7021c1b56b5dfcb938be39"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "8851a8257b8ff5e08630b1722f232be6",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.10",
            "size": 1174293,
            "upload_time": "2025-07-17T20:22:08",
            "upload_time_iso_8601": "2025-07-17T20:22:08.846279Z",
            "url": "https://files.pythonhosted.org/packages/76/8e/9536271b200744f5cc2feb4db35e553d4378928e10f10f6253d3bf7e0ed5/mcpower-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d67500a63c0cb68ee4720b096c9ebfde1184ee11e91fe0f8fd9cdf95a4054700",
                "md5": "e6a8b0263fe23185780af4170d2b0ac5",
                "sha256": "bc41da2c257966ec1c693321807d88fb9b79ea7ba1ff42d41f4afe62c6b19e04"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "e6a8b0263fe23185780af4170d2b0ac5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.10",
            "size": 299959,
            "upload_time": "2025-07-17T20:22:09",
            "upload_time_iso_8601": "2025-07-17T20:22:09.870496Z",
            "url": "https://files.pythonhosted.org/packages/d6/75/00a63c0cb68ee4720b096c9ebfde1184ee11e91fe0f8fd9cdf95a4054700/mcpower-0.3.1-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "69b9fe1a7562b3201eb352cc5bfb6e6e8d89320e1bdcbb42877e351450effe77",
                "md5": "dd9b63ec0390f8b71ab801f7301ae585",
                "sha256": "0b64d064ccd1b134a26abbb40bbe285c465b247199beeb612acc37a6fc48407f"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "dd9b63ec0390f8b71ab801f7301ae585",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.10",
            "size": 586046,
            "upload_time": "2025-07-17T20:22:10",
            "upload_time_iso_8601": "2025-07-17T20:22:10.996937Z",
            "url": "https://files.pythonhosted.org/packages/69/b9/fe1a7562b3201eb352cc5bfb6e6e8d89320e1bdcbb42877e351450effe77/mcpower-0.3.1-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8b59760ffb1d61d3096b9ed617cac1d190fcd738eb0872a1eea5b5a10a249f1e",
                "md5": "20679570cceb5b6bffb0ca6ef5d237b9",
                "sha256": "e3b66003b9a9795f815631e45d714b0faf2510dc101acb715e85606266500d8a"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "20679570cceb5b6bffb0ca6ef5d237b9",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.10",
            "size": 1740556,
            "upload_time": "2025-07-17T20:22:12",
            "upload_time_iso_8601": "2025-07-17T20:22:12.191623Z",
            "url": "https://files.pythonhosted.org/packages/8b/59/760ffb1d61d3096b9ed617cac1d190fcd738eb0872a1eea5b5a10a249f1e/mcpower-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2f60f24eb7f492268da1eae6129c3cba87735f311568c58214b6951fa4fcc2cf",
                "md5": "cfa248a6ca0b3145c63d15b79f363f0a",
                "sha256": "bebbf7469076212d8130ea0284d68abefa324aede73c1e208c2bb80e1b17856c"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "cfa248a6ca0b3145c63d15b79f363f0a",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.10",
            "size": 421149,
            "upload_time": "2025-07-17T20:22:13",
            "upload_time_iso_8601": "2025-07-17T20:22:13.768342Z",
            "url": "https://files.pythonhosted.org/packages/2f/60/f24eb7f492268da1eae6129c3cba87735f311568c58214b6951fa4fcc2cf/mcpower-0.3.1-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c7204a697220535a28397a2bffedcfd893c0c3497dcbd9cffe00b0909bc0b0b2",
                "md5": "0af2a36125abcce7f274f24302e7f3a3",
                "sha256": "e6b90939b170f90e5b9f300476b2b5c044c95deb8507f624cdbebfcec77e41f0"
            },
            "downloads": -1,
            "filename": "mcpower-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0af2a36125abcce7f274f24302e7f3a3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 59507,
            "upload_time": "2025-07-17T20:22:14",
            "upload_time_iso_8601": "2025-07-17T20:22:14.754887Z",
            "url": "https://files.pythonhosted.org/packages/c7/20/4a697220535a28397a2bffedcfd893c0c3497dcbd9cffe00b0909bc0b0b2/mcpower-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-17 20:22:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pawlenartowicz",
    "github_project": "MCPower",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.26.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.11.0"
                ]
            ]
        },
        {
            "name": "numba",
            "specs": [
                [
                    ">=",
                    "0.58.0"
                ]
            ]
        },
        {
            "name": "joblib",
            "specs": [
                [
                    ">=",
                    "1.1.0"
                ]
            ]
        }
    ],
    "lcname": "mcpower"
}
        
Elapsed time: 0.47939s