Learn R Programming

fields (version 5.02)

bplot.xy: Boxplots for conditional distribution

Description

Draws boxplots for y by binning on x. This gives a coarse, but quick, representation of the conditional distrubtion of [Y|X] in terms of boxplots.

Usage

bplot.xy(x, y, N = 10, breaks = pretty(x, N, eps.correct = 1),
         style = "tukey", outlier = TRUE, plot = TRUE, xaxt =
         "s", ...)

Arguments

See Also

bplot, draw.bplot

Examples

Run this code
# condition on swim times to see how run times vary
bplot.xy( minitri$swim, minitri$run, N=5)

# bivariate normal corr= .6
set.seed( 123)
x<-rnorm( 2000)
y<- .6*x +  sqrt( 1- .6**2)*rnorm( 200)
#
#
bplot.xy( x,y, breaks=seq( -3, 3,,15) ,xlim =c(-4,4), ylim =c(-4,4))
points( x,y, pch=".", col=3)

Run the code above in your browser using DataLab