Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bedartha Goswami
uncertise
Commits
21facf31
Commit
21facf31
authored
Jan 10, 2018
by
Bedartha Goswami
Browse files
pvalues was defined multiple times
parent
a3178189
Changes
1
Hide whitespace changes
Inline
Side-by-side
events.py
View file @
21facf31
...
...
@@ -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:
21
AM
# Last modified: Wed Jan 10, 2018 12:
39
AM
# 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
(
pval
ue
s
,
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
(
pval
ue
s
)
sortidx
=
np
.
argsort
(
pval
ue
s
)
p_
=
pval
ue
s
[
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment