{ "info": { "author": "Christoph Moehl", "author_email": "christoph.moehl@dzne.de", "bugtrack_url": null, "classifiers": [], "description": "================\npermutation_test\n================\n\n\nWhat is it\n----------\n\nImplementation of Fisher's permutation test.\n\nThe test is described in following publications:\n\n- Fisher, R. A. (1935). The design of experiments. 1935. Oliver and Boyd, Edinburgh.\n\n- Ernst, M. D. (2004). Permutation methods: a basis for exact inference. Statistical Science, 19(4), 676-685\n\n\nHow to install it\n-----------------\n\nInstall with pip::\n\n $ pip install permutation_test\n\n\n\nCommand Line Script Usage\n-------------------------\n\nExample::\n \n permtest [path/to/data.csv] [groups_colname] [reference_group_name] -t [test_group_name]\n\n\nUse help to get info about parameters::\n\n $ permtest -h\n\n usage: permtest [-h] [-t TESTGROUP]\n input_filepath treatment_column_name referencegroup\n\n positional arguments:\n input_filepath e.g. path/to/my/data.csv, path to csv file with data\n treatment_column_name\n name of column in the csv table that specifies the\n group\n referencegroup name of the reference group as named in the csv table\n\n optional arguments:\n -h, --help show this help message and exit\n -t TESTGROUP, --testgroup TESTGROUP\n name of the test group as named in th csv table. If\n not defined, test group is determined automatically.\n -a ALPHA, --alpha ALPHA\n significance level alpha (between 0 and 1) If not\n defined, alpha is set to 0.05.\n -m MULTI_COMP_CORR, --multi_comp_corr MULTI_COMP_CORR\n perform multiple comparison correction with benjamini\n hochberg procedure yes/no, If not defined, correction\n is performed.\n \n\n\nSpecifications of data structure in csv file\n--------------------------------------------\n\n- The csv should contain comma separated values. One ore more columns should contain measurement data.\n\n- All columns need to have a name, specified in the first row.\n\n- One column contains names for the groups\n\nExample *my_data.csv*:\n\n============ ============ ============ ===========\nexperiment_1 experiment_2 experiment_3 group_names\n============ ============ ============ ===========\n1.4 3 2.5 condition_2 \n2 5 2 condition_1\n5.6 3 17 condition_2\n9 6.5 2 condition_1\n17 5 13.0 condition_1\n17 2 13.0 condition_3\n12 8 18.7 condition_3\n============ ============ ============ ===========\n\n\nTo perform tests for all experiments, where *condition_1* is the reference and *condition_2* is\nthe test data, run follwoing command::\n\n $ permtest my_data.csv group_names condition_1 -t condition_2\n\nOften, it is convenient to save the output in a textfile::\n\n $ permtest my_data.csv group_names condition_1 -t condition_2 > my_test_result.txt\n\n\n\nPython Library Use Example\n--------------------------\n::\n\n >>> import permutation_test as p\n >>> data = [1,2,2,3,3,3,4,4,5]\n >>> ref_data = [3,4,4,5,5,5,6,6,7]\n\n >>> p_value = p.permutation_test(data, ref_data)\n taking random subsample of size 20000 from 48620 possible permutations\n nr of mean diffs: 20000\n\n\n Distribution of mean differences\n \u2502 \n * \u253c+1.73038 \n \u2502 * \n \u2502 \n * \u2502 * \n \u2502 \n * \u2502 * \n \u2502 \n \u2502 \n * \u2502 * \n \u2502 \n \u2502 \n * \u2502 * \n \u2502 \n * \u2502 * \n \u2502 \n * \u2502 * \n * * \u253c+0.037 * * \n \u2500\u2500\u2500\u253c*****\u2500***\u2500**\u2500***\u2500**\u2500**\u2500***\u2500**\u2500**\u2500**\u253c**\u2500***\u2500**\u2500***\u2500**\u2500**\u2500***\u2500**\u2500***\u2500*****\u253c\u2500\u2500\u2500\n -2.38713 \u2502 +2.39919 \n mean difference of tested dataset: -2.0\n p_value: 0.00345\n p_lower_than (probability that mean of test data is not lower than mean of ref data): 0.00345\n p_value_greater_than (probability that mean of test data is not greater than mean of ref data): 0.9998\n 0.0034500000000000121\n\n\nThe asccii art plot shows the ditribution of mean differences for the permutations. \nThe ascii art plot is done with [AP](https://github.com/mfouesneau/asciiplot), a plotting package by Morgan Fouesneau.\n\n\nIf the number of possible combinations is grater than n_combinations_max,\na random subsample of size n_combinations_max is taken for histogram calculation.\n\nIf detailed is False, only (two-sided) p_value is returned,\ni.e. the probability that data is not different from ref_data \n\nIf detailed is True, one-sided p values and histogram data of \nmean differences is returned in a dict:\n\nhist_data: distribution of mean differences for all permutations\np_value: two sided p_value (the probability that data is not\ndifferent from ref_data )\np_value_lower_than: the probability that mean of data is not \nlower than mean of ref_data\np_value_greater_than: the probability that mean of data is \nnot grater than mean of ref_data \n\n\nChristoph M\u00f6hl,\nImage and Data Analysis Facililty/Core Faciliies,\nDeutsches Zentrum f\u00fcr Neurodegenerative Erkrankungen e. V. (DZNE) in der Helmholtz-Gemeinschaft\nGerman Center for Neurodegenerative Diseases (DZNE) within the Helmholtz Association", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cmohl2013/permutation_test", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "permutation_test", "package_url": "https://pypi.org/project/permutation_test/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/permutation_test/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/cmohl2013/permutation_test" }, "release_url": "https://pypi.org/project/permutation_test/0.18/", "requires_dist": null, "requires_python": null, "summary": "Implementation of Fishers permutation test", "version": "0.18" }, "last_serial": 2567020, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "aab8613d8fd40cdbce91f88c0716b744", "sha256": "7b948e4620ae718dcf090a4d59c3f70d123a65f2ce3f7dc02114c923dffcc2e2" }, "downloads": -1, "filename": "permutation_test-0.1.tar.gz", "has_sig": false, "md5_digest": "aab8613d8fd40cdbce91f88c0716b744", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10267, "upload_time": "2015-12-18T16:14:39", "url": "https://files.pythonhosted.org/packages/01/30/b667c18f47e355ecf98bd2cc86f15884a6d04c97817c2405ae247f066c3d/permutation_test-0.1.tar.gz" } ], "0.12": [ { "comment_text": "", "digests": { "md5": "f59df7cb67180de38e95fc1eb59a58cc", "sha256": "c43a8ff55eee6ed3de1f4a3a342355e8268a1f2f840bfc204aa783b64babe3aa" }, "downloads": -1, "filename": "permutation_test-0.12.tar.gz", "has_sig": false, "md5_digest": "f59df7cb67180de38e95fc1eb59a58cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10268, "upload_time": "2015-12-22T09:48:45", "url": "https://files.pythonhosted.org/packages/f4/dc/1665499f537f91c1a13da26a9ed26fb01b1f0e68c20961b032bc23ee432d/permutation_test-0.12.tar.gz" } ], "0.13": [ { "comment_text": "", "digests": { "md5": "e4e4f253a432a61151b50604ed7e10ab", "sha256": "5e272efa8b921cd1163c39b80a309156cabd549963c96c2209f316bf7392b4a7" }, "downloads": -1, "filename": "permutation_test-0.13.tar.gz", "has_sig": false, "md5_digest": "e4e4f253a432a61151b50604ed7e10ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10357, "upload_time": "2016-01-19T14:46:31", "url": "https://files.pythonhosted.org/packages/10/e3/04c59284f5c43c24e6f498d1c50e1e65a8cc63af6a022296b03b723d851c/permutation_test-0.13.tar.gz" } ], "0.14": [ { "comment_text": "", "digests": { "md5": "322a0915216953beeb643b9212af6c22", "sha256": "eec8300aa557c518c05d4ebf3813fd56d57c13d7834a86b6794403012ef619dc" }, "downloads": -1, "filename": "permutation_test-0.14.tar.gz", "has_sig": false, "md5_digest": "322a0915216953beeb643b9212af6c22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16125, "upload_time": "2016-05-13T13:50:41", "url": "https://files.pythonhosted.org/packages/e1/96/c9c094b1a23b26051971894082fc121ec623aefe7acca2d1b741dba3d6cf/permutation_test-0.14.tar.gz" } ], "0.15": [ { "comment_text": "", "digests": { "md5": "8693207fabb487044a9bbb7e6ad0c8ec", "sha256": "74382a577658d70db215dde567faebc801bc76bddc1f61febbbdbd8bbd342240" }, "downloads": -1, "filename": "permutation_test-0.15.tar.gz", "has_sig": false, "md5_digest": "8693207fabb487044a9bbb7e6ad0c8ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14134, "upload_time": "2016-06-16T13:26:06", "url": "https://files.pythonhosted.org/packages/0a/8c/83d9fa158d73125d0abf3ad188f3b18ccfb10196c33bfe697e12ba8937cb/permutation_test-0.15.tar.gz" } ], "0.16": [ { "comment_text": "", "digests": { "md5": "bf22a02505e5af036a0ac4dc7db36439", "sha256": "4456186ce0823614ed205e8aed3c348ebce163f6a82cff80e07f9a283cd9e85c" }, "downloads": -1, "filename": "permutation_test-0.16.tar.gz", "has_sig": false, "md5_digest": "bf22a02505e5af036a0ac4dc7db36439", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14100, "upload_time": "2016-08-24T08:16:49", "url": "https://files.pythonhosted.org/packages/7c/84/9345bce9d23205f5c0eb9839af35581380b35efbb9ad3c944c58c6512c96/permutation_test-0.16.tar.gz" } ], "0.17": [ { "comment_text": "", "digests": { "md5": "9359fe208618db55b25004128272f04a", "sha256": "3bb48366a81dff775323e20a034c7dd894e183350e04a52c5b1c8bcab30ffaba" }, "downloads": -1, "filename": "permutation_test-0.17.tar.gz", "has_sig": false, "md5_digest": "9359fe208618db55b25004128272f04a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15179, "upload_time": "2017-01-11T10:18:36", "url": "https://files.pythonhosted.org/packages/88/e8/b3497801591a5f54d50c3c7169a602634265071ae4eda45a0679712a00e2/permutation_test-0.17.tar.gz" } ], "0.18": [ { "comment_text": "", "digests": { "md5": "24385268c2a3b2a6929ad0ac3def938d", "sha256": "bc0bbf9c487b16c574f7995533be27cb273c7c53d571679b608d1318d91d50db" }, "downloads": -1, "filename": "permutation_test-0.18.tar.gz", "has_sig": false, "md5_digest": "24385268c2a3b2a6929ad0ac3def938d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15174, "upload_time": "2017-01-11T11:40:50", "url": "https://files.pythonhosted.org/packages/aa/69/0e9e474bcf163bcdd229ed8cfd6af36a49cc3794f7e9da4d4ce2c6b28c59/permutation_test-0.18.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "24385268c2a3b2a6929ad0ac3def938d", "sha256": "bc0bbf9c487b16c574f7995533be27cb273c7c53d571679b608d1318d91d50db" }, "downloads": -1, "filename": "permutation_test-0.18.tar.gz", "has_sig": false, "md5_digest": "24385268c2a3b2a6929ad0ac3def938d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15174, "upload_time": "2017-01-11T11:40:50", "url": "https://files.pythonhosted.org/packages/aa/69/0e9e474bcf163bcdd229ed8cfd6af36a49cc3794f7e9da4d4ce2c6b28c59/permutation_test-0.18.tar.gz" } ] }