Imported from https://github.com/wenhao-z/Bayes_factor_Opposite_neuron