Skip to content

vlt.stats.plot_lme_category

  LME_CATEGORY - calculate a mixed linear model for a variable measured in different fixed categories and random effects across group

  [H,PLOT_INFO] = PLOT_LME_CATEGORY(LME_, LMETABLE, CATEGORIES_NAME, Y_NAME, REFERENCE_CATEGORY, GROUP_NAME,...);

  Plot (in the current axes) the data in a random effects model. Each data point
  in the table LMETABLE column Y_NAME is plotted by GROUP and CATEGORY. The
  LME model mean value for each group and category is shown with a horizontal bar.
  The category means are shown with a thick horizontal bar and the standard
  error of the mean is shown as a thick vertical bar.

  Note that there is no Y_OP input to this function. Any Y_OP was already applied
  in the call to vlt.stats.lme_category.

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

  Example:
   load carsmall
   tbl = table(Mfg,Model_Year,Model,MPG);
   Y_op = 'Y'; % just use Y
   % compute standard linear mixed effects model
   [lme,newtable] = vlt.stats.lme_category(tbl,'Model_Year','MPG',Y_op,'70','Mfg',0);
   figure;
   [h,plot_info]=vlt.stats.plot_lme_category(lme,newtable,'Model_Year','MPG','70','Mfg');
   box off;