A set of Monte Carlo based tools to create test statistics for four non-parametric rank-based tests: Mann-Whitney (MW), Kruskal-Wallis (KW), Kolmogorov-Smirnov (KS) and Kuiper (K).
Project description
Rank Based Monte Carlo
This package produces the null hypothesis distribution of four non-parametric tests: Mann-Whitney (MW), Kruskal-Wallis (KW), Kolmogorov-Smirnov (KS) and Kuiper (K).
In all cases, the distribution is created by initializing the class (MonteCarloMannWhitney, MonteCarloKruskalWallis, MonteCarloKolmogorovSmirnov, MonteCarloKuiper) from the package and calling the method PrintCriticalValueTable. For instance, the KW test statistics can be accomplished with the following code:
from RankBasedMonteCarlo import MonteCarloKruskalWallis
if __name__ == '__main__':
kw = MonteCarloKruskalWallis()
criticalValues, pvalue = kw.PrintCriticalValueTable((6, 45, 30), 10000, 9)
The class is imported from the package on the first line. Within the if statement, an instance of the class is created (kw) and the critical values and pvalue is determined on the next line. The PrintCriticalValueTable method accepts the same parameters regardless of the statistical test:
- ns : tuple : A tuple listing the number of observations per group. For instance (6,5)
- reps : int : The number of repetitions the process completes before producing critical values. Default is 10,000.
- observedValue : float : Optional value used to determine p-value
- PrintToScreen : bool : Specifies if the critical values are printed to the screen. Defaults to True.
- cvs : list : Specifies a list of critical values.
Installation
This package can be installed using pip or conda (Anaconda):
Using Pip
pip install RankBasedMonteCarlo
Using Conda
conda install -c tazzben rankbasedmontecarlo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rankbasedmontecarlo-0.1.4.tar.gz
.
File metadata
- Download URL: rankbasedmontecarlo-0.1.4.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5242ebeab833dd57ae523297b8c033ce7df63307ba444beb03fa2175eb37f5e6 |
|
MD5 | 670b9935a3f4f554c298638d5d312b10 |
|
BLAKE2b-256 | 456d1b931e385a867b0a63abe33fa3e98ac3d078cea3624aa00b6535ba7a498d |
File details
Details for the file rankbasedmontecarlo-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: rankbasedmontecarlo-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 896cf113bf1eb1c00a15566f35f9158b05d0daaca77aa7cbc9f761d24695145a |
|
MD5 | c93da9f4506e07756164bc658e0206f9 |
|
BLAKE2b-256 | 3050e5784de17799b547d357e988072b768bd0d4bb5895a8cfc8d5f178ca2f56 |