Uses ggplot2 to visualize differences between subtypes over time.

plotSubtypeChange(
  mxdfin,
  idvar,
  measurement,
  subtype,
  vizname = "timer",
  whiskervar = c("ci", "se"),
  extra = "",
  xlab = "",
  ylab = ""
)

Arguments

mxdfin

Input data frame with repeated measurements and a grouped time variable

idvar

variable name for unique subject identifier column

measurement

the numeric variable to plot over time stratified by subtype

subtype

the categorical (possibly ordinal) subtype variable

vizname

the name of the grouped time variable (e.g. years change rounded to nearest quarter year)

whiskervar

character either ci or se

extra

additional naming variable

xlab

additional naming variable

ylab

additional naming variable

Value

ggplot

Author

Avants BB

Examples

mydf = generateSubtyperData( 100 )
summ = plotSubtypeChange( mydf, "Id", "cognition", "DX", "visit" )