Revised fitBMA.R

I found that I had made critical mistakes in fitBMA(), and revised it.
Please note that I referred to Dalston and Jeong’s code for previous
homework.