plotlba | R Documentation |
S3 methods for lba
objects.
## S3 method for class 'lba.1d'
plotlba(x,
height.line = NULL,
xlab = NULL,
ylab = NULL,
ylim = NULL,
args.legend = NULL,
labels.points = NULL,
col.points = par('col'),
col.lines = par('col'),
lty.lines = par('lty'),
lwd.lines = par('lwd'),
pch.budget = par('pch'),
col.budget = par('fg'),
lty.budget = par('lty'),
lwd.budget = par('lwd'),
colline.budget = NULL,
with.ml = c("mix","lat"),
...)
## S3 method for class 'lba.2d'
plotlba(x,
axis.labels = NULL,
labels.points = NULL,
col.points = par('fg'),
pch.budget = par('pch'),
col.budget = par('fg'),
lty.budget = par('lty'),
lwd.budget = par('lwd'),
colline.budget = par('fg'),
args.legend = NULL,
with.ml = c("mix","lat"),
...)
x |
A object of |
height.line |
Is a vector with the lines height when |
xlab |
A title for the x axis. |
ylab |
A title for the y axis. |
ylim |
The y limits of the plot. |
args.legend |
List of additional arguments to be passed to |
axis.labels |
Labels for the three axes in the order left, right, bottom. Defaults to the column names. |
labels.points |
A character vector or expression specifying the text to be written. The default is |
col.points |
A |
col.lines |
A |
lty.lines |
A |
lwd.lines |
A |
pch.budget |
A |
col.budget |
A |
lty.budget |
A |
lwd.budget |
A |
colline.budget |
The colors for line budget. The default is |
with.ml |
What's parameters do you like to plot? The default is mixing parameters ( |
... |
Other graphical parameters may also be passed as arguments to these functions. |
The plotlba
function, was suggested at de Leeuw et all (1990) and at van der Ark (1999) thesis. Those types of plots have only graphical views for K = 2
and K = 3
. When K = 2
, either the latent budgets or the mixing parameters are displayed on a (one dimensional) line segment. When K = 3
, either the latent budgets or the mixing parameters are displayed in a equilateral triangle using a barycentric coordinate system where the budgets are represented by the vertices and the plot is made with help of triax.plot
and triax.points
function of plotrix package.
Enio G. Jelihovschi (eniojelihovs@gmail.com)
Ivan Bezerra Allaman (ivanalaman@gmail.com)
de Leeuw, J., van der Heijden, P.G.M., and Verboon, P. 1990. "A latent time budget model". Statistica Neerlandica. 44, 1, 1-21.
van der Ark, A. L. 1999. Contributions to Latent Budget Analysis, a tool for the analysis of comositional data. Ph.D. Thesis University of Utrecht.
triax.plot
, triax.points
.
data('votB')
#K = 2
ex1 <- lba(parties ~ city,
data=votB,
K = 2)
plotlba(ex1)
#It's very simple. With colors!
plotlba(ex1,
col.points = 1:6,
col.lines = 1:6)
#Add title in plot!
plotlba(ex1,
main='Mixing parameters')
#Change budget proportion!
plotlba(ex1,
pch.budget = 23,
col.budget = 9,
colline.budget = 8,
lwd.budget = 2,
lty.budget = 2)
#A little more!
plotlba(ex1,
xlab = 'Lb2 -> Lb1',
height.line = rep(0.5,6),
lty.lines = 2,
args.legend = list(ncol=3))
## Not run:
#K = 3
data(MANHATAN)
tbm <- xtabs(value ~ socecon+health,
MANHATAN)
ex2 <- lba(tbm,
K = 3)
plotlba(ex2)
#A little more!
plotlba(ex2,
labels.points = rownames(tbm),
col.points = 2:7,
args.legend = list(plot=F))
plotlba(ex2,
col.points = 3:8,
col.budget = 2,
pch.budget = 20,
lty.budget = 2,
lwd.budget = 3,
colline.budget = 3,
axis.labels = c('Lba1','Lba2','Lba3'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.