Description Usage Arguments Details Value Author(s) References See Also Examples
plot
method for class "gsm". This function plots the output of a Gamma Shape Mixture estimation procedure.
1 2 3 |
x |
object of class "gsm"; a list returned by the |
ndens |
number of simulated density curves to plot. |
xlab |
a title for the x axis. |
ylab |
a title for the y axis. |
nbin |
number of bins for the histogram. |
histogram |
logical; if TRUE the histogram is plotted on the figure. |
bands |
logical; if TRUE the 95% credibility bands are overimposed on the density graph. |
confid |
confidence level for the pointwise credibility bands around the density estimate. |
start |
MCMC run to start from. |
... |
further arguments passed to or from other methods. |
To produce a standard histogram with the estimated density curve superimposed on it, simply set ndens
to 0 and histogram
to TRUE
.
List with the following components:
xval |
horizontal coordinates. |
yval |
vertical coordinates (pointwise density posterior means). |
Sergio Venturini sergio.venturini@unibocconi.it
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
estim.gsm
,
estim.gsm_theta
,
summary-methods
,
predict-methods
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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)
par(mfrow = c(3, 2))
plot(gsm.out)
plot(gsm.out, ndens = 0, nbin = 20, start = (burnin + 1))
plot(gsm.out, ndens = 0, nbin = 20, histogram = TRUE, start = (burnin + 1))
plot(gsm.out, ndens = 0, nbin = 20, histogram = TRUE, bands = TRUE, start = (burnin + 1))
plot(gsm.out, ndens = 5, nbin = 20, histogram = TRUE, bands = TRUE, start = (burnin + 1))
plot(gsm.out, ndens = 0, nbin = 20, bands = TRUE, start = (burnin + 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.