Description Usage Arguments Details Value References See Also Examples
View source: R/sample_diagnostics.R
plot
method for class "evpost". For d = 1
a histogram of the
simulated values is plotted with a the density function superimposed.
The density is normalized crudely using the trapezium rule. For
d = 2
a scatter plot of the simulated values is produced with
density contours superimposed. For d > 2
pairwise plots of the
simulated values are produced.
An interface is also provided to the functions in the bayesplot
package that produce plots of Markov chain Monte Carlo (MCMC)
simulations. See MCMCoverview for details of these
functions.
1 2 3 4 5 6  ## S3 method for class 'evpost'
plot(x, y, ..., n = ifelse(x$d == 1, 1001, 101),
prob = c(0.5, 0.1, 0.25, 0.75, 0.95, 0.99), ru_scale = FALSE,
rows = NULL, xlabs = NULL, ylabs = NULL, points_par = list(col = 8),
pu_only = FALSE, add_pu = FALSE, use_bayesplot = FALSE,
fun_name = c("areas", "intervals", "dens", "hist", "scatter"))

x 
An object of class "evpost", a result of a call to

y 
Not used. 
... 
Additional arguments passed on to 
n 
A numeric scalar. Only relevant if

prob 
Numeric vector. Only relevant for d = 2. The contour lines are drawn such that the respective probabilities that the variable lies within the contour are approximately prob. 
ru_scale 
A logical scalar. Should we plot data and density on the scale used in the ratioofuniforms algorithm (TRUE) or on the original scale (FALSE)? 
rows 
A numeric scalar. When 
xlabs, ylabs 
Numeric vectors. When 
points_par 
A list of arguments to pass to

pu_only 
Only produce a plot relating to the posterior distribution
for the threshold exceedance probability p. Only relevant when

add_pu 
Before producing the plots add the threshold exceedance
probability p to the parameters of the extreme value model. Only
relevant when 
use_bayesplot 
A logical scalar. If 
fun_name 
A character scalar. The name of the bayesplot function,
with the initial 
For details of the bayesplot functions available when
use_bayesplot = TRUE
see MCMCoverview and
the bayesplot vignette
Plotting MCMC draws.
Nothing is returned unless use_bayesplot = TRUE
when a
ggplot object, which can be further customized using the
ggplot2 package, is returned.
Jonah Gabry (2016). bayesplot: Plotting for Bayesian Models. R package version 1.1.0. https://CRAN.Rproject.org/package=bayesplot
summary.evpost
for summaries of the simulated values
and properties of the ratioofuniforms algorithm.
MCMCoverview
,
MCMCintervals
,
MCMCdistributions
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38  ## GP posterior
data(gom)
u < stats::quantile(gom, probs = 0.65)
fp < set_prior(prior = "flat", model = "gp", min_xi = 1)
gpg < rpost(n = 1000, model = "gp", prior = fp, thresh = u, data = gom)
plot(gpg)
## Not run:
# Using the bayesplot package
plot(gpg, use_bayesplot = TRUE)
plot(gpg, use_bayesplot = TRUE, pars = "xi", prob = 0.95)
plot(gpg, use_bayesplot = TRUE, fun_name = "intervals", pars = "xi")
plot(gpg, use_bayesplot = TRUE, fun_name = "hist")
plot(gpg, use_bayesplot = TRUE, fun_name = "dens")
plot(gpg, use_bayesplot = TRUE, fun_name = "scatter")
## End(Not run)
## binGP posterior
data(gom)
u < quantile(gom, probs = 0.65)
fp < set_prior(prior = "flat", model = "gp", min_xi = 1)
bp < set_bin_prior(prior = "jeffreys")
npy_gom < length(gom)/105
bgpg < rpost(n = 1000, model = "bingp", prior = fp, thresh = u,
data = gom, bin_prior = bp, npy = npy_gom)
plot(bgpg)
plot(bgpg, pu_only = TRUE)
plot(bgpg, add_pu = TRUE)
## Not run:
# Using the bayesplot package
dimnames(bgpg$bin_sim_vals)
plot(bgpg, use_bayesplot = TRUE)
plot(bgpg, use_bayesplot = TRUE, fun_name = "hist")
plot(bgpg, use_bayesplot = TRUE, pars = "p[u]")
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.