plot.dmm: Plot a drifting Markov model

View source: R/methods.R

plot.dmmR Documentation

Plot a drifting Markov model

Description

Plots the transition probabilities, or the stationary laws of the states, along the sequence.

Usage

## S3 method for class 'dmm'
plot(
  x,
  what = c("transition", "stationary"),
  contexts = NULL,
  npoints = 200,
  ...
)

Arguments

x

An object of class dmm

what

Default="transition". If what="transition", one panel is drawn for each context (word of length order), giving the probabilities of the next state along the sequence; if what="stationary", the stationary laws of the states are drawn along the sequence

contexts

(Optional) The contexts (rows of the transition matrices) to draw when what="transition"; by default all of them, at most 16

npoints

Default=200. Number of positions at which the curves are evaluated

...

Graphical parameters passed to matplot

Value

Invisibly, a list with the positions and the plotted values (an array [position, context, state] for what="transition", a matrix [position, state] for what="stationary")

See Also

getTransitionMatrix, getStationaryLaw

Examples

data(lambda, package = "drimmR")
x <- fitdmm(lambda, 1, 1, c("a", "c", "g", "t"), init.estim = "freq")
plot(x)
plot(x, what = "stationary")

drimmR documentation built on Dec. 2, 2026, 1:07 a.m.