pwlrPlot | R Documentation |
Creates a matrix of plots, with each pairwise logratio against a covariable. The covariable can be numeric or factor, and play the role of X or Y axis.
pwlrPlot(x,y,...,add.line=FALSE,line.col=2,add.robust=FALSE,rob.col=4)
x |
a vector, a column of a data.frame, or an acomp representing the first set
of things to be displayed. Either |
y |
a vector, a column of a data.frame, or an acomp representing the first set
of things to be displayed. Either |
... |
furter parameters to the panel function |
add.line |
logical, to control the addition of a regression line in each panel. Ignored if covariable is a factor. |
line.col |
in case the regression line is added, which color should be used? Defaults to red. |
add.robust |
logical, to control the addition of a robust regression line
in each panel. Ignored if covariable is a factor. This is nowadays
based on |
rob.col |
in case the robust regression line is added, which color should be used? Defaults to blue. |
This function generates a matrix of plots of all possible pairwise
logratios of the acomp
argument, plotted against a covariable. The
covariable can be a factor or a numeric vector, or a column of a matrix or data.frame.
Covariable and composition can both be represented in X or Y axis:
a factor on X axis generates a boxplot
; a factor on Y axis generates a
spineplot
; if the covariable is numeric, a default scatterplot is generated.
All dot arguments are passed to these plotting functions. In any of these cases, the diagram
shows the logratio of the component in the row divided by the component in
the column. In the case of a numeric covariable, both classical and
robust regression lines can be added.
Raimon Tolosana-Delgado, K.Gerald v.d. Boogaart http://www.stat.boogaart.de
Boogaart, K.G. v.d. , R. Tolosana (2008) Mixing Compositions and Other scales, Proceedings of CodaWork 08.
https://ima.udg.edu/Activitats/CoDaWork03/
https://ima.udg.edu/Activitats/CoDaWork05/
https://ima.udg.edu/Activitats/CoDaWork08/
plot.aplus
, pairwisePlot
, boxplot
, spineplot
, plot.default
data(Hydrochem)
xc = acomp(Hydrochem[,c("Ca","Mg","Na","K")])
fk = Hydrochem$River
pH = -log10(Hydrochem$H)
## x=acomp, y=factor
pwlrPlot(xc, fk, border=2:5)
## x=factor, y=acomp
pwlrPlot(fk,xc, col=2:5)
## x=acomp, y=numeric, with colors by river
pwlrPlot(xc, pH, col=as.integer(fk)+1)
## x=numeric, y=acomp, with line
pwlrPlot(pH, xc, add.robust=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.