powered by
Convenience function to simply plot individuals trajectories from ctsem wide format data
ctIndplot( datawide, n.manifest, Tpoints, n.subjects = "all", colourby = "variable", vars = "all", opacity = 1, varnames = NULL, xlab = "Time", ylab = "Value", type = "b", start = 0, legend = TRUE, legendposition = "topright", new = TRUE, jittersd = 0.05, ... )
ctsem wide format data
Number of manifest variables in data structure
Number of discrete time points per case in data structure
Number of subjects to randomly select for plotting, or character vector 'all'.
set plot colours by "subject" or "variable"
either 'all' or a numeric vector specifying which manifest variables to plot.
Opacity of plot lines
vector of variable names for legend (defaults to NULL)
X axis label.
Y axis label.
character specifying plot type, as per usual base R plot commands. Defaults to 'b', both points and lines.
Measurement occasion to start plotting from - defaults to T0.
Logical. Plot a legend?
Where to position the legend.
logical. If TRUE, creates a new plot, otherwise overlays on current plot.
positive numeric indicating standard deviation of noise to add to observed data for plotting purposes.
additional plotting parameters.
data(ctExample1) ctIndplot(ctExample1,n.subjects=1, n.manifest=2,Tpoints=6, colourby='variable')
Run the code above in your browser using DataLab