I have a data which follows gamma distribution and want to know the uncertainty of the parameters of this data.
•Data∼Gamma(α,β)
•Parameters
α∼Gamma(kα,θα)
β∼Gamma(kβ,θβ)
I used Winbugs (code below).
model{
for (i in 1:N){
Y[i] ~ dgamma(k, theta)
}
k ~ dgamma(0.1, 0.1)
theta ~ dgamma(0.1, 0.1)
}
1.To plot the likelihood, first, I used a uniform prior then divided the posterior by the prior which makes the posterior same as the likelihood. (Figure1)
2.Next I changed the prior several times and looked what happens, but the problem is when I plotted the likelihood by dividing the posterior by the prior, likelihood changes which shouldn’t, whenever I change the prior. (Figure 2, 3)
Question
Is it possible that the likelihood changes when the prior changes? If the prior is too narrow, is there a possibility that the posterior might be wrong? Can somebody help me what the problem is?