Learn R Programming

ctsem (version 1.1.6)

ctIndplot: ctIndplot

Description

Convenience function to simply plot individual subject trajectories from ctsem wide format data

Usage

ctIndplot(datawide, n.subjects, n.manifest, Tpoints, colourby = "subject", vars = "all", opacity = 1, varnames = NULL, xlab = "Time", ylab = "Value", start = 0, legendposition = "topright", ...)

Arguments

datawide
ctsem wide format data
n.subjects
Number of subjects to randomly select for plotting.
n.manifest
Number of manifest variables in data structure
Tpoints
Number of discrete time points per case in data structure
colourby
set plot colours by "subject" or "variable"
vars
either 'all' or a numeric vector specifying which manifest variables to plot.
opacity
Opacity of plot lines
varnames
vector of variable names for legend (defaults to NULL)
xlab
X axis label.
ylab
Y axis label.
start
Measurement occasion to start plotting from - defaults to T0.
legendposition
Where to position the legend.
...
additional plotting parameters.

Examples

Run this code

data(ctExample1)
ctIndplot(ctExample1,n.subjects=1, n.manifest=2,Tpoints=6, colourby='variable')

Run the code above in your browser using DataLab