I'm looking to better understand how Bayesian posterior distributions can be derived from different types of data. There are plenty of examples out there showing how a posterior can be derived from a beta prior and Bernoulli trials as data/likelihood. What I want to understand is how this method can be extended to other scenarios.
- Let's say we have some discrete data that follows a weibull distribution with the parameters of shape=35 and scale=282 (I know I'm bending the rules a bit here, but it was the easiest way to generate the data.)
- Our prior is a beta distribution with alpha and beta both equal to zero... a completely uniformed prior.
- How can a posterior distribution be derived from this data?
- What if the prior changes to a beta distribution of alpha=3 and beta=4 representing a change in belief?
I've included some R code to help generate the data I'm describing:
#Example data sims <- round(rweibull(10000, shape = sp, scale = sc),0). #Example beta dist library(manipulate) x <- seq(0, 1, length = 50) manipulate(plot(x,dbeta(x, alp, bet),type="l",lwd=2,col="lightblue",xlim=c(0,1),breaks=20), alp= slider(0,100), bet= slider(0,100))
Any resources would be much appreciated, as would examples using JAGS/Stan if at all possible. I know I made some pretty broad assumptions about using a beta distro as prior as well, so if there is a better approach please let me know.
Thanks in advance!