Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

joint.pr.plot

Joint Probability Region Plot


Description

Given two vectors, the joint.pr.plot function creates a scatterplot with ellipses of probability regions.

Usage

joint.pr.plot(x, y, quantiles=c(0.25,0.50,0.75,0.95))

Arguments

x

This required argument is a vector.

y

This required argument is a vector.

quantiles

These are the quantiles for which probability regions are estimated with ellipses. The center of the ellipse is plotted by default. The 0.95 quantile creates a probability region that contains approximately 95% of the data or samples of x and y. By default, four quantiles are included.

Details

A probability region is also commonly called a credible region. For more information on probability regions, see p.interval.

Joint probability regions are plotted only for two variables, and the regions are estimated with functions modified from the car package. The internal ellipse functions assume bivariate normality.

This function is often used to plot posterior distributions of samples, such as from the LaplacesDemon function.

Author(s)

See Also

Examples

library(LaplacesDemon)
x <- rnorm(100)
y <- rnorm(100)
joint.pr.plot(x, y)

LaplacesDemon

Complete Environment for Bayesian Inference

v16.1.4
MIT + file LICENSE
Authors
Byron Hall [aut], Martina Hall [aut], Statisticat, LLC [aut], Eric Brown [ctb], Richard Hermanson [ctb], Emmanuel Charpentier [ctb], Daniel Heck [ctb], Stephane Laurent [ctb], Quentin F. Gronau [ctb], Henrik Singmann [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.