CIplot_biv: Bivariate confidence and data ellipses In easyCODA: Compositional Data Analysis in Practice

Description

Draws confidence and data ellipses in bivariate scatterplots

Usage

 1 2 3 4 5 6 CIplot_biv(x, y, group, wt=rep(1/length(x),length(x)), varnames=c("x","y"), groupnames=sort(unique(group)), groupcols=rainbow(length(unique(group))), shownames=TRUE, xlim=c(NA,NA), ylim=c(NA,NA), lty=1, lwd=1, add=FALSE, alpha=0.95, ellipse=0, shade=FALSE, frac=0.01, cex=1)

Arguments

 x x-variable (horizontal) of scatterplot y y-variable (vertical) of scatterplot group Grouping variable wt Set of weights on the cases (operates when ellipse=1) varnames Vector of two labels for the axes (default is x and y) groupnames Vector of labels for the groups (default is 1, 2, etc...) groupcols Vector of colours for the groups shownames Whether to show group names at group centroids or not (default is TRUE) xlim Possible new x-limits for plot ylim Possible new y-limits for plot lty Line type for the ellipses (default is 1) lwd Line width for the ellipses (default is 1) add =TRUE if ellipses/intervals are added to existing plot (default is FALSE) alpha Confidence level of ellipses (default is 0.95) ellipse Type of ellipse (see Details below; default is 0 for normal-based ellipses) shade =TRUE for ellipse shading (default=FALSE) frac Proportional part defining the width of the bars at the edges of confidence intervals (for ellipse=3 and 4) cex Character expansion factor for group names

Details

The function CIplot_biv makes various types of confidence and data ellipses, according to option ellipse. Set ellipse<0 for regular data-covering ellipses. Set ellipse=0 (default) for normal-theory confidence ellipses. Setellipse=1 for bootstrap confidence ellipses. The option ellipse=2 for the delta method is not implemented yet. Set ellipse=3 for normal-theory confidence error bars lined up with axes. Set ellipse=4 for bootstrap confidence error bars along axes. The package ellipse is required.

Author(s)

Michael Greenacre

References

Greenacre, M. (2016), Data reporting and visualization in ecology, Polar Biology, 39:2189-2205.