I have done the following, based on code from the below link:
https://lingpipe-blog.com/2009/10/1...t-to-fisher-exact-test-on-contingency-tables/
Is the uniform prior coming from the "+1" in the theta lines? If so, if I want to propose another prior can I just substitute out the 1's?
Thanks.
@Dason any input?
Code:
n1 = 321 # Pre
y1 = 313 # OUt-of-Range
n2 = 356 # Post
y2 = 49 # Out-of-Range
# SIMULATION
I = 10000 # simulations
theta1 = rbeta(I, y1+1, (n1-y1)+1)
theta1
theta2 = rbeta(I, y2+1, (n2-y2)+1)
theta2
diff = theta1-theta2 # simulated diffs
diff
Is the uniform prior coming from the "+1" in the theta lines? If so, if I want to propose another prior can I just substitute out the 1's?
Thanks.
@Dason any input?
Last edited: