Professional Documents
Culture Documents
You can explore the impact of these two parameters on the gamma distribution using the following
R scripts (note that this script focuses on plotting values that flank the default parameter settings for
the gamma distribution in the program SIMMAP 1.5):
#Generate a plot of gamma distributions that vary the shape parameter (alpha).
for(i in 1:length(alphas)) {
hx <- dgamma(x, shape=alphas[i], rate=1, scale=1/0.25)
#Generate a plot of gamma distributions that vary the rate parameter (beta) as in Figure 2 below.
labels <- c("beta=0.1", "beta=0.25 (SIMMAP default)", "beta=2", "beta=4", "beta=8", "beta=10")
for(i in 1:length(betas)) {
hx <- dgamma(x, shape=1.25, rate=1, scale=1/betas[i])
#Generate a plot of gamma distributions with alpha and beta equal to one another as in Figure 3
below.
labels <- c("alpha=0.1, beta=0.1", "alpha=1.25, beta=0.25 (SIMMAP default)", "alpha=0.5, beta=0.5",
"alpha=1, beta=1", "alpha=5, beta=5", "alpha=20, beta=20")
for(i in 1:length(betas)) {