Hi,
I've lost track of the problem in this thread, but here a couple of points:
-The rate difference can be negative, of course, but your original code had the rate difference as the binomial mean parameter. By definition, the binomial parameter has to be between 0 and 1.
-Given data, the posterior on beta0 or beta1 will be different from the prior unless the prior has zero variance. I'm not sure why it is important to show that the posterior and the prior are the same....
-If the "Sex_Bin" variable is (0,1), then the rate difference is given by
Rate_Difference=logistic(beta0 + beta1*1) - logistic(beta0+beta1*0);
I don't know if this is what you are looking for....
... View more