Uses ggplot2
to visualize differences between subtypes over time.
plotSubtypeChange(
mxdfin,
idvar,
measurement,
subtype,
vizname = "timer",
whiskervar = c("ci", "se"),
extra = "",
xlab = "",
ylab = ""
)
Input data frame with repeated measurements and a grouped time variable
variable name for unique subject identifier column
the numeric variable to plot over time stratified by subtype
the categorical (possibly ordinal) subtype variable
the name of the grouped time variable (e.g. years change rounded to nearest quarter year)
character either ci or se
additional naming variable
additional naming variable
additional naming variable
ggplot
mydf = generateSubtyperData( 100 )
summ = plotSubtypeChange( mydf, "Id", "cognition", "DX", "visit" )