Learn R Programming

TraMineR (version 2.2-10)

plot.seqdiff: Plotting a seqdiff object.

Description

Plot method for the sliding values returned by seqdiff. Plots a statistic (the Pseudo R2 by default) along the position axis.

Usage

# S3 method for seqdiff
plot(x, stat = "Pseudo R2", type = "l", ylab = stat,
  xlab = "", legend.pos = "top", ylim = NULL, xaxis = TRUE, col = NULL,
  xtstep = NULL, tick.last = NULL, legendposition, xaxt, ...)

Arguments

x

an object produced by seqdiff

stat

character. Name of the statistic to be plotted. Can be any of the statistics returned by seqdiff or "discrepancy". See details.

type

the line type, see lines

ylab

character: y-axis label.

xlab

character: x-axis label.

legend.pos

character: position of the line legend, see legend

ylim

numeric: if not NULL, range of the y-axis.

xaxis

logical: if TRUE an x-axis is plotted.

col

list of colors to use for each line.

xtstep

integer: optional step between tick-marks and labels on the x-axis. If unspecified, the xtstep attribute of the sequence object x is used. (see seqdef)

tick.last

Logical. Should a tick mark be enforced at the last position on the x-axis? If unspecified, the tick.last attribute of the x object is used.

legendposition

Deprecated. Use legend.pos instead.

xaxt

Deprecated. Use xaxis instead.

...

Additional parameters passed to lines

Author

Matthias Studer (with Gilbert Ritschard for the help page)

Details

The function plots the sliding values of the requested statistic.

You can plot the evolution of two statistics by providing for instance stat=c("Pseudo R2", "Levene").

Use stat="discrepancy" to plot the within-discrepancies.

For "discrepancy", a separate line is drawn for the whole set of sequences and for each group. Those two values cannot be paired with another statistic.

See Also

seqdiff