Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector of breal instead of bool? #1

Open
shimenghuang opened this issue Jan 2, 2020 · 1 comment
Open

Vector of breal instead of bool? #1

shimenghuang opened this issue Jan 2, 2020 · 1 comment

Comments

@shimenghuang
Copy link

Hi @keithw ,

I was wondering if ppv_cache_ was supposed to be initialized to a vector of breal instead of bool in BarnardFast here. My guess is that "ppv" stands for "particular p-value" as it is returned here, and with this, should this line assign cumulative_probability (a particular p-value) rather than cumulative_probability >= alpha to it? Without changing this, p_value from BarnardFast seems to be either 1 or gamma, but if I changed as described, it would give the p_value. Not sure if that was intended.

Thanks!

Shimeng

@keithw
Copy link
Owner

keithw commented Jan 7, 2020

Hi Shimeng -- I don't think so! But BarnardFast is my own (unpublished) algorithm for computing many Barnard p-values at the same time. It can be useful if you want to calculate the curve of false-positive rates along the line of a composite null hypothesis. (E.g., what is the probability of getting p < .05 against equality if the true rates are both 0.02? Or 0.03? Or 0.04? Or 0.05? Etc.) This was used to make the graph on my web page (https://cs.stanford.edu/~keithw/ -- see the paragraph about the "exchange algorithm.")

Anyway, this is pretty esoteric stuff, and it's an unpublished algorithm -- you may want to just leave out the "BarnardFast" from your R package because I suspect it may just confuse people...

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

No branches or pull requests

2 participants