trmatplot.march.Dcmm: Transition Matrix Plot for march.Dcmm objects

Description Usage Arguments Details Value Author(s) References See Also

Description

A coordinate plot which maps each element in the probability transition matrix (of any order) as a line, where each line is weighted by probability. Users can apply filters to emphasize the most (or least) probable state sequences overall, or by initial state. Various color palettes using the Hue-Chroma-Luminance color scheme can be easily selected by the user. Input is an object of class march.Dcmm which is the output of march.dcmm.construct.

Usage

1
2
3
4
5
6
7
## For class 'march.Dcmm'

march.Dcmm.trmatplot ( d, seed = NULL, type = "hidden", hstate = 1,
cspal = NULL, cpal = NULL, main = NULL, xlab = NULL,
ylab = NULL, ylim = NULL, xtlab = NULL, ytlab = NULL, 
pfilter = NULL, shade.col = "grey80", num = NULL, hide.col = NULL, 
lorder = NULL, plot = TRUE, verbose = FALSE, ...)

Arguments

d

Object to be plotted. A march.Dcmm object.

seed

A single value, interpreted as an integer, or NULL (default). See Details.

type

Character string. Can be specified as either "hidden", if the hidden matrix is to be plotted (default) or as "visible" if the visible matrix is to be plotted.

hstate

Numeric. Valid when type = "visible". Specifies from which hidden state the (visible) probability transition matrix should be plotted. Default hstate = 1.

cspal

A color palette that can be specified as one of: "dynamic", "harmonic", "cold", "warm", "heat", "terrain". The rainbow_hcl, heat_hcl, and terrain_hcl commands are used to generate color palettes. See Examples in trmatplot.

cpal

Color palette vector when coloring probability sequences. The rainbow_hcl command is used to generate a color palette if none is specified.

main

Title for the graphic. Default is Probability Transition Matrix.

xlab

Label for the x axis. Default is Time.

ylab

Label for the y axis. Default is States.

ylim

Numeric vector of length 2 giving the y coordinates range.

xtlab

Label for the x axis ticks. Default is time (t, t+1,...).

ytlab

Labels for the y axis ticks.

pfilter

Probability filter. Can be specified as one of "tmax", "tmin", "smax", "smin". See Details.

shade.col

The color for sequences shaded out using the pfilter argument. Default is "grey80". See Details.

num

Numeric. The number of sequences to be highlighted, a whole number from 1 to length(d) - 1. Must be specified only when using pfilter="tmax" or pfilter="tmin". Default is NULL.

hide.col

The color for sequences shaded out using the filter argument. Default is "grey80". See Details.

lorder

Line order. Either "background" or "foreground". When pfilter is used lorder is set by default.

plot

Logical. Should the object be plotted. Default is TRUE.

verbose

Logical. Reports extra information on progress. Default is FALSE.

...

Additional arguments, such as graphical parameters, to be passed on. See par and seqpcplot.

Details

Setting a seed allows the graphic to be replicated.

The pfilter argument serves to highlight probability sequences that are either most probable while shading out those that are less probable in shade.col and vice-versa. The four options for pfilter are described below, and are illustrated in Examples in trmatplot.

"smax"

For each initial state the most probable next state is highlighed.

"smin"

For each initial state the least probable next state is highlighed.

"tmax"

The sequence of states with the highest probability overall is highlighed. To highlight the n most probable sequences of states, set num = n.

"tmin"

The sequence of states with the lowest probability overall is highlighed. To highlight the n least probable sequences of states, set num = n.

The filter and hide.col arguments are inherent in and may be passed on to seqpcplot. The filter argument serves to specify filters to gray less interesting patterns. The filtered-out patterns are displayed in the hide.col color. The filter argument expects a list with at least elements type and value. Most relevant within the context of probabilities is type = "sequence", which highlights the specific pattern. See Examples in trmatplot.

Value

trmatplot returns an object of class trmatplot. Some of the arguments are inherent in par and seqpcplot.

Author(s)

Pauline Adamopoulou

References

Buergin, R. and G. Ritschard (2014), "A decorated parallel coordinate plot for categorical longitudinal data", The American Statistician. Vol. 68(2), pp. 98-103.

Zeileis, A.; Hornik, K. and P. Murrell (2009), "Escaping RGBland: Selecting Colors for Statistical Graphics", Computational Statistics & Data Analysis. Vol. 53, pp. 3259-3270.

See Also

trmatplot, trmatplot.default, trmatplot.depmix.fitted, trmatplot.array, seqpcplot, par.


MmgraphR documentation built on May 2, 2019, 3:10 p.m.