R/Plot_DiDiSTATIS_Perm_r2_Categories.D.R

# Plot_DiDiSTATIS_Perm_r2_Categories.D.R
#
#' Plot histogram of permtuted r^2_Categories
#'
#' @param res_DiDiSTATIS The output of DiDiSTATIS
#' @param dev_new Flag to appease ReporteRs (set FALSE to print results to pptx)
#' @return Histograms of the r^2s
#' @export

Plot_DiDiSTATIS_Perm_r2_Categories.D <- function(res_DiDiSTATIS, dev_new = TRUE){

  #Plot the histogram of the total squared distances from each group compromise to the compromise,
  #aggregated over all stimuli
  Plot_Hist(Distribution = res_DiDiSTATIS$Perm_Omnibus$r2_Categories.D,
            alpha = .05,
            Stat = res_DiDiSTATIS$res_BaryGrand$EffectSize$r2_Categories.D,
            Stat_colors = res_DiDiSTATIS$input$DESIGN_tables$colors_D,
            breaks = 40,
            main = "DiDiSTATIS Omni Perm: r2_Categories.D",
            dev_new = dev_new)


  legend(x = "right",
         legend = c(res_DiDiSTATIS$input$DESIGN_tables$labels),
         col = res_DiDiSTATIS$input$DESIGN_tables$colors_D,
         pch = 19,
         pt.cex = 2)

}
michaelkriegsman/PlotDiDiSTATIS documentation built on May 30, 2019, 6:19 p.m.