Learn R Programming

BaSTA (version 1.4)

PlotLexis: Function to plot a Lexis diagram from a Bayesian Survival Trajectory Analysis (BaSTA) analysis object.

Description

This function produces a Lexis diagram from the predicted birth and death times within a basta object.

Usage

PlotLexis(x, ji = 0.5, trans = 50, q = 0.5, lw = 2, ...)

Arguments

x
An object of class basta.
ji
A jitter value, to separate the lines when there are many individuals with the same birth times.
trans
The level of transparency to be used when plotting the lines for each individual. A value of 'NULL' plots lines with no transparency.
q
Defines the quantile to be plotted. The default value is 0.5, to plot the 50% quantile
lw
Line width for the plot.
...
Additional plotting commands which can be passed to plot. e.g. xlab, ylab, etc.

See Also

basta

Examples

Run this code
data("sim1Out", package = "BaSTA")
PlotLexis(sim1Out,xlab= "Year", ylab = "Age (yrs)")

Run the code above in your browser using DataLab