Adds a sample of line segments randomly drawn from the joint distribution of
(x,y)
.
# S3 method for rv
lines(x, y, type = "l", ...)
coordinate vectors of points to join
character indicating the type of plotting, currently 'l' and 'p' are the only possibilities
further arguments passed to points
The size of the sample (number of segments drawn) is determined by
rvpar(line.sample)
.
lines.rv
is implemented as part of points.rv
.
See points.rv
for details of the parameters.
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")
.
if (FALSE) {
x <- as.rv(1:10)
y <- rvnorm(mean=x)
par(mfrow=c(2,2))
plot(x, y, type="b", main="Intervals and random lines", rvcol="blue", col="gray")
plot(x, y, type="l", main="Only random lines", col="gray")
plot(x, E(y), type="b", main="Means, connected by a constant line", col="gray")
plot(x, rvmedian(y), type="b", pch=19, main="Median & middle 95 pc CI band", col="darkgray")
lines(rvquantile(y, 0.025), col="gray")
lines(rvquantile(y, 1-0.025), col="gray")
}