plot.eglhmm {eglhmm} | R Documentation |
Plot the results of an eglhmm fit.
Description
For each specified model cell plot an array, with one panel
for each state, of the probability mass or density functions
corresponding to the given cell and state. The plots are
produced with type="h"
for probability mass functions,
and with type="l"
for probability density functions.
Usage
## S3 method for class 'eglhmm'
plot(x, ..., wcells = NULL, col = "red",
nrnc = NULL, ntop = NULL, xlab = NULL, ylab = NULL,
xlim = NULL, ylim = NULL, main = NULL, cex.main = 1.5)
Arguments
x |
An object of class |
... |
Not used. |
wcells |
Character vector specifying the cells of the model to be plotted.
Defaults to all cells (i.e. the levels of |
col |
The colour for the (vertical) lines of the plots. |
nrnc |
An integer vector of length two specifying the dimenions of the
array of plots that is produced. The first entry is the number
of rows, the second the number of columns. The product of the
entries must be greater than or equal to |
ntop |
The largest |
xlab |
An optional label for the |
ylab |
An optional label for the |
xlim |
An optional vector of length two, specifying the |
ylim |
An optional vector of length two, specifying the |
main |
Optional character vector specifying overall titles for each
array panel of plots. Defaults to the names of the model cells.
If the length of |
cex.main |
Expansion factor for the text in the main title (determining
the size of the text). Ignored if |
Details
If plotting is interactive, then the arrays of plots are displayed
one at a time, and (except for the last of the plots) the user is
prompted with the string "Go?"
after each array is plotted.
Press <return>
to see the next plot.
Value
None.
Author(s)
Rolf Turner rolfturner@posteo.net
See Also
eglhmm()
Examples
loc4 <- c("LngRf","BondiE","BondiOff","MlbrOff")
SCC4 <- SydColCount[SydColCount$locn %in% loc4,]
SCC4$locn <- factor(SCC4$locn) # Get rid of unused levels.
rownames(SCC4) <- 1:nrow(SCC4)
fit <- eglhmm(y~locn+depth,data=SCC4,cells=c("locn","depth"),
K=2,distr="P",verb=TRUE)
plot(fit)
allcells <- levels(fit$data$cf)
wcells <- allcells[grep("\\.60",allcells)]
plot(fit,wcells=wcells,main=c("Longreef","Bondi East","Bondi Offshore",
"Malabar Offshore"),ntop=12)