Description Usage Arguments Value Examples
Calculates the probability of an obervations occurring in a 2D cell using HPDregionplot Given a sample calculates the bivariate region of highest marginal posterior density for two variables, using kde2d from MASS to calculate a bivariate density.
1 2 |
x |
a vector |
y |
a vector |
prob |
probability levels |
n |
number of points at which to evaluate the density grid |
h |
bandwidth of 2D kernel smoother (previous default value was c(1,1), which worked poorly with some plots with very small scales; if not specified, defaults to values in kde2d) |
lims |
limits, specified as (x.lower,x.upper,y.lower,y.upper) (passed to kde2d) |
na.rm |
logical; if true, any NA and NaN's are removed from x before calculations |
a data.frame
with three variables
x, y
coordinates of the grid points, vectors of length n.
level
contours corresponding to prob
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.