New to MCMC.
I have a model, saying $$Y_i=\beta_0+\beta_1x_{i1}+\beta_2x_{i2}+\frac{e_i}{\sqrt{\mu}}$$ where $x_{ij}$ are fixed covariates, $e_i\sim N(0,1)$, $\beta_0$, $\beta_1$, $\beta_2$ and $\mu$ are unknown parameters, with the prior distribution for parameters $\beta_i\sim N(0,1)$ and $\mu\sim \Gamma(0.1,0.1)$
Now I need to implement a Gibbs sampling of $(\beta_0,\beta_1,\beta_2,\mu)$ procedure from the joint posterior distribution with R.
I did some calculation but not sure: is this the posterior distribution? $$ C\left(\frac{1}{\sqrt{2\pi}}e^{-\frac{\beta_0^2}{2}}\right)\left(\frac{1}{\sqrt{2\pi}}e^{-\frac{\beta_1^2}{2}}\right)\left(\frac{1}{\sqrt{2\pi}}e^{-\frac{\beta_2^2}{2}}\right)\mu^{0.1-1}e^{-0.1\mu} $$ $$ \qquad\qquad \times\prod_{i=1}^n\frac{\sqrt{\mu}}{\sqrt{2\pi}}e^{-\frac{\mu}{2}[y_i-(\beta_0+\beta_1x_{i1}+\beta_2x_{i2})]^2} $$
But I still don't know how to derive the posterior distribution, neither do I know how to do the sampling with R. Can anyone give me some references? Thanks very much.