Commit 21facf31 authored by Bedartha Goswami's avatar Bedartha Goswami
Browse files

pvalues was defined multiple times

parent a3178189
......@@ -6,7 +6,7 @@ A suite of functions that assist in carrying out the event-detection analysis
"""
# Created: Thu May 26, 2016 03:50PM
# Last modified: Wed Jan 10, 2018 12:21AM
# Last modified: Wed Jan 10, 2018 12:39AM
# Copyright: Bedartha Goswami <goswami@pik-potsdam.de>
import numpy as np
......@@ -156,13 +156,13 @@ def pvalues(Q, Qsurr, nwind, verbose=False, pbar=False):
return pvalues
def holm(pvalues, alpha=0.05, corr_type="dunn"):
def holm(pvals, alpha=0.05, corr_type="dunn"):
"""
Returns indices of p-values using Holm's method for multiple testing.
"""
n = len(pvalues)
sortidx = np.argsort(pvalues)
p_ = pvalues[sortidx]
n = len(pvals)
sortidx = np.argsort(pvals)
p_ = pvals[sortidx]
j = np.arange(1, n + 1)
if corr_type == "bonf":
corr_factor = alpha / (n - j + 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment