Skip to content
Prev 39405 / 398500 Next

Confidence ellipse for correlation

On Tue, 28 Oct 2003, Tanya Murphy wrote:

            
Depends on whose theory you have in mind!  This is not `a confidence
ellipse for the correlation coefficient', as confidence ellipses are for
pairs of parameters, not variables.  It seems to be a plot of a contour of
the fitted bivariate normal.
You could do things like
mxy <- mean(Puromycin[c("rate", "conc")])
sxy <- sapply(Puromycin[c("rate", "conc")], sd)
Yes.  You need a 2D density estimate (e.g. kde2d in MASS) then compute the
density values at the points and draw the contour of the density which
includes 95% of the points (at a level computed from the sorted values via
quantile()).