statuser-package: Stat Tools for End Users

statuser-packageR Documentation

Stat Tools for End Users

Description

Basic and custom statistical tools designed with end users in mind. Functions have optimized defaults, produce decluttered and informative output that is self-explanatory, and generate publication-ready results in 1 line of code.

Basic Stats (improved)

  • lm2: like lm(), with robust SE and much more informative output

  • t.test2: like t.test(), decluttered, and more informative output

  • table2: like table(), showing variable names, and with proportions & chi2 built in

  • desc_var: Descriptive statistics for variables (optional, by group(s))

Custom tools from papers by Uri Simonsohn

  • twolines: Two-lines test for U-shapes (Simonsohn 2018)

  • interprobe: Probe and visualize nonlinear interactions (Simonsohn 2024; Montealegre & Simonsohn 2026)

Graphing

  • scatter.gam: Makes scatter plot for x & y, with fitted GAM line y=f(x)

  • plot_cdf: Plot empirical cumulative distribution functions (optional, by group)

  • plot_density: Plot density functions (optional, by group)

  • plot_freq: Plot frequency of observed values (optional, by group)

  • plot_means: Barplot of means with confidence intervals and (optionally) tests

  • plot_gam: Plot fitted GAM values for a focal predictor

Formatting

  • format_pvalue: Format p-values for display

  • var_labels: Get/set variable labels (as base-R "label" attributes)

  • message2: Print colored messages to console

  • resize_images: Resize images (SVG, PDF, EPS, JPG, PNG, etc.) to PNG with specified width

Miscellaneous

  • clear: Clear environment, console, and all graphics devices

  • list2: Like list(), but unnamed objects are automatically named

  • convert_to_sql: Convert CSV files to SQL INSERT statements

  • text2: like text() adding text-alignment and background color

Author(s)

Uri Simonsohn urisohn@gmail.com

References

Simonsohn, U. (2018). Two lines: A valid alternative to the invalid testing of U-shaped relationships with quadratic regressions. Advances in Methods and Practices in Psychological Science, 1(4), 538-555. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/2515245918805755")}

Simonsohn, U. (2024). Interacting with curves: How to validly test and probe interactions in the real (nonlinear) world. Advances in Methods and Practices in Psychological Science, 7(1), Article 25152459231207787. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/25152459231207787")}

Montealegre, D., & Simonsohn, U. (2026). Johnson Neyman 2.0 (working paper).

See Also

Useful links:


statuser documentation built on April 25, 2026, 5:06 p.m.