# NOT RUN {
G_expected(N=50, alpha=19.23356, MPFR=FALSE)
G_variance(N=50, alpha=19.23356, MPFR=FALSE)
G_expected(N=50, alpha=c(19.23356, 12.21619, 1),
discount=c(0, 0.25, 0.7300045), MPFR=FALSE)
# require("Rmpfr")
# G_variance(N=50, alpha=c(19.23356, 12.21619, 1),
# discount=c(0, 0.25, 0.7300045), MPFR=c(FALSE, TRUE, TRUE))
# Examine the growth rate of the DP
DP <- sapply(c(1, 5, 10), function(i) G_expected(1:200, alpha=i, MPFR=FALSE))
matplot(DP, type="l", xlab="N", ylab="G")
# Examine the growth rate of the PYP
# PY <- sapply(c(0.25, 0.5, 0.75), function(i) G_expected(1:200, alpha=1, discount=i))
# matplot(PY, type="l", xlab="N", ylab="G")
# Other special cases of the PYP are also facilitated
# G_expected(N=50, alpha=c(27.1401, 0), discount=c(-27.1401/100, 0.8054447))
# G_variance(N=50, alpha=c(27.1401, 0), discount=c(-27.1401/100, 0.8054447))
# }
Run the code above in your browser using DataLab