Using M-H algorithm I want to generate samples from proposal distribution which will ultimately converge to the target distribution.
I am facing a problem particularly in updating the prior to posterior and using posterior as prior again to find new posterior.
I am not using a conjugate prior. So while updating:
post1=likelihood1*prior;
post2=likelihood2*post1; =likelihood2*likelihood1*prior;
post3=likelihood3*likelihood2*likelihood1*prior;
this keeps on going which seems not feasible if I am generating N number of samples.