plot.p3state: Plot method for p3state objects

View source: R/plot.p3state.R

plot.p3stateR Documentation

Plot method for p3state objects

Description

Produces various plots related to the p3state model, including transition probabilities, marginal distributions, and bivariate distribution functions.

Usage

## S3 method for class 'p3state'
plot(
  x,
  plot.trans = NULL,
  plot.marginal = NULL,
  plot.bivariate = NULL,
  time1,
  time2,
  xlab,
  ylab,
  zlab,
  col,
  col.biv = NULL,
  ...
)

Arguments

x

An object of class p3state.

plot.trans

Character or logical; specifies which transition probabilities to plot. Options include "P11", "P12", "P22", "P23", or "all". Defaults to NULL (no plot).

plot.marginal

Logical; whether to plot marginal distributions. Defaults to NULL.

plot.bivariate

Logical; whether to plot the bivariate distribution function. Defaults to NULL.

time1

Numeric; start time for the plot. Defaults to 0 if missing.

time2

Numeric; end time for the plot. Defaults to the maximum observed time.

xlab

Character; label for the x-axis. Defaults to "Time" if missing.

ylab

Character; label for the y-axis. Optional.

zlab

Character; label for the z-axis in 3D plots. Optional.

col

Color(s) used for plots. Optional.

col.biv

Color specification for bivariate contour plots. Optional.

...

Additional graphical parameters passed to plotting functions.

Value

Invisibly returns NULL. Plots are drawn as side effects.

Examples

## Not run: 
# Suponha que 'fit' é um objeto p3state ajustado
plot(fit, plot.trans = "P11")
plot(fit, plot.marginal = TRUE)
plot(fit, plot.bivariate = TRUE)

## End(Not run)


p3state.msm documentation built on Aug. 21, 2025, 5:42 p.m.