predict-methods: Tail Probability Estimation for a Gamma Shape Mixture Model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

predict method for class "gsm". This function allows to estimate the tail probability of a Gamma Shape Mixture Model using the output of the estim.gsm or estim.gsm_theta procedures.

Usage

1
2
## S4 method for signature 'gsm'
predict(object, thresh, start = 1, ...)

Arguments

object

object of class "gsm"; a list returned by the estim.gsm or estim.gsm_theta functions.

thresh

threshold value.

start

MCMC run to start from.

...

further arguments passed to or from other methods.

Details

The tail probability is estimated by applying the standard Rao-Blackwellized estimator on the Gibbs sampling realizations obtained through the estim.gsm or estim.gsm_theta procedures.

Value

A numerical vector containing the posterior draws for the tail probability exceeding the value of thresh.

Author(s)

Sergio Venturini sergio.venturini@unibocconi.it

References

Venturini, S., Dominici, F. and Parmigiani, G. (2008), "Gamma shape mixtures for heavy-tailed distributions". Annals of Applied Statistics, Volume 2, Number 2, 756–776. http://projecteuclid.org/euclid.aoas/1215118537

See Also

estim.gsm, estim.gsm_theta, predict-methods, plot-methods.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
set.seed(2040)
y <- rgsm(500, c(.1, .3, .4, .2), 1)
burnin <- 5
mcmcsim <- 10
J <- 250
gsm.out <- estim.gsm(y, J, 300, burnin + mcmcsim, 6500, 340, 1/J)
thresh <- c(0.1, 0.5, 0.75, 1, 2)
tail.prob.est <- tail.prob.true <- rep(NA, length(thresh))
for (i in 1:length(thresh)){
   tail.prob.est[i] <- mean(predict(gsm.out, thresh[i]))
   tail.prob.true[i] <- sum(y > thresh[i])/length(y)
}
qqplot(tail.prob.true, tail.prob.est, main = "Q-Q plot of true vs. estimated tail probability")
abline(0, 1, lty = 2)

GSM documentation built on May 1, 2019, 8:02 p.m.