Plotting superposed transversal-entropy curves

Share:

Description

Functions to plot, in a same frame, transversal-entropy curves by group or multiple curves.

Usage

1
2
3
4
5
6
7
8
9
seqplot.tentrop(seqdata, group, title=NULL,
    col=NULL, lty=NULL, lwd=3.5, ylim=NULL, xtlab=NULL,
    xtstep=NULL, withlegend=TRUE, glabels=NULL,
    legendpos="topright", horiz=FALSE, cex.legend=1, ...)

seqplot.tentrop.m(seqdata.list, title=NULL,
    col=NULL, lty=NULL, lwd=3.5, ylim=NULL, xtlab=NULL,
    xtstep=NULL, withlegend=TRUE, glabels=NULL,
    legendpos="topright", horiz=FALSE, cex.legend=1, ...)

Arguments

seqdata

a state sequence object (see seqdef).

seqdata.list

a list of state sequence objects.

group

a factor giving the group membership of each sequence in seqdata.

title

a character string giving the title of the graphic; if NULL, a default title is printed.

col

a vector of colors for the different curves.

lty

a vector of line types for the different curves. See lines.

lwd

numeric or vector of numerics: width of curve lines. See lines.

ylim

pair of numerics defining the range for the y-axis. If left NULL, the limits are defined from the data.

xtlab

vector of strings defining the x-axis tick labels.

xtstep

integer: step between tick marks on the x-axis.

glabels

a vector of strings with the curve labels. If NULL curves are labeled with the levels of the group variable or, for seqplot.tentrop.m, as seq1, seq2, ...

withlegend

logical: Should the legend be plotted. Default is TRUE.

legendpos

legend position: default is "topright". Seelegend .

horiz

logical: Should the legend be displayed horizontally. Set as FALSE by default, i.e., legend is displayed vertically.

cex.legend

Scale factor for the legend.

...

additional plot parameters (see par).

Details

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.

See Also

seqHtplot for an alternative way of plotting the transversal entropies and seqstatd to get the values of the entropies.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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, legendpos="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,
    title="Women, by father's social status", legendpos="bottomright")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.