Bayes-factor for testing a null-hypothesis? I heard somewhere, that I can directly test (or gather support for) a null-hypothesis using the Bayes-Factor. In my specific experiment, I hypothesize that an experimental manipulation does not have an impact on some variable but does selectively impact another one. Somehow, simply showing that a t-test gives non-significant results does not seem appropriate (because this can only "not-reject" the H0).
My specific problem is as follows: 
I have two experimental conditions, say medication and control, and I would like to show that estimated parameter-values are the same in both conditions (I measure some data $X$ and have a model with parameters $\alpha,\beta$ giving the likelihood $P(X|\alpha,\beta)$. I measured $N$ subjects in both the control and medication condition (repeated measures).
My first approach would be to set up a hierarchical model where $\alpha,\beta$ are distributed for each individual according to some group-level distribution (since both parameters have to be positive and are more likely to be small, I could use an exponential). The group-level distribution would have a uniform prior in a feasible range.
I would use this model to sample (MCMC) from the posterior and I think I would be interested in comparing the group-level estimates. 
However it is unclear to me, how to integrate the two competing hypotheses (H0 being that $\alpha_{med}=\alpha_{cntrl}$ and H1 being that $\alpha_{med}\ne\alpha_{ctrl}$ and the same for $\beta$).
So my question is: How can I go from this model to the Bayes-factor?
Concretely, I am running my MCMC in the pymc package so any help with concrete code would help a lot!
 A: You could try the approach recommended by Steve Goodman and calculate the minimum bayes factor:
Toward Evidence Based Medical Statistics 2: The Bayes Factor
To get this from mcmc results, you can subtract the estimate for the group level parameters for each step to get a posterior distribution of the difference as was done by John Kruschke in this paper: Bayesian Estimation Supersedes the t Test
He does not calculate a bayes factor there and recommends against it (see appendix D). Instead he designates a region of practical equivalence around the null hypothesis (zero) and see if your credible interval overlaps.
To get the minimum bayes factor I believe what you can do is then divide the probability at the mode of your estimate of the difference between means by the probability at zero. I have not seen this done anywhere but it makes sense to me. Hopefully someone else can comment on that.
A: You can use the BayesFactor package in R to easily compute Bayesian t tests. See the examples here: http://bayesfactorpcl.r-forge.r-project.org/#twosample for details. The web calculator at http://pcl.missouri.edu/bayesfactor uses the same models (see the Rouder et al 2009 reference on the web calculator page). Note that the Kruschke reference given above does not actually allow you to test a null hypothesis.
