plot-methods: Plots of an instance of 'mhmmresults'

Description Usage Arguments Examples

Description

Plots of an instance of mhmmresults

Usage

1
2
3
4
## S4 method for signature 'mhmmresults,numeric'
plot(x, y,
  col = x@partitions$states[[y]], xlab = "Time", ylab = "Activity",
  ylim = range(na.omit(x@data@yi[[y]])))

Arguments

x

instance of mhmmresults.

y

numeric index of the subject to visualize.

col

numeric indicates the latent state at each time (length must be equal to the length of x)

xlab

character label of the x-axis

ylab

character label of the y-axis

ylim

numeric range of the y-axis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(accelero)
# To make the estimation <5
res <- mhmm(accelero, K = 2, M = 4, nbcores = 1, nbinit = 5, iterSmall = 2)
plot(res, 1)

 
data(accelero)
# It is better to increase the number of random initializations
res <- mhmm(accelero, K = 2, M = 4, nbcores = 1)
plot(res, 1)

MHMM documentation built on March 26, 2020, 7:46 p.m.