plot.rv: Plotting Scatterplots of Random Variable Objects

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

Description

Draw a "random scatter plot" or random points as horizontal or vertical intervals.

Usage

1
2
## S3 method for class 'rv'
plot(x, y = NULL, ...)

Arguments

x

an rv object

y

random or fixed vector

...

other arguments passed on to plot

Details

If a component x is fixed and the corresponding component of y is random, the resulting ‘point’ is a vertical uncertainty ('credible') interval. NOTE. You must call plot.rv explicitly to obtain this behavior.

If a component y is fixed and the corresponding component of x is random, the resulting ‘point’ is a horizontal uncertainty ('credible') interval.

If a component of x and the corresponding component of y is random, the resulting ‘point’ is a scatterplot of simulations from the joint distribution of code(x,y).

Compatible with objects of class ‘rvsummary’.

Author(s)

Jouni Kerman jouni@kerman.com

References

Kerman, J. and Gelman, A. (2007). Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Statistics and Computing 17:3, 235-244.

See also vignette("rv").

See Also

mlplot

Examples

1
2
3
4
5
6
7
8
9
  x <- as.rv(1:30)
  y <- rvnorm(mean=x, sd=1)
  ## Not run: plot(x, y)
  ## Not run: plot(y, x)
  ## Not run: plot(y)
  y <- as.rvsummary(x)
  ## Not run: plot(x, y)
  ## Not run: plot(y, x)
  ## Not run: plot(y)

jsta/rv documentation built on Feb. 12, 2022, 5:13 p.m.