Skip to content

vlt.stats.plot_lme_array

  PLOT_LME_ARRAY - plot an array of linear mixed effects models from a table

  [LME, LME_] = PLOT_LME_ARRAY(TBL, CATEGORIES_NAME, Y_NAME_ARRAY, Y_LABEL_ARRAY, Y_OP, ...
         REFERENCE_CATEGORY, GROUP_NAME, LOG_TYPE, PLOT_TYPE, STAT_TYPE, ...)

  Inputs:
    TBL - a table with the data to be examined
    CATEGORIES_NAME - the table field with the categories to be examined (maybe 'condition_name')
    Y_NAME_ARRAY - an array of TBL fields to be examined with LME
    Y_LABEL_ARRAY - an array labels for the Y axis (one entry per Y_NAME_ARRAY value)
    Y_OP - the operation to perform on Y; usually just 'Y' but could be '1-Y' or 'sin(Y)'. Can be empty
           to indicate 'Y'; can be a cell array to use a different operation for each array item
    REFERENCE_CATEGORY - the reference category (maybe 'control')
    GROUP_NAME - the TBL field name with random effect names (maybe 'subject_name')
    LOG_TYPE - 0/1 vector the same size as Y_NAME_ARRAY. For each entry, 0 if log should not be
        used and 1 if the data should be log transformed for fitting and plotting.
    PLOT_TYPE - 1/2 vector the same size as Y_NAME_ARRAY. For each entry, 1 if the plot should
        be the regular LME model, and 2 if it should be the ranked/non-parametric version
    STAT_TYPE - 1/2 vector the same size as Y_NAME_ARRAY. For each entry, 1 if the stats shown
        should be from the regular LME fit, and 2 if it should be from the ranked/non-parametric version.

  This function takes name/value pairs that modify the default behavior.
  The name/value pairs that are accepted are PLOT_LME_CATEGORY_OPTIONS.
  See: PLOT_LME_CATEGORY_OPTIONS, vlt.stats.plot_lme_category_options