Suppose we have some data points that we believe they follow $N(\mu, \sigma^2)$, and both parameters are unknown . I want to assign conjugate prior distributions on both $\mu$ and $\sigma^2$, and then obtain the posterior distribution. How this can be done in R?
I guess your answer can be found in wikipedia http://en.wikipedia.org/wiki/Conjugate_prior. The conjugate prior is the Normal-inverse gamma with hyperparameters $\mu_0, \nu, \alpha$ and $\beta$.