Skip to contents

Session setup

Configure a session once, at the top of a script. See vignette("getting-started") for where the call belongs.

colleyRstats_setup()
Configure Global R Environment for colleyRstats
colley_theme()
The colleyRstats ggplot2 theme

One-call pipelines

Go from a data frame to a figure and manuscript-ready sentences in a single call, for one dependent variable or many.

analyze_and_report()
Analyze one dependent variable and produce everything a paper needs
report_all()
Analyze and report several dependent variables at once
emit_overleaf()
Bundle an analysis into an Overleaf-ready folder

Choosing a test

Inspect the data and get the matching model, with a fit call and a methods sentence you can edit.

recommend_test() recommend_analysis()
Recommend a principled analysis for one outcome
classify_outcome()
Classify the measurement scale of an outcome variable
assumption_methods_text()
Methods-section sentence justifying the test selection
cite_methods()
Citations and methods boilerplate for the analyses used

Checking assumptions

checkAssumptionsForAnova() check_assumptions_anova()
Check the assumptions for an ANOVA with a variable number of factors: Normality and Homogeneity of variance assumption.
check_normality_by_group()
Check normality for groups
check_homogeneity_by_group()
Check homogeneity of variances across groups
debug_contr_error()
Debug contrast errors in ANOVA-like models

Plots

ggstatsplot wrappers that pick the parametric or non-parametric test for you, effect plots, and multi-objective optimisation plots.

ggbetweenstatsWithPriorNormalityCheck() plot_between_stats()
Check the data's distribution. If non-normal, take the non-parametric variant of ggbetweenstats. x and y have to be in parentheses, e.g., "ConditionID".
ggbetweenstatsWithPriorNormalityCheckAsterisk() plot_between_stats_asterisk()
Check the data's distribution. If non-normal, take the non-parametric variant of ggbetweenstats. x and y have to be in parentheses, e.g., "ConditionID".
ggwithinstatsWithPriorNormalityCheck() plot_within_stats()
Check the data's distribution. If non-normal, take the non-parametric variant of ggwithinstats. x and y have to be in parentheses, e.g., "ConditionID".
ggwithinstatsWithPriorNormalityCheckAsterisk() plot_within_stats_asterisk()
Check the data's distribution. If non-normal, take the non-parametric variant of ggwithinstats. x and y have to be in parentheses, e.g., "ConditionID". Add Asterisks instead of p-values.
generateEffectPlot() plot_effect()
Function to define a plot, either showing the main or interaction effect in bold.
generateMoboPlot() plot_mobo()
Generate a Multi-objective Optimization Plot
generateMoboPlot2() plot_mobo2()
Generate a Multi-objective Optimization Plot
stat_sum_df()
Generating the sum and adding a crossbar.
n_fun()
Build a median/size label for plot annotations

Saving figures

Publication presets that size a figure’s type to the width it is written at.

save_paper_figure()
Save a plot with publication-ready defaults
figure_base_size()
Base font size for a figure of a given width

Reporting results

APA-compliant, LaTeX-ready sentences and tables for each model family.

reportART() report_art()
Generate the Latex-text based on the ARTool (see https://github.com/mjskay/ARTool). The ART result must be piped into an anova(). Only significant main and interaction effects are reported. P-values are rounded for the third digit. Attention: Effect sizes are not calculated! Attention: the independent variables of the formula and the term specifying the participant must be factors (i.e., use as.factor()).
reportArtCon() report_art_con()
Report significant ART contrasts (art.con) as LaTeX text
reportArtConTable() report_art_con_table()
Report ART contrasts (art.con) as a LaTeX table. Customizable with sensible defaults. Companion to reportDunnTestTable().
reportCLMM() report_clmm()
Report a cumulative link (mixed) model in LaTeX/APA style
reportGLMM() report_glmm()
Report a (generalized) linear mixed model in LaTeX/APA style
reportDunnTest() report_dunn_test()
Report dunnTest as text. Required commands in LaTeX: \newcommand{\padjminor}{\textit{p$_{adj}<$}} \newcommand{\padj}{\textit{p$_{adj}$=}} \newcommand{\rankbiserial}[1]{$r_{rb} = #1$}
reportDunnTestTable() report_dunn_test_table()
report Dunn test as a table. Customizable with sensible defaults. Required commands in LaTeX: \newcommand{\padjminor}{\textit{p$_{adj}<$}} \newcommand{\padj}{\textit{p$_{adj}$=}} \newcommand{\rankbiserial}[1]{$r_{rb} = #1$}
reportggstatsplot() report_ggstatsplot()
Report statistical details for ggstatsplot.
reportggstatsplotPostHoc() report_ggstatsplot_posthoc()
Report significant post-hoc pairwise comparisons
reportMeanAndSD() report_mean_sd()
Report the mean and standard deviation of a dependent variable for all levels of an independent variable rounded to the 2nd digit.
reportNparLD() report_nparld()
Report the model produced by nparLD. The model provided must be the model generated by the command 'nparLD' nparLD (see https://CRAN.R-project.org/package=nparLD).
reportNPAV()
Generate the Latex-text based on the NPAV by Lüpsen (see https://www.uni-koeln.de/~luepsen/R/). Only significant main and interaction effects are reported. P-values are rounded for the third digit and partial eta squared values are provided when possible. Attention: the independent variables of the formula and the term specifying the participant must be factors (i.e., use as.factor()).

Effect sizes

rFromWilcox()
Calculation based on Rosenthal's formula (1994). N stands for the number of measurements.
rFromWilcoxAdjusted()
rFromWilcoxAdjusted
rFromNPAV()
Calculation based on Rosenthal's formula (1994). N stands for the number of measurements.

LaTeX and Overleaf output

Getting the generated text into a document that compiles immediately.

latex_preamble()
LaTeX preamble required by the report functions
latex_escape()
Escape LaTeX special characters in plain text
latexify_report()
Transform text from report::report() into LaTeX-friendly output.
expand_latex_macros()
Expand the colleyRstats LaTeX macros to plain standard LaTeX
define_result_macro()
Define a named LaTeX macro for a single result (single source of truth)
emit_name_macros()
Generate \newcommand stubs for variable/factor names
use_colleyrstats_sty()
Write colleyRstats.sty into a project (for Overleaf)

Data preparation

reshape_data()
Reshape Excel Data Based on Custom Markers and Include Custom ID Column
replace_values()
Replace values across a data frame
remove_outliers_REI()
Flag suspicious survey responses via the Response Entropy Index (REI)
normalize()
This function normalizes the values in a vector to the range [new_min, new_max] based on their original range [old_min, old_max].
na.zero()
Replace NA values with zero
add_pareto_emoa_column()
Add PARETO_EMOA Column to a Data Frame
add_pareto_moocore_column()
Add PARETO_MOOCORE Column to a Data Frame

Small utilities

not_in() `%!in%`
Negate %in% membership
not_empty()
Ensure input is not empty
pathPrep()
Convert Windows paths to R-friendly format