seqplot.tentrop | R Documentation |
Functions to plot, in a same frame, transversal-entropy curves by group or multiple curves.
seqplot.tentrop(seqdata, group, main="auto",
col=NULL, lty=NULL, lwd=3.5, ylim=NULL, xtlab=NULL,
xtstep=NULL, tick.last=NULL, with.legend=TRUE, glabels=NULL,
legend.pos="topright", horiz=FALSE, cex.legend=1, ...)
seqplot.tentrop.m(seqdata.list, main="auto",
col=NULL, lty=NULL, lwd=3.5, ylim=NULL, xtlab=NULL,
xtstep=NULL, tick.last=NULL, with.legend=TRUE,
glabels=names(seqdata.list),
legend.pos="topright", horiz=FALSE, cex.legend=1, ...)
seqdata |
a state sequence object (see |
seqdata.list |
a list of state sequence objects. |
group |
a factor giving the group membership of each sequence in |
main |
a character string giving the title of the graphic; if |
col |
a vector of colors for the different curves. |
lty |
a vector of line types for the different curves. See |
lwd |
numeric or vector of numerics: width of curve lines. See |
ylim |
pair of numerics defining the range for the y-axis. If left |
xtlab |
vector of strings defining the x-axis tick labels. |
xtstep |
integer: step between tick marks on the x-axis. If unspecified, attribute |
tick.last |
logical. Should a tick mark be enforced at the last position on the x-axis? If unspecified, attribute |
glabels |
a vector of strings with the curve labels. If |
with.legend |
logical: Should the legend be plotted. Default is |
legend.pos |
legend position: default is |
horiz |
logical: Should the legend be displayed horizontally. Set as |
cex.legend |
Scale factor for the legend. |
... |
additional plot parameters (see |
Use seqplot.tentrop
to plot curves of transversal entropies by groups of a same set of sequences, e.g. professional careers by sex.
Use seqplot.tentrop.m
to plot multiple curves of transversal entropies corresponding to different sets of sequences such as sequences describing cohabitational and sequences describing occupational trajectories.
Number k
of survival curves plotted.
seqHtplot
for an alternative way of plotting the transversal entropies and seqstatd
to get the values of the entropies.
## Using the biofam data which has sequences from
## ages 15 to 30 years in columns 10 to 25
data(biofam)
biofam <- biofam[1:200,]
biofam.seq <- seqdef(biofam[,10:25], xtlab=as.character(15:30), xtstep=3)
## Plotting transversal entropies by sex
seqplot.tentrop(biofam.seq, group=biofam$sex, legend.pos="bottomright")
slist <- list(woman = biofam.seq[biofam$sex=="woman",],
man = biofam.seq[biofam$sex=="man",])
seqplot.tentrop.m(slist, legend.pos="bottomright")
## Plotting transversal entropies for women
## by father's social status
group <- biofam$cspfaj[biofam$sex=="woman"]
seqplot.tentrop(biofam.seq[biofam$sex=="woman",], group=group,
main="Women, by father's social status", legend.pos="bottomright")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.