Automatically Plot Trajectories of Variables Selected by prolong()
Source: R/plotfuns.R
plot_trajectories.Rd
Automatically Plot Trajectories of Variables Selected by prolong()
Arguments
- x
Input covariate array, with n rows, p columns, and t slices
- object
A
prolong
model object. Can be leftNULL
ifselected
is provided- selected
A character list of variable names or a numeric index of variables of interest whose trajectories are to be plotted. Can be left
NULL
if object is provided- timelabs
Optional numeric or character vector of labels for the t time points. If left
NULL
, 1:t will be used- colors
Either a single color to plot all trajectories or an n length vector with a color for each subject
Examples
if (FALSE) {
promod <- prolong(Ymatrix, Xarray)
plot_trajectories(Xarray, promod)
plot_trajectories(Xarray, selected = promod$selected)
}