Question: Suppose a Gamma-Poisson model is used in a study, and the R-codes are as follows: data
Suppose a Gamma-Poisson model is used in a study, and the R-codes are as follows:
data <- c(24,25,31,31,22,21,26,20,16,22) n <- length(data) sumdata <- sum(data) #prior alpha<-0.5 beta<- 0.0001 curve(dgamma(x,shape=alpha,rate=beta),lty=3,lwd=4, col="red", ylim = range(0,0.06), add=T) # The Likelihood curve(dgamma(x,shape=sum(data), rate=10),add=TRUE, lty=2,lwd=3, col="blue") # The Posterior curve(dgamma(x,shape=sum(data)+alpha,rate=n+beta), from=0, to=1, add=TRUE, xlab="p",ylab="Density",lty=1,lwd=3, col="green")
What is the MEAN of the Prior distribution?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
