plot.dynin | R Documentation |
Plot of dynamic (i.e. successive) cross-sectional summaries of an individual index. The successive values of the individual index for all sequences should be collected in a dynin
table as produced by seqindic.dyn
.
## S3 method for class 'dynin'
plot(x, fstat=weighted.mean, group=NULL, conf=FALSE,
main="auto", col=NULL, lty=NULL, lwd=3.5, ylim=NULL,
ylab=NULL, xlab=NULL, xtlab=NULL, xtstep=NULL, tick.last=NULL,
with.legend=TRUE, glabels=NULL, legend.pos="topright",
horiz=FALSE, cex.legend=1, bcol=NULL, na.rm=FALSE, ret=FALSE, ...)
x |
object of class |
fstat |
function: summary function to compute the values plotted. Default is |
group |
factor or discrete vector: group membership; a curve is drawn for each group. If |
conf |
logical or numeric: If logical, should confidence bands be displayed? If numeric, confidence probability. |
main |
character string: Plot title. Default is "auto" that prints a default title. Set as |
col |
color vector. Group line colors. If |
lty |
string vector. Group line types (see |
lwd |
integer vector: Group line widths (see |
ylim |
pair of numerics defining the range for the y-axis. If left |
ylab |
character string: y axis label. |
xlab |
character string: x axis label. |
xtlab |
vector of strings defining the x-axis tick labels. If |
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. |
bcol |
color vector. For confidence bands. If |
na.rm |
logical. When |
ret |
logical: Should the plotted values be returned? |
... |
additional plot parameters (see |
Together with seqindic.dyn
this function implements the dynamic sequence analysis approach of Pelletier et al. (2020).
The function first computes the summary table using the fstat
function. Each row of the summary table is then plotted as a line, except rows that contain NA
s. Setting na.rm=TRUE
helps sometimes to prevent some NA
s in the summary table.
Confidence bands are computed for a confidence level of 95% and assuming a normal distribution.
If ret=TRUE
, a matrix with the successive group summaries (One row per group) and, when conf=TRUE
, the matrices with the lower and upper bounds of the confidence intervals as attributes L.grp
and U.grp
.
Gilbert Ritschard
Pelletier, D., Bignami-Van Assche, S., & Simard-Gendron, A. (2020) Measuring Life Course Complexity with Dynamic Sequence Analysis, Social Indicators Research \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11205-020-02464-y")}.
See Also seqindic.dyn
(with examples)
## See examples on 'seqindic.dyn' help page
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.