Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

Bug in pval computation #24

Open
zachalexan opened this issue Aug 8, 2016 · 1 comment
Open

Bug in pval computation #24

zachalexan opened this issue Aug 8, 2016 · 1 comment

Comments

@zachalexan
Copy link

Hello,

I am having difficulty retrieving pvals when method='amoc'.

Looking at this chunk (lines 92-97 in EDM.R):

            over = 1
            for(i in 1:nperm){
                Zcounts = sample(Zcounts)
                stat = Analysis(Zcounts, min.size, alpha)
                if(stat$stat >= retList$stat)
                    over = over + 1

I don't believe retList has been initialized. So stat$stat >= retList$stat is always false. Indeed,
running breakout with nperm=N results in a p-value of 1/(N+1).

Forgive me if I'm pointing out something incorrect or already known. I couldn't find any mention of it here.

@zachalexan
Copy link
Author

Spoke too soon. I see where retList is initialized, but the fact remains that the p-value is always 1/(N+1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant