[{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"basic-idea","dir":"Articles","previous_headings":"","what":"Basic idea","title":"Quickly test linear regression assumptions","text":"recently discovered wonderful package easily checking linear regression assumptions via diagnostic plots: check_model() function performance package. Let‚Äôs make quick demonstration package first.  Wonderful! efficient. However, sometimes, different reasons, someone might want check assumptions objective test. Testing assumption one one kind time-consuming, made convenience function accelerate process. Just warning jumping objective assumption tests. Note tests generally recommended! large sample size, objective assumption tests -sensitive deviations expected values, small sample size, objective assumption tests -powered detect real, existing deviations. can also mask visual patterns reflected single number. thus recommended use visual assessment diagnostic plots instead (e.g., see Shatz, 2023, Kozak & Piepho, 2018, https://doi.org/10.1111/jac.12220; Schucany & Ng, 2006). quick accessible argument tests normality specifically, see source.","code":"# Load necessary libraries library(performance) library(see) # Note: if you haven't installed the packages above,  # you'll need to install them first by using: # install.packages(\"performance\") and install.packages(\"see\")  # Create a regression model (using data available in R by default) model <- lm(mpg ~ wt * cyl + gear, data = mtcars) # Check model assumptions check_model(model)"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"getting-started","dir":"Articles","previous_headings":"Basic idea","what":"Getting Started","title":"Quickly test linear regression assumptions","text":"Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\"). raw output doesn‚Äôt look nice console column names long, look good viewer exported word processing software column names get wrapped. can try RStudio following command:  Model Normality (Shapiro-Wilk) Homoscedasticity (Breusch-Pagan) Autocorrelation residuals (Durbin-Watson) Diagnostic mpg ~ wt * cyl + gear .615 .054 .525 0.00 Interpretation: (p) values < .05 imply assumptions respected. Diagnostic many assumptions respected given model variable. function particularly useful testing several models simultaneously makes nice table results. Let‚Äôs make short demonstration . Use Viewer better results  alternatively nice_table() function Model Normality (Shapiro-Wilk) Homoscedasticity (Breusch-Pagan) Autocorrelation residuals (Durbin-Watson) Diagnostic cyl ~ mpg .361 .282 .460 0.00 disp ~ mpg .506 .831 .077 0.00 hp ~ mpg .004** .351 .198 1.00 drat ~ mpg .939 .887 .505 0.00 wt ~ mpg .020* .270 .002** 2.00 qsec ~ mpg .427 .944 .011* 1.00 vs ~ mpg .142 .568 .238 0.00 ~ mpg .074 .650 < .001*** 1.00 gear ~ mpg .001** .528 < .001*** 2.00 carb ~ mpg .008** .362 .003** 2.00","code":"library(rempsyc) View(nice_assumptions(model)) nice_table(nice_assumptions(model), col.format.p = 2:4) # Define our dependent variables DV <- names(mtcars[-1]) # Make list of all formulas formulas <- paste(DV, \"~ mpg\") # Make list of all models models.list <- lapply(X = formulas, FUN = lm, data = mtcars) # Make diagnostic table assumptions.table <- nice_assumptions(models.list) View(assumptions.table) nice_table(assumptions.table, col.format.p = 2:4)"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"categorical-predictors","dir":"Articles","previous_headings":"","what":"Categorical Predictors","title":"Quickly test linear regression assumptions","text":"categorical predictors (e.g., groups), suggested check assumptions directly raw data rather residuals (source). case, one can make qqplots different groups first check normality assumption.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"make-the-basic-plot","dir":"Articles","previous_headings":"QQ Plots","what":"Make the basic plot","title":"Quickly test linear regression assumptions","text":"Generally speaking, long dots lie within confidence band, good data distribute normally.","code":"nice_qq(data = iris,         variable = \"Sepal.Length\",         group = \"Species\")"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"further-customization","dir":"Articles","previous_headings":"QQ Plots","what":"Further customization","title":"Quickly test linear regression assumptions","text":"Change (reorder) colours, x-axis title y-axis title, names groups, grid lines, add p-value Shapiro-Wilk (wish ).  p > .05 suggests data normally distributed (according Shapiro-Wilk test). Inversely, p < .05 suggests data normally distributed. Keep mind however several known problems objective tests, visual assessment recommended. Nonetheless, beginners, can sometimes useful (rather, reassuring) able pair visual assessment tests values.","code":"nice_qq(data = iris,         variable = \"Sepal.Length\",         group = \"Species\",         colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),         groups.labels = c(\"(a) Setosa\", \"(b) Versicolor\", \"(c) Virginica\"),         grid = FALSE,         shapiro = TRUE,         title = NULL)"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"density-plots","dir":"Articles","previous_headings":"","what":"Density Plots","title":"Quickly test linear regression assumptions","text":"people think density distributions less useful qqplots, sometimes, people still like look distributions, made another function .","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"make-the-basic-plot-1","dir":"Articles","previous_headings":"Density Plots","what":"Make the basic plot","title":"Quickly test linear regression assumptions","text":"Pro tip: Save density plots narrower width better-looking results.","code":"nice_density(data = iris,              variable = \"Sepal.Length\",              group = \"Species\")"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"further-customization-1","dir":"Articles","previous_headings":"Density Plots","what":"Further customization","title":"Quickly test linear regression assumptions","text":"Change (reorder) colours, x-axis title y-axis title, names groups, grid lines, add p-value Shapiro-Wilk (wish ).","code":"nice_density(data = iris,              variable = \"Sepal.Length\",              group = \"Species\",              colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),              xtitle = \"Sepal Length\",              ytitle = \"Density (vs. Normal Distribution)\",              groups.labels = c(\"(a) Setosa\", \"(b) Versicolor\", \"(c) Virginica\"),              grid = FALSE,              shapiro = TRUE,              histogram = TRUE,              title = \"Density (Sepal Length)\")"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"density-qq-plots","dir":"Articles","previous_headings":"","what":"Density + QQ Plots","title":"Quickly test linear regression assumptions","text":"Finally, also possible combine plot types single function, nice_normality.","code":"nice_normality(data = iris,                variable = \"Sepal.Length\",                group = \"Species\",                shapiro = TRUE,                histogram = TRUE,                title = \"Density (Sepal Length)\")"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"outliers","dir":"Articles","previous_headings":"","what":"Outliers","title":"Quickly test linear regression assumptions","text":"check outliers categorical predictors, can check group whether observations greater 3 units. default uses median absolute deviations (MADs, method = \"mad\"), based following publication: Leys, C., Klein, O., Bernard, P., & Licata, L. (2013). Detecting outliers: use standard deviation around mean, use absolute deviation around median. Journal Experimental Social Psychology, 49(4), 764‚Äì766. https://doi.org/10.1016/j.jesp.2013.03.013","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"make-the-basic-plot-2","dir":"Articles","previous_headings":"Outliers","what":"Make the basic plot","title":"Quickly test linear regression assumptions","text":"aware checking outliers group group yield different results, e.g.,:","code":"plot_outliers(   airquality,   group = \"Month\",   response = \"Ozone\") plot_outliers(   airquality,   response = \"Ozone\")"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"further-customization-2","dir":"Articles","previous_headings":"Outliers","what":"Further customization","title":"Quickly test linear regression assumptions","text":"Change (reorder) colours, y-axis title, names groups, detection method.","code":"plot_outliers(   airquality,   group = \"Month\",   response = \"Ozone\",   method = \"sd\",   criteria = 3.29,   colours = c(\"white\", \"black\", \"purple\", \"grey\", \"pink\"),   ytitle = \"Ozone\",   xtitle = \"Month of the Year\")"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"flagging-outliers","dir":"Articles","previous_headings":"Outliers","what":"Flagging outliers","title":"Quickly test linear regression assumptions","text":"Outliers can also identifed find_mad multiple variables:","code":"find_mad(airquality, names(airquality), criteria = 3) ## 8 outlier(s) based on 3 median absolute deviations for variable(s):  ##  Ozone, Solar.R, Wind, Temp, Month, Day  ##  ## Outliers per variable:  ##  ## $Ozone ##   Row Ozone_mad ## 1  30  3.218284 ## 2  62  3.989131 ## 3  99  3.488081 ## 4 101  3.025573 ## 5 117  5.261028 ## 6 121  3.333911 ##  ## $Wind ##   Row Wind_mad ## 1   9 3.049871 ## 2  48 3.225825"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"winsorizing-outliers","dir":"Articles","previous_headings":"Outliers","what":"Winsorizing outliers","title":"Quickly test linear regression assumptions","text":"Outliers can also winsorized winsorize_mad, meaning outlier values outside 3 MADs brought back 3 MADs:","code":"winsorize_mad(airquality$Ozone, criteria = 3) |>   head(30) ##  [1]  41.0000  36.0000  12.0000  18.0000       NA  28.0000  23.0000  19.0000 ##  [9]   8.0000       NA   7.0000  16.0000  11.0000  14.0000  18.0000  14.0000 ## [17]  34.0000   6.0000  30.0000  11.0000   1.0000  11.0000   4.0000  32.0000 ## [25]       NA       NA       NA  23.0000  45.0000 109.3365"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"multivariate-outliers","dir":"Articles","previous_headings":"Outliers","what":"Multivariate outliers","title":"Quickly test linear regression assumptions","text":"multivariate outliers, recommended use Minimum Covariance Determinant (MCD), available performance package easystats mentioned beginning post. note also ideally handling outliers preregistered priori. --date recommendations handling outliers, please see: Leys, C., Delacre, M., Mora, Y. L., Lakens, D., & Ley, C. (2019). classify, detect, manage univariate multivariate outliers, emphasis pre-registration. International Review Social Psychology, 32(1). https://doi.org/10.5334/irsp.289","code":"check_outliers(na.omit(airquality), method = \"mcd\") ## 12 outliers detected: cases 1, 4, 6, 7, 11, 14, 17, 19, 20, 23, 34, 77. ## - Based on the following method and threshold: mcd (22.458). ## - For variables: Ozone, Solar.R, Wind, Temp, Month, Day."},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"homoscedasticity-equality-of-variance","dir":"Articles","previous_headings":"","what":"Homoscedasticity (equality of variance)","title":"Quickly test linear regression assumptions","text":"check homoscedasticity (equality variance) categorical predictors, can check variance within group. can use rule thumb variance one group four times another group. can check function makes table.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"make-the-basic-table","dir":"Articles","previous_headings":"Homoscedasticity (equality of variance)","what":"Make the basic table","title":"Quickly test linear regression assumptions","text":"Let‚Äôs now try many variables see handy can . Use Viewer better results (export Word using nice_table() function)","code":"View(nice_var(data = iris,               variable = \"Sepal.Length\",               group = \"Species\")) # Define our dependent variables DV <- names(iris[1:4])  # Make diagnostic table var.table <- nice_var(data = iris,                       variable = DV,                       group = \"Species\") View(var.table)"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"visualizing-variance","dir":"Articles","previous_headings":"Homoscedasticity (equality of variance)","what":"Visualizing Variance","title":"Quickly test linear regression assumptions","text":"can also interesting look variance visually learning purposes.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"make-the-basic-plot-3","dir":"Articles","previous_headings":"Homoscedasticity (equality of variance)","what":"Make the basic plot","title":"Quickly test linear regression assumptions","text":"","code":"nice_varplot(data = iris,              variable = \"Sepal.Length\",              group = \"Species\")"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"further-customization-3","dir":"Articles","previous_headings":"Homoscedasticity (equality of variance)","what":"Further customization","title":"Quickly test linear regression assumptions","text":"Change (reorder) colours, y-axis title, names groups.","code":"nice_varplot(data = iris,              variable = \"Sepal.Length\",               group = \"Species\",              colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),              ytitle = \"Sepal Length\",              groups.labels = c(\"(a) Setosa\", \"(b) Versicolor\", \"(c) Virginica\"))"},{"path":"https://rempsyc.remi-theriault.com/articles/assumptions.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Homoscedasticity (equality of variance)","what":"Thanks for checking in","title":"Quickly test linear regression assumptions","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/circles.html","id":"getting-started","dir":"Articles","previous_headings":"","what":"Getting started","title":"Interpolating the Inclusion of the Other in the Self Scale","text":"Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\").","code":"library(rempsyc)"},{"path":"https://rempsyc.remi-theriault.com/articles/circles.html","id":"score-of-1-0-overlap","dir":"Articles","previous_headings":"","what":"Score of 1 (0% overlap)","title":"Interpolating the Inclusion of the Other in the Self Scale","text":"","code":"overlap_circle(1)"},{"path":"https://rempsyc.remi-theriault.com/articles/circles.html","id":"score-of-3-5-25-overlap","dir":"Articles","previous_headings":"","what":"Score of 3.5 (25% overlap)","title":"Interpolating the Inclusion of the Other in the Self Scale","text":"","code":"overlap_circle(3.5)"},{"path":"https://rempsyc.remi-theriault.com/articles/circles.html","id":"score-of-6-84-81-8-overlap","dir":"Articles","previous_headings":"","what":"Score of 6.84 (81.8% overlap)","title":"Interpolating the Inclusion of the Other in the Self Scale","text":"","code":"overlap_circle(6.84)"},{"path":"https://rempsyc.remi-theriault.com/articles/circles.html","id":"changing-labels","dir":"Articles","previous_headings":"","what":"Changing labels","title":"Interpolating the Inclusion of the Other in the Self Scale","text":"can also change group labels categories argument, although ‚ÄòSelf‚Äô ‚Äò‚Äô defaults.","code":"overlap_circle(3.12, categories = c(\"Humans\",\"Animals\"))"},{"path":"https://rempsyc.remi-theriault.com/articles/circles.html","id":"saving-to-file-pdf-or-png","dir":"Articles","previous_headings":"","what":"Saving to file (PDF or PNG)","title":"Interpolating the Inclusion of the Other in the Self Scale","text":"First save plot object:  can use ggplot2 save command directly object name: Pro tip: Recommended dimensions saving 7 inches wide 7 inches high. .pdf .eps formats recommended scalable vector graphics high-resolution submissions scientific journals. However, can also save formats, .tiff, .png, .jpg.","code":"plot <- overlap_circle(3.5) ggplot2::ggsave(plot, file = \"overlap.pdf\", width = 7, height = 7,                  unit = 'in', dpi = 300) # Change the path to where you would like to save it. # If you copy-paste your path name, remember to  # use \"R\" slashes ('/' rather than '\\'). # Also remember to specify the .pdf extension of the file."},{"path":"https://rempsyc.remi-theriault.com/articles/circles.html","id":"example-figure","dir":"Articles","previous_headings":"","what":"Example figure","title":"Interpolating the Inclusion of the Other in the Self Scale","text":"allowed instance, one study (https://doi.org/10.1177/17470218211024826), compare three groups side--side following intervention:","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/circles.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Example figure","what":"Thanks for checking in","title":"Interpolating the Inclusion of the Other in the Self Scale","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"basic-idea","dir":"Articles","previous_headings":"","what":"Basic Idea","title":"Planned Contrasts Analyses (Group Comparisons)","text":"post, document conduct planned contrasts analyses test whether experimental groups differ . Planned contrasts similar t tests, provide power several groups: Statistical power lower standard t test compared planned contrast version two reasons: ) sample size smaller t test, cases two groups selected; b) planned contrast error term smaller standard t test based cases (source) first demonstrate simple example conducting analysis, exporting table results Microsoft Word, producing figure. demonstrating single variable, look full workflow, .e., can automatize process several variables simultaneously.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"getting-started","dir":"Articles","previous_headings":"Basic Idea","what":"Getting started","title":"Planned Contrasts Analyses (Group Comparisons)","text":"minimal example, use iris dataset, installed R default.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"using-nice_contrasts","dir":"Articles","previous_headings":"Basic Idea","what":"Using nice_contrasts()","title":"Planned Contrasts Analyses (Group Comparisons)","text":"Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\"). Let‚Äôs test function existing data give us Cohen‚Äôs d default effect size, possible request ‚Äòrobust‚Äô version (.e., robust deviations parametric assumptions) Cohen‚Äôs d specifying effect.type = \"akp.robust.d\". also provide us bootstrapped 95% confidence intervals effect size.","code":"library(rempsyc) table.stats <- nice_contrasts(response = \"Sepal.Length\",                               group = \"Species\",                               data = iris) table.stats ##   Dependent Variable             Comparison  df          t            p ## 1       Sepal.Length     setosa - virginica 147 -15.365506 2.214821e-32 ## 2       Sepal.Length versicolor - virginica 147  -6.332686 2.765638e-09 ## 3       Sepal.Length    setosa - versicolor 147  -9.032819 8.770194e-16 ##           d  CI_lower   CI_upper ## 1 -3.073101 -3.539458 -2.4698132 ## 2 -1.266537 -1.710106 -0.7764728 ## 3 -1.806564 -2.155151 -1.3940633"},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"make-it-publication-ready-using-nice_table-","dir":"Articles","previous_headings":"Basic Idea","what":"Make it publication-ready using nice_table().","title":"Planned Contrasts Analyses (Group Comparisons)","text":"Dependent Variable Comparison df t p d 95% CI Sepal.Length setosa - virginica 147 -15.37 < .001*** -3.07 [-3.54, -2.47] versicolor - virginica 147 -6.33 < .001*** -1.27 [-1.71, -0.78] setosa - versicolor 147 -9.03 < .001*** -1.81 [-2.16, -1.39] Save table Word","code":"(my_table <- nice_table(table.stats)) flextable::save_as_docx(my_table, path = \"contrasts.docx\")"},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"make-a-violin-plot-comparing-groups-through-nice_violin-","dir":"Articles","previous_headings":"Basic Idea","what":"Make a violin plot comparing groups through nice_violin().","title":"Planned Contrasts Analyses (Group Comparisons)","text":"Let‚Äôs save high-resolution/vector version figure PDF (.png format necessary). Congratulations making far! ‚Äôve done ! Z, now know make things work! like integrate broader workflow, read next part!","code":"(figure <- nice_violin(group = \"Species\",                         response = \"Sepal.Length\",                         data = iris,                        ytitle = \"Length of Sepal\",                         signif_annotation = c(\"***\", \"***\", \"***\"),                        signif_yposition = c(8.7, 7.3, 8.2),                        signif_xmin = c(\"setosa\", \"setosa\", \"versicolor\"),                        signif_xmax = c(\"virginica\", \"versicolor\", \"virginica\"))) ggplot2::ggsave('Figure 1.pdf', figure, width = 7, height = 7,                  unit = 'in', dpi = 300)"},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"full-workflow","dir":"Articles","previous_headings":"","what":"Full Workflow","title":"Planned Contrasts Analyses (Group Comparisons)","text":"full workflow, use dataset one studies published Quarterly Journal Experimental Psychology (https://doi.org/10.1177/17470218211024826) available Open Science Framework. Load data file Open Science Framework Specify order factor levels ‚ÄúGroup‚Äù (otherwise R alphabetize ) Define dependent variables Add meaningful names measures","code":"data <- read.csv(\"https://osf.io/qkmnp//?action=download\", header=TRUE) (data$Group <- factor(data$Group, levels = c(\"Embodied\", \"Mental\", \"Control\"))) ##  [1] Embodied Embodied Control  Control  Mental   Embodied Control  Control  ##  [9] Control  Embodied Mental   Mental   Control  Control  Mental   Control  ## [17] Mental   Mental   Embodied Embodied Control  Embodied Mental   Control  ## [25] Embodied Embodied Mental   Control  Mental   Embodied Embodied Mental   ## [33] Mental   Mental   Embodied Mental   Embodied Mental   Control  Embodied ## [41] Mental   Mental   Embodied Mental   Mental   Embodied Control  Control  ## [49] Control  Mental   Embodied Control  Embodied Control  Mental   Embodied ## [57] Embodied Embodied Control  Control  Control  Control  Mental   Control  ## [65] Mental   Embodied Embodied Mental   Embodied Control  Control  Mental   ## [73] Mental   Control  Control  Embodied Mental   Control  Embodied Embodied ## [81] Embodied Mental   Control  Control  Embodied Mental   Mental   Mental   ## [89] Embodied Control  ## Levels: Embodied Mental Control library(dplyr) (DV <- data %>% select(QCAEPR:IOS) %>% names) ## [1] \"QCAEPR\" \"IRIPT\"  \"IRIFS\"  \"IRIEC\"  \"IRIPD\"  \"IOS\" table.stats <- nice_contrasts(response = DV,                               group = \"Group\",                               data = data) table.stats ##    Dependent Variable         Comparison df           t            p ## 1              QCAEPR Embodied - Control 87  2.19599050 3.075313e-02 ## 2              QCAEPR   Mental - Control 87  0.23740438 8.129013e-01 ## 3              QCAEPR  Embodied - Mental 87  1.95858612 5.336471e-02 ## 4               IRIPT Embodied - Control 86  0.12249596 9.027921e-01 ## 5               IRIPT   Mental - Control 86  0.01932946 9.846231e-01 ## 6               IRIPT  Embodied - Mental 86  0.10212396 9.188960e-01 ## 7               IRIFS Embodied - Control 86  0.15139155 8.800214e-01 ## 8               IRIFS   Mental - Control 86 -1.38629687 1.692400e-01 ## 9               IRIFS  Embodied - Mental 86  1.53639996 1.281114e-01 ## 10              IRIEC Embodied - Control 86  2.30118373 2.379970e-02 ## 11              IRIEC   Mental - Control 86  1.44763512 1.513548e-01 ## 12              IRIEC  Embodied - Mental 86  0.83396371 4.066119e-01 ## 13              IRIPD Embodied - Control 86  2.13034255 3.599933e-02 ## 14              IRIPD   Mental - Control 86  0.85841114 3.930517e-01 ## 15              IRIPD  Embodied - Mental 86  1.25380051 2.133121e-01 ## 16                IOS Embodied - Control 87  4.70778837 9.385982e-06 ## 17                IOS   Mental - Control 87  2.12312024 3.658408e-02 ## 18                IOS  Embodied - Mental 87  2.58466812 1.141344e-02 ##               d    CI_lower  CI_upper ## 1   0.567002309  0.01430252 1.0868181 ## 2   0.061297547 -0.51543339 0.5629653 ## 3   0.505704762  0.01603980 0.9669974 ## 4   0.031628320 -0.52085825 0.5615530 ## 5   0.005033685 -0.51281341 0.4599128 ## 6   0.026594635 -0.49551590 0.5100897 ## 7   0.039089129 -0.47970421 0.5793142 ## 8  -0.361012819 -0.90874617 0.1609175 ## 9   0.400101948 -0.11538511 0.9216909 ## 10  0.594163085  0.07690191 1.1668972 ## 11  0.376986233 -0.15147602 0.9231150 ## 12  0.217176852 -0.30170994 0.6760969 ## 13  0.550052081  0.03336366 1.0432145 ## 14  0.223543334 -0.25798385 0.7017699 ## 15  0.326508748 -0.26403006 0.8642355 ## 16  1.215545729  0.63068139 1.7824378 ## 17  0.548187290  0.04558968 1.0555871 ## 18  0.667358440  0.11918761 1.2435837 table.stats[1] <- rep(c(\"Peripheral Responsivity (QCAE)\",                         \"Perspective-Taking (IRI)\",                          \"Fantasy (IRI)\", \"Empathic Concern (IRI)\",                          \"Personal Distress (IRI)\",                         \"Inclusion of Other in the Self (IOS)\"), each = 3)"},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"make-it-publication-ready-using-nice_table--1","dir":"Articles","previous_headings":"Full Workflow","what":"Make it publication-ready using nice_table().","title":"Planned Contrasts Analyses (Group Comparisons)","text":"Note option highlight = TRUE, automatically highlight significant results. Table 1 Results multiple regression planned contrasts analyses empathy subscales self‚Äìmerging (confirmatory analyses exception self‚Äìmerging) Dependent Variable Comparison df t p d 95% CI Peripheral Responsivity (QCAE) Embodied - Control 87 2.20 .031* 0.57 [0.01, 1.09] Mental - Control 87 0.24 .813 0.06 [-0.52, 0.56] Embodied - Mental 87 1.96 .053 0.51 [0.02, 0.97] Perspective-Taking (IRI) Embodied - Control 86 0.12 .903 0.03 [-0.52, 0.56] Mental - Control 86 0.02 .985 0.01 [-0.51, 0.46] Embodied - Mental 86 0.10 .919 0.03 [-0.50, 0.51] Fantasy (IRI) Embodied - Control 86 0.15 .880 0.04 [-0.48, 0.58] Mental - Control 86 -1.39 .169 -0.36 [-0.91, 0.16] Embodied - Mental 86 1.54 .128 0.40 [-0.12, 0.92] Empathic Concern (IRI) Embodied - Control 86 2.30 .024* 0.59 [0.08, 1.17] Mental - Control 86 1.45 .151 0.38 [-0.15, 0.92] Embodied - Mental 86 0.83 .407 0.22 [-0.30, 0.68] Personal Distress (IRI) Embodied - Control 86 2.13 .036* 0.55 [0.03, 1.04] Mental - Control 86 0.86 .393 0.22 [-0.26, 0.70] Embodied - Mental 86 1.25 .213 0.33 [-0.26, 0.86] Inclusion Self (IOS) Embodied - Control 87 4.71 < .001*** 1.22 [0.63, 1.78] Mental - Control 87 2.12 .037* 0.55 [0.05, 1.06] Embodied - Mental 87 2.58 .011* 0.67 [0.12, 1.24] Note. ùëë·¥ø = robust Cohen‚Äôs ùëë; CI = bootstrapped confidence interval. comparisons -groups (.e., within-subject pre/post comparisons). One participant complete Interpersonal Reactivity Index. Bold/Grey background values represent statistically significant differences groups row variable. Save table Word","code":"(my_table <- nice_table(table.stats,                          highlight = TRUE,                         title = c(\"Table 1\", \"Results of multiple regression with planned contrasts analyses for empathy subscales and self‚Äìother merging (confirmatory analyses with the exception of self‚Äìother merging)\"),                         note = \"\\U1D451\\U1D3F = robust Cohen‚Äôs \\U1D451; CI = bootstrapped confidence interval. The comparisons were between-groups only (i.e., there were no within-subject pre/post comparisons). One participant did not complete the Interpersonal Reactivity Index. Bold/Grey background values represent statistically significant differences between the groups on that row and variable.\")) flextable::save_as_docx(my_table, path = \"contrasts.docx\")"},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"make-violin-plots-comparing-groups-through-nice_violin-","dir":"Articles","previous_headings":"Full Workflow","what":"Make violin plots comparing groups through nice_violin.","title":"Planned Contrasts Analyses (Group Comparisons)","text":"make four figures comparisons significant combine one plot. function throw error dataset contains missing data. omit rows missing data now. Make figure panel 1  Make figure panel 2  Make figure panel 3  Make figure panel 4  ‚Äôs now time combine four plots one figure! Yeah!  Let‚Äôs save high-resolution/vector version figure PDF (.png format necessary).","code":"Data <- na.omit(data) (EC <- nice_violin(group = \"Group\",                    response = \"IRIEC\",                     data = Data,                    colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),                     ytitle = \"Empathic Concern (from IRI)\",                     signif_annotation = \"*\",                     signif_yposition = 5.2,                     signif_xmin = 1,                     signif_xmax = 3)) (PD <- nice_violin(group = \"Group\",                     response = \"IRIPD\",                     data = Data,                    colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),                     ytitle = \"Personal Distress (from IRI)\",                     signif_annotation = \"*\",                     signif_yposition = 5,                     signif_xmin = 1,                    signif_xmax = 3)) (PR <- nice_violin(group = \"Group\",                     response = \"QCAEPR\",                     data = Data,                    colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),                     ytitle = \"Peripheral Responsivity (from QCAE)\",                     signif_annotation=\"*\",                    signif_yposition=4.2,                    signif_xmin=1,                    signif_xmax=3)) (IOS <- nice_violin(group = \"Group\",                      response = \"IOS\",                      data = Data,                     colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),                      ytitle = \"Self-Other Merging (from IOS)\",                      signif_annotation=c(\"***\", \"*\", \"*\"),                     signif_yposition=c(8.25, 7.5, 6.75),                     signif_xmin=c(1,1,2),                     signif_xmax=c(3,2,3))) library(ggpubr) (figure <- ggarrange(EC, PD, PR, IOS,                      labels = \"AUTO\",                      ncol = 2, nrow = 2)) ggplot2::ggsave('Figure 1.pdf', figure, width = 14, height = 14,                  unit = 'in', dpi = 300)"},{"path":"https://rempsyc.remi-theriault.com/articles/contrasts.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Full Workflow","what":"Thanks for checking in","title":"Planned Contrasts Analyses (Group Comparisons)","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/articles/featured.html","id":"citations","dir":"Articles","previous_headings":"","what":"Citations","title":"rempsyc: Featured In","text":"Jensen, . N., & Westergaard, M. (2022). Syntax Matters: Exploring Effect Linguistic Similarity Third Language Acquisition. Language Learning. https://doi.org/10.1111/lang.12525","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/featured.html","id":"testimonials","dir":"Articles","previous_headings":"","what":"Testimonials","title":"rempsyc: Featured In","text":"also just want say much love package function much! Thank much work contribution! - Seungju rempsyc package amazing! - Ville Thanks wonderful useful package - Maya package amazing! - Hugo discovered rempsyc extension flextable package quite impressed - Tom package amazing ‚Äì thank much - Taylor","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"getting-started","dir":"Articles","previous_headings":"","what":"Getting started","title":"Publication-ready moderations with simple slopes in R","text":"Let‚Äôs first load demo data. data set comes base R (meaning can directly type command R console). Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\"). moderations simple slopes, usually want standardize (least center) variables.","code":"head(mtcars) ##                    mpg cyl disp  hp drat    wt  qsec vs am gear carb ## Mazda RX4         21.0   6  160 110 3.90 2.620 16.46  0  1    4    4 ## Mazda RX4 Wag     21.0   6  160 110 3.90 2.875 17.02  0  1    4    4 ## Datsun 710        22.8   4  108  93 3.85 2.320 18.61  1  1    4    1 ## Hornet 4 Drive    21.4   6  258 110 3.08 3.215 19.44  1  0    3    1 ## Hornet Sportabout 18.7   8  360 175 3.15 3.440 17.02  0  0    3    2 ## Valiant           18.1   6  225 105 2.76 3.460 20.22  1  0    3    1 library(rempsyc) mtcars2 <- lapply(mtcars, scale) |> as.data.frame()"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"simple-moderation-nice_mod","dir":"Articles","previous_headings":"","what":"Simple moderation: nice_mod","title":"Publication-ready moderations with simple slopes in R","text":"want look nice Dependent Variable Predictor df Œ≤ t p sr2 95% CI mpg gear 28 -0.09 -0.80 .431 .00 [0.00, 0.03] wt 28 -0.95 -8.60 < .001*** .56 [0.31, 0.80] gear √ó wt 28 -0.24 -2.16 .040* .04 [0.00, 0.10] Note: sr2 (semi-partial correlation squared, also known delta R-square) allows us quantify unique contribution (proportion variance explained) independent variable dependent variable, variables model. sr2 often considered better indicator practical relevance variable.","code":"moderations <- nice_mod(   data = mtcars2,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\") moderations ##   Dependent Variable Predictor df           B          t            p ## 1                mpg      gear 28 -0.08718042 -0.7982999 4.314156e-01 ## 2                mpg        wt 28 -0.94959988 -8.6037724 2.383144e-09 ## 3                mpg   gear:wt 28 -0.23559962 -2.1551077 3.989970e-02 ##           sr2     CI_lower   CI_upper ## 1 0.004805465 0.0000000000 0.02702141 ## 2 0.558188818 0.3142326391 0.80214500 ## 3 0.035022025 0.0003502202 0.09723370 (my_table <- nice_table(moderations, highlight = TRUE))"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"save-table-to-word","dir":"Articles","previous_headings":"Simple moderation: nice_mod","what":"Save table to Word","title":"Publication-ready moderations with simple slopes in R","text":"Let‚Äôs save word use publication (optional).","code":"flextable::save_as_docx(my_table, path = \"moderations.docx\")"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"simple-slopes-nice_slopes","dir":"Articles","previous_headings":"","what":"Simple slopes: nice_slopes","title":"Publication-ready moderations with simple slopes in R","text":"Let‚Äôs extract simple slopes now, including sr2. Dependent Variable Predictor (+/-1 SD) df Œ≤ t p sr2 95% CI mpg gear (LOW-wt) 28 0.15 1.08 .291 .01 [0.00, 0.04] gear (MEAN-wt) 28 -0.09 -0.80 .431 .00 [0.00, 0.03] gear (HIGH-wt) 28 -0.32 -1.90 .067 .03 [0.00, 0.08] specific case, interaction significant none simple slopes. means although two slopes significantly different , taken individually, slopes aren‚Äôt significantly different straight line. neat thing can add many dependent variables want. Dependent Variable Predictor df Œ≤ t p sr2 95% CI mpg gear 28 -0.09 -0.80 .431 .00 [0.00, 0.03] wt 28 -0.95 -8.60 < .001*** .56 [0.31, 0.80] gear √ó wt 28 -0.24 -2.16 .040* .04 [0.00, 0.10] disp gear 28 -0.07 -0.70 .492 .00 [0.00, 0.02] wt 28 0.83 7.67 < .001*** .43 [0.19, 0.67] gear √ó wt 28 -0.09 -0.81 .422 .00 [0.00, 0.03] hp gear 28 0.42 2.65 .013* .11 [0.00, 0.27] wt 28 0.93 5.75 < .001*** .53 [0.29, 0.77] gear √ó wt 28 0.15 0.96 .346 .01 [0.00, 0.07] Dependent Variable Predictor (+/-1 SD) df Œ≤ t p sr2 95% CI mpg gear (LOW-wt) 28 0.15 1.08 .291 .01 [0.00, 0.04] gear (MEAN-wt) 28 -0.09 -0.80 .431 .00 [0.00, 0.03] gear (HIGH-wt) 28 -0.32 -1.90 .067 .03 [0.00, 0.08] disp gear (LOW-wt) 28 0.01 0.09 .926 .00 [0.00, 0.00] gear (MEAN-wt) 28 -0.07 -0.70 .492 .00 [0.00, 0.02] gear (HIGH-wt) 28 -0.16 -0.97 .339 .01 [0.00, 0.03] hp gear (LOW-wt) 28 0.27 1.34 .190 .03 [0.00, 0.11] gear (MEAN-wt) 28 0.42 2.65 .013* .11 [0.00, 0.27] gear (HIGH-wt) 28 0.58 2.33 .027* .09 [0.00, 0.22] Pro tip: nice_mod() nice_slopes() functions take argument, can just copy-paste first change function call save time!","code":"slopes <- nice_slopes(   data = mtcars2,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\") slopes ##   Dependent Variable Predictor (+/-1 SD) df           B          t          p ## 1                mpg       gear (LOW-wt) 28  0.14841920  1.0767040 0.29080233 ## 2                mpg      gear (MEAN-wt) 28 -0.08718042 -0.7982999 0.43141565 ## 3                mpg      gear (HIGH-wt) 28 -0.32278004 -1.9035367 0.06729622 ##           sr2 CI_lower   CI_upper ## 1 0.008741702        0 0.03886052 ## 2 0.004805465        0 0.02702141 ## 3 0.027322839        0 0.08179662 nice_table(slopes, highlight = TRUE) # Moderations nice_mod(data = mtcars2,          response = c(\"mpg\", \"disp\", \"hp\"),          predictor = \"gear\",          moderator = \"wt\") |>   nice_table(highlight = TRUE) # Simple slopes nice_slopes(data = mtcars2,             response = c(\"mpg\", \"disp\", \"hp\"),             predictor = \"gear\",             moderator = \"wt\") |>    nice_table(highlight = TRUE)"},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"covariates","dir":"Articles","previous_headings":"Special cases","what":"Covariates","title":"Publication-ready moderations with simple slopes in R","text":"can also complicated models, like added covariates.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"moderations","dir":"Articles","previous_headings":"Special cases > Covariates","what":"Moderations","title":"Publication-ready moderations with simple slopes in R","text":"Dependent Variable Predictor df Œ≤ t p sr2 95% CI mpg gear 26 -0.11 -0.88 .388 .00 [0.00, 0.02] wt 26 -0.70 -5.07 < .001*** .15 [0.02, 0.28] 26 0.13 0.86 .399 .00 [0.00, 0.02] vs 26 0.32 3.24 .003** .06 [0.00, 0.14] gear √ó wt 26 -0.25 -2.56 .017* .04 [0.00, 0.09]","code":"nice_mod(data = mtcars2,          response = \"mpg\",          predictor = \"gear\",          moderator = \"wt\",          covariates = c(\"am\", \"vs\")) |>    nice_table(highlight = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"simple-slopes","dir":"Articles","previous_headings":"Special cases > Covariates","what":"Simple slopes","title":"Publication-ready moderations with simple slopes in R","text":"Dependent Variable Predictor (+/-1 SD) df Œ≤ t p sr2 95% CI mpg gear (LOW-wt) 26 0.14 0.89 .383 .00 [0.00, 0.02] gear (MEAN-wt) 26 -0.11 -0.88 .388 .00 [0.00, 0.02] gear (HIGH-wt) 26 -0.36 -2.25 .033* .03 [0.00, 0.08] case, third row significant, means high wt variable (one standard deviation) significantly lower mpg higher gear. can plot traditional way:  Note: haven‚Äôt installed package yet, need install via following command: install.packages(interactions). Furthermore, know plot can heavily customized available arguments publication purposes, won‚Äôt going details .","code":"nice_slopes(data = mtcars2,             response = \"mpg\",             predictor = \"gear\",             moderator = \"wt\",             covariates = c(\"am\", \"vs\")) |>    nice_table(highlight = TRUE) # First need to define model for plot function mod <- lm(mpg ~ gear * wt + am + vs, data = mtcars2)  # Plot the model library(interactions) interact_plot(mod, pred = \"gear\", modx = \"wt\", interval = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"three-way-interaction","dir":"Articles","previous_headings":"Special cases","what":"Three-way interaction","title":"Publication-ready moderations with simple slopes in R","text":"Let‚Äôs make three-way interaction example. Note simple slopes, now, second moderator needs dichotomic variable (first moderator continuous variable). ‚Äôll reset variable purpose now.","code":"mtcars2$am <- mtcars$am"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"moderations-1","dir":"Articles","previous_headings":"Special cases > Three-way interaction","what":"Moderations","title":"Publication-ready moderations with simple slopes in R","text":"Dependent Variable Predictor df Œ≤ t p sr2 95% CI mpg gear 24 -0.43 -0.68 .500 .00 [0.00, 0.02] disp 24 -3.04 -3.16 .004** .06 [0.00, 0.14] 24 -0.21 -0.35 .731 .00 [0.00, 0.01] gear √ó disp 24 -1.09 -1.09 .287 .01 [0.00, 0.03] gear √ó 24 1.34 2.41 .024* .04 [0.00, 0.09] disp √ó 24 -0.07 -0.08 .936 .00 [0.00, 0.00] gear √ó disp √ó 24 1.90 2.21 .037* .03 [0.00, 0.08]","code":"nice_mod(response = \"mpg\",          predictor = \"gear\",          moderator = \"disp\",          moderator2 = \"am\",          data = mtcars2) |>    nice_table(highlight = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"simple-slopes-1","dir":"Articles","previous_headings":"Special cases > Three-way interaction","what":"Simple slopes","title":"Publication-ready moderations with simple slopes in R","text":"Dependent Variable Predictor (+/-1 SD) df Œ≤ t p sr2 95% CI mpg 0.00 gear (LOW-disp) 24 1.11 1.57 .131 .02 [0.00, 0.05] 0.00 gear (MEAN-disp) 24 -1.53 -1.49 .148 .01 [0.00, 0.05] 0.00 gear (HIGH-disp) 24 -4.16 -1.56 .131 .02 [0.00, 0.05] 1.00 gear (LOW-disp) 24 -0.00 -0.01 .990 .00 [0.00, 0.00] 1.00 gear (MEAN-disp) 24 1.17 2.59 .016* .04 [0.00, 0.10] 1.00 gear (HIGH-disp) 24 2.34 2.71 .012* .05 [0.00, 0.11] 2## Complex models: nice_lm complicated models supported nice_mod, one can define model traditional way feed nice_lm nice_lm_slopes instead. support multiple lm models well.","code":"nice_slopes(data = mtcars2,             response = \"mpg\",             predictor = \"gear\",             moderator = \"disp\",             moderator2 = \"am\") |>    nice_table(highlight = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"nice_lm","dir":"Articles","previous_headings":"Special cases","what":"nice_lm","title":"Publication-ready moderations with simple slopes in R","text":"Dependent Variable Predictor df b t p sr2 95% CI mpg cyl 27 -0.11 -0.72 .479 .00 [0.00, 0.01] wt 27 -0.62 -5.70 < .001*** .14 [0.02, 0.25] hp 27 -0.29 -2.40 .023* .02 [0.00, 0.06] wt √ó hp 27 0.29 3.23 .003** .04 [0.00, 0.10] qsec disp 27 -0.43 -1.97 .059 .07 [0.00, 0.20] drat 27 -0.33 -1.53 .138 .04 [0.00, 0.14] carb 27 -0.51 -3.32 .003** .20 [0.00, 0.41] drat √ó carb 27 -0.23 -1.08 .289 .02 [0.00, 0.09] applies simple slopes, time use nice_lm_slopes function. supports multiple lm models well, predictor moderator need models (dependent variable can change).","code":"model1 <- lm(mpg ~ cyl + wt * hp, mtcars2) model2 <- lm(qsec ~ disp + drat * carb, mtcars2) my.models <- list(model1, model2) nice_lm(my.models) |>    nice_table(highlight = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"nice_lm_slopes","dir":"Articles","previous_headings":"Special cases","what":"nice_lm_slopes","title":"Publication-ready moderations with simple slopes in R","text":"Dependent Variable Predictor (+/-1 SD) df b t p sr2 95% CI mpg gear (LOW-wt) 28 0.15 1.08 .291 .01 [0.00, 0.04] gear (MEAN-wt) 28 -0.09 -0.80 .431 .00 [0.00, 0.03] gear (HIGH-wt) 28 -0.32 -1.90 .067 .03 [0.00, 0.08] disp gear (LOW-wt) 28 0.01 0.09 .926 .00 [0.00, 0.00] gear (MEAN-wt) 28 -0.07 -0.70 .492 .00 [0.00, 0.02] gear (HIGH-wt) 28 -0.16 -0.97 .339 .01 [0.00, 0.03]","code":"model1 <- lm(mpg ~ gear * wt, mtcars2) model2 <- lm(disp ~ gear * wt, mtcars2) my.models <- list(model1, model2) nice_lm_slopes(my.models, predictor = \"gear\", moderator = \"wt\") |>    nice_table(highlight = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/moderation.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Special cases","what":"Thanks for checking in","title":"Publication-ready moderations with simple slopes in R","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/randomize.html","id":"getting-started","dir":"Articles","previous_headings":"","what":"Getting started","title":"Easy randomization in R","text":"‚Äôs easily nice_randomize either within-subject -group! Sure, might just want generate random number n times, hope group gets approximately number participants assigned . , can make sure making ‚Äúblocks‚Äù without replacements. four groups, block four contain group , random order, repeat. Let‚Äôs see . Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\").","code":"library(rempsyc)"},{"path":"https://rempsyc.remi-theriault.com/articles/randomize.html","id":"between-group-design","dir":"Articles","previous_headings":"","what":"Between-Group Design","title":"Easy randomization in R","text":"Basic output default options (3 conditions, 9 participants, -group design): Specify design, number conditions, number participants, names conditions: aware function won‚Äôt work -group designs unless sample size multiple number groups (4 groups, sample size can‚Äôt 5, 6, 7, can 4, 8, 12, etc., participants). can still try otherwise get error warning message. works ‚Äúblocks‚Äù operations won‚Äôt able completed otherwise.","code":"nice_randomize() ##   id Condition ## 1  1         b ## 2  2         a ## 3  3         c ## 4  4         c ## 5  5         b ## 6  6         a ## 7  7         c ## 8  8         a ## 9  9         b nice_randomize(design = \"between\",                 Ncondition = 4,                 n = 8,                 condition.names = c(\"BP\",\"CX\",\"PZ\",\"ZL\")) ##   id Condition ## 1  1        PZ ## 2  2        BP ## 3  3        ZL ## 4  4        CX ## 5  5        CX ## 6  6        ZL ## 7  7        BP ## 8  8        PZ # Warning: sample size needs to be a multiple of your  # number of groups if using \"between\"! # FYI: condition names stand for popular antidepressants: # BP = Bupropion, CX = Celexa, PZ = Prozac, ZL = Zoloft."},{"path":"https://rempsyc.remi-theriault.com/articles/randomize.html","id":"within-group-design","dir":"Articles","previous_headings":"","what":"Within-Group Design","title":"Easy randomization in R","text":"Basic output default options (3 conditions 9 participants) within-subject design specified Specify design, number conditions, number participants, names conditions: Note call conditions anything (like , b, c, etc.).","code":"nice_randomize(design = \"within\") ##   id Condition ## 1  1 b - c - a ## 2  2 a - c - b ## 3  3 b - c - a ## 4  4 b - c - a ## 5  5 a - b - c ## 6  6 b - a - c ## 7  7 a - b - c ## 8  8 a - b - c ## 9  9 a - b - c nice_randomize(design = \"within\",                 Ncondition = 4,                 n = 6,                 condition.names = c(\"SV\",\"AV\",\"ST\",\"AT\")) ##   id         Condition ## 1  1 AT - SV - ST - AV ## 2  2 ST - SV - AV - AT ## 3  3 AV - ST - SV - AT ## 4  4 ST - AT - SV - AV ## 5  5 SV - ST - AT - AV ## 6  6 SV - ST - AV - AT # FYI: condition names stand for forms of multisensory stimulation: # SV = Synchronous Visual, AV = Asynchronous Visual,  # ST = Synchronous Tactile, AT = Asynchronous Tactile."},{"path":"https://rempsyc.remi-theriault.com/articles/randomize.html","id":"make-a-quick-runsheet","dir":"Articles","previous_headings":"","what":"Make a quick runsheet","title":"Easy randomization in R","text":"nice way make run sheet quickly (regardless design) adding column names advance col.names argument:","code":"nice_randomized_subjects <- nice_randomize(   design = \"within\",    Ncondition = 4,    n = 128,   condition.names = c(\"SV\",\"AV\",\"ST\",\"AT\"),    col.names = c(\"id\", \"Condition\", \"Date/Time\",                 \"SONA ID\", \"Age/Gd.\", \"Handedness\",                 \"Tester\", \"Notes\")) head(nice_randomized_subjects) ##   id         Condition Date/Time SONA ID Age/Gd. Handedness Tester Notes ## 1  1 AV - SV - AT - ST        NA      NA      NA         NA     NA    NA ## 2  2 SV - AT - AV - ST        NA      NA      NA         NA     NA    NA ## 3  3 AV - ST - AT - SV        NA      NA      NA         NA     NA    NA ## 4  4 AT - ST - SV - AV        NA      NA      NA         NA     NA    NA ## 5  5 SV - ST - AV - AT        NA      NA      NA         NA     NA    NA ## 6  6 AV - ST - SV - AT        NA      NA      NA         NA     NA    NA"},{"path":"https://rempsyc.remi-theriault.com/articles/randomize.html","id":"save-data-frame-to-word","dir":"Articles","previous_headings":"Make a quick runsheet","what":"Save data frame to Word","title":"Easy randomization in R","text":"Save resulting dataframe nice_table, Word: saving dataframe Word, open Word. Make document horizontal going Layout tab, Page Setup section, clicking ‚ÄúOrientation‚Äù button selecting Landscape option.  Select whole table.  Left align table.  Turn preferred width table properties.   Make required formatting arrangements: Home tab, Paragraph section, click Borders button, click Borders.  Next adjust columns width fit page (especially ‚ÄúNotes‚Äù column, wider).  necessary, pull table left little square pound Move Table Column button top margin create space (note table selected first).  Double-click header edit add title (e.g., ‚ÄúStudy 3 Runsheet‚Äù); center bold (suggested font size: 14).  title smaller font (bold; suggested size: 12), add legend conditions (e.g., ‚ÄúSV = Synchronous Visual, AV = Asynchronous Visual, ST = Synchronous Tactile, = Asynchronous Tactile‚Äù).  Add page number bottom page going Insert tab, Header & Footer section, click ‚ÄúPage Number‚Äù button, selecting ‚ÄúBottom Page‚Äù, Plain Number 3 (bottom right).  Now ‚ÄòSave ‚Äô using F12 keyboard key, select save .pdf, ‚Äôre done! :)  can now use runsheet , print , send research assistants! Note: might want save word document work lose perhaps reuse future!","code":"runsheet <- nice_table(nice_randomized_subjects) flextable::save_as_docx(runsheet, path = \"runsheet.docx\") # Change the path to where you would like to save it. # If you copy-paste your path name, remember to  # use \"R\" slashes ('/' rather than '\\'). # Also remember to specify the .docx extension of the file."},{"path":"https://rempsyc.remi-theriault.com/articles/randomize.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Make a quick runsheet","what":"Thanks for checking in","title":"Easy randomization in R","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"basic-idea","dir":"Articles","previous_headings":"","what":"Basic idea","title":"Publication-ready scatter plots in R","text":"nice_violin() function, ‚Äôs make nice scatter plots easily! Let‚Äôs first load demo data. data set comes base R (meaning can directly type command R console).","code":"data(\"mtcars\") head(mtcars) ##                    mpg cyl disp  hp drat    wt  qsec vs am gear carb ## Mazda RX4         21.0   6  160 110 3.90 2.620 16.46  0  1    4    4 ## Mazda RX4 Wag     21.0   6  160 110 3.90 2.875 17.02  0  1    4    4 ## Datsun 710        22.8   4  108  93 3.85 2.320 18.61  1  1    4    1 ## Hornet 4 Drive    21.4   6  258 110 3.08 3.215 19.44  1  0    3    1 ## Hornet Sportabout 18.7   8  360 175 3.15 3.440 17.02  0  0    3    2 ## Valiant           18.1   6  225 105 2.76 3.460 20.22  1  0    3    1"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"getting-started","dir":"Articles","previous_headings":"Basic idea","what":"Getting started","title":"Publication-ready scatter plots in R","text":"Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\").  Pro tip: Recommended dimensions saving 7 inches wide 7 inches high. .pdf .eps formats recommended scalable vector graphics high-resolution submissions scientific journals. However, can also save formats, .tiff, .png, .jpg.","code":"library(rempsyc) nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\") ### Save a high-resolution image file to specified directory ggplot2::ggsave('nice_scatterplothere.pdf', width = 7, height = 7,                  unit = 'in', dpi = 300) # Change the path to where you would like to save it. # If you copy-paste your path name, remember to  # use \"R\" slashes ('/' rather than '\\'). # Also remember to specify the .tiff extension of the file."},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"change-x--and-y--axis-labels","dir":"Articles","previous_headings":"Customization","what":"Change x- and y- axis labels","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              ytitle = \"Miles/(US) gallon\",              xtitle = \"Weight (1000 lbs)\")"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"have-points-jittered","dir":"Articles","previous_headings":"Customization","what":"Have points ‚Äújittered‚Äù","title":"Publication-ready scatter plots in R","text":"Meaning randomly moved around bit prevent overplotting (two points overlap, thus hiding information).","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              has.jitter = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"change-the-transparency-of-the-points","dir":"Articles","previous_headings":"Customization","what":"Change the transparency of the points","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              alpha = 1) # default is 0.7"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"remove-points","dir":"Articles","previous_headings":"Customization","what":"Remove points","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              has.points = FALSE,              has.jitter = FALSE)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"add-confidence-band","dir":"Articles","previous_headings":"Customization","what":"Add confidence band","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              has.confband = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"set-x--and-y--scales-manually","dir":"Articles","previous_headings":"Customization","what":"Set x- and y- scales manually","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              xmin = 1,              xmax = 6,              xby = 1,              ymin = 10,              ymax = 35,              yby = 5)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"change-plot-colour","dir":"Articles","previous_headings":"Customization","what":"Change plot colour","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              colours = \"blueviolet\")"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"add-correlation-coefficient-to-plot-and-p-value","dir":"Articles","previous_headings":"Customization","what":"Add correlation coefficient to plot and p-value","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,                          predictor = \"wt\",              response = \"mpg\",              has.r = TRUE,              has.p = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"change-location-of-correlation-coefficient-or-p-value","dir":"Articles","previous_headings":"Customization","what":"Change location of correlation coefficient or p-value","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              has.r = TRUE,              r.x = 4,              r.y = 25,              has.p = TRUE,              p.x = 5,              p.y = 20)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"plot-by-group","dir":"Articles","previous_headings":"Customization","what":"Plot by group","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\")"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"use-full-range-on-the-slopeconfidence-band","dir":"Articles","previous_headings":"Customization","what":"Use full range on the slope/confidence band","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.fullrange = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"add-a-legend","dir":"Articles","previous_headings":"Customization","what":"Add a legend","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.legend = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"change-order-of-labels-on-the-legend","dir":"Articles","previous_headings":"Customization","what":"Change order of labels on the legend","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.legend = TRUE,              groups.order = c(8,4,6)) # These are the levels of 'mtcars$cyl', so we place lvl 8  # first, then lvl 4, etc."},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"change-legend-labels","dir":"Articles","previous_headings":"Customization","what":"Change legend labels","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.legend = TRUE,              groups.labels = c(\"Weak\",\"Average\",\"Powerful\")) # Warning: This applies after changing order of level **Warning**: This only changes labels and applies after changing order of level! Always use `groups.order` first if you also need to use `groups.labels`! This is to make sure to have the right labels for the right groups!"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"add-a-title-to-legend","dir":"Articles","previous_headings":"Customization","what":"Add a title to legend","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,                          predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.legend = TRUE,              legend.title = \"Cylinders\")"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"plot-by-group-manually-specify-colours","dir":"Articles","previous_headings":"Customization","what":"Plot by group + manually specify colours","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              colours = c(\"burlywood\", \"darkgoldenrod\", \"chocolate\"))"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"plot-by-group-use-different-line-types-for-each-group","dir":"Articles","previous_headings":"Customization","what":"Plot by group + use different line types for each group","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.linetype = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"plot-by-group-use-different-point-shapes-for-each-group","dir":"Articles","previous_headings":"Customization","what":"Plot by group + use different point shapes for each group","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.shape = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"plot-by-group-point-shapes-line-types-legend-no-colours-black-and-white","dir":"Articles","previous_headings":"Customization","what":"Plot by group, point shapes, line types, legend + no colours (black and white)","title":"Publication-ready scatter plots in R","text":"","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.legend = TRUE,              legend.title = \"Cylinders\",              has.linetype = TRUE,              has.shape = TRUE,              colours = rep(\"black\", 3))"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"putting-it-all-together","dir":"Articles","previous_headings":"Customization","what":"Putting it all together","title":"Publication-ready scatter plots in R","text":"‚Äôd like see available options (bit long):","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              ytitle = \"Miles/(US) gallon\",              xtitle = \"Weight (1000 lbs)\",              has.points = FALSE,              has.jitter = TRUE,              alpha = 1,              has.confband = TRUE,              has.fullrange = FALSE,              group = \"cyl\",              has.linetype = TRUE,              has.shape = TRUE,              xmin = 1,              xmax = 6,              xby = 1,              ymin = 10,              ymax = 35,              yby = 5,              has.r = TRUE,              has.p = TRUE,              r.x = 5.5,              r.y = 25,              colours = c(\"burlywood\", \"darkgoldenrod\", \"chocolate\"),              has.legend = TRUE,              legend.title = \"Cylinders\",              groups.labels = c(\"Weak\", \"Average\", \"Powerful\"))"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"special-situation-add-group-average","dir":"Articles","previous_headings":"","what":"Special situation: Add group average","title":"Publication-ready scatter plots in R","text":"‚Äôs straightforward way add group average, ‚Äôs hack . first create second data set another ‚Äúgroup‚Äù used average.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"black-line-coloured-lines","dir":"Articles","previous_headings":"Special situation: Add group average","what":"Black line + coloured lines","title":"Publication-ready scatter plots in R","text":"need create FIRST layer just slopes. add transparency group lines except group average emphasize group average (new argument groups.alpha).  Finally ready add SECOND layer just points top previous layer. use standard ggplot syntax .","code":"# This simply copies the 'mtcars' dataset new.Data <- mtcars # That would be your \"Group\" variable normally # And this operation fills all cells of that column with the word # \"Average\" to identify our new 'group' new.Data$cyl <- \"Average\" # This adds the new \"Average\" group rows to the original data rows XData <- rbind(mtcars,new.Data) (p <- nice_scatter(data = XData,                    predictor = \"wt\",                    response = \"mpg\",                    has.points = FALSE,                    has.legend = TRUE,                    group = \"cyl\",                    colours = c(\"black\", \"#00BA38\", \"#619CFF\", \"#F8766D\"), # We add colours manually because we want average to be black to stand out                    groups.order = c(\"Average\",\"4\",\"6\",\"8\"), # We do this to have average on top since it's the most important                    groups.alpha = c(1,0.5,0.5,0.5))) # This adds 50% transparency to all lines except  # the first one (Average) which is 100% library(ggplot2) p + geom_point(data = mtcars,                size = 2,                 alpha = 0.5,                shape = 16, # We use shape 16 because the default shape 19 sometimes  # causes problems when exporting to PDF                mapping = aes(x = wt,                               y = mpg,                               colour = factor(cyl),                               fill = factor(cyl)))"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"black-line-coloured-dots","dir":"Articles","previous_headings":"Special situation: Add group average","what":"Black line, coloured dots","title":"Publication-ready scatter plots in R","text":"‚Äôd like instead still show group points black average line, can following first layer:  add points second layer :","code":"(p <- nice_scatter(data = mtcars,                    predictor = \"wt\",                    response = \"mpg\",                    has.points = FALSE,                    has.legend = TRUE, # Important argument! Else the next legend won't appear on the second layer!                    colours = \"black\")) p + geom_point(data = mtcars,                 size = 2,                 alpha = 0.5,                shape = 16,                mapping = aes(x = wt,                               y = mpg,                               colour = factor(cyl)))"},{"path":"https://rempsyc.remi-theriault.com/articles/scatter.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Special situation: Add group average","what":"Thanks for checking in","title":"Publication-ready scatter plots in R","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"getting-started","dir":"Articles","previous_headings":"","what":"Getting started","title":"Publication-ready t-tests in R","text":"function makes really easy get t-test results one simple, publication-ready table. Let‚Äôs first load demo data. data set comes base R (meaning can directly type command R console). Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\"). Note: function relies base R t.test function, uses Welch t-test per default (see : https://daniellakens.blogspot.com/2015/01/always-use-welchs-t-test-instead-.html). use Student t-test, simply add following argument: var.equal = TRUE. Now best thing function can put dependent variables interest function call output sweet, pre-formatted table convenience. want look nice Dependent Variable t df p d 95% CI mpg -3.77 18.33 .001** -1.48 [-2.27, -0.67] cyl 3.35 25.85 .002** 1.21 [0.43, 1.97] disp 4.20 29.26 < .001*** 1.45 [0.64, 2.23] hp 1.27 18.72 .221 0.49 [-0.23, 1.21] drat -5.65 27.20 < .001*** -2.00 [-2.86, -1.12] wt 5.49 29.23 < .001*** 1.89 [1.03, 2.73] Note: d Cohen‚Äôs d, 95% CI confidence interval effect size (Cohen‚Äôs d). p p-value, df degrees freedom, t t-value.","code":"head(mtcars) ##                    mpg cyl disp  hp drat    wt  qsec vs am gear carb ## Mazda RX4         21.0   6  160 110 3.90 2.620 16.46  0  1    4    4 ## Mazda RX4 Wag     21.0   6  160 110 3.90 2.875 17.02  0  1    4    4 ## Datsun 710        22.8   4  108  93 3.85 2.320 18.61  1  1    4    1 ## Hornet 4 Drive    21.4   6  258 110 3.08 3.215 19.44  1  0    3    1 ## Hornet Sportabout 18.7   8  360 175 3.15 3.440 17.02  0  0    3    2 ## Valiant           18.1   6  225 105 2.76 3.460 20.22  1  0    3    1 library(rempsyc) nice_t_test(data = mtcars,             response = \"mpg\",             group = \"am\",             warning = FALSE) ##   Dependent Variable         t       df           p         d  CI_lower ## 1                mpg -3.767123 18.33225 0.001373638 -1.477947 -2.265973 ##     CI_upper ## 1 -0.6705686 t.test.results <- nice_t_test(   data = mtcars,   response = names(mtcars)[1:6],   group = \"am\",   warning = FALSE) t.test.results ##   Dependent Variable         t       df            p          d   CI_lower ## 1                mpg -3.767123 18.33225 1.373638e-03 -1.4779471 -2.2659731 ## 2                cyl  3.354114 25.85363 2.464713e-03  1.2084550  0.4315896 ## 3               disp  4.197727 29.25845 2.300413e-04  1.4452210  0.6417834 ## 4                 hp  1.266189 18.71541 2.209796e-01  0.4943081 -0.2260466 ## 5               drat -5.646088 27.19780 5.266742e-06 -2.0030843 -2.8592770 ## 6                 wt  5.493905 29.23352 6.272020e-06  1.8924060  1.0300224 ##     CI_upper ## 1 -0.6705686 ## 2  1.9683146 ## 3  2.2295592 ## 4  1.2066992 ## 5 -1.1245498 ## 6  2.7329218 my_table <- nice_table(t.test.results) my_table"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"save-table-to-word","dir":"Articles","previous_headings":"Getting started","what":"Save table to Word","title":"Publication-ready t-tests in R","text":"Let‚Äôs save word use publication (optional).","code":"flextable::save_as_docx(my_table, path = \"t-tests.docx\")"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"special-cases","dir":"Articles","previous_headings":"","what":"Special cases","title":"Publication-ready t-tests in R","text":"function can passed regular arguments base t.test() function. example:","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"student-t-test-instead-of-welch","dir":"Articles","previous_headings":"Special cases","what":"Student t-test (instead of Welch)","title":"Publication-ready t-tests in R","text":"Dependent Variable t df p d 95% CI mpg -4.11 30 < .001*** -1.48 [-2.27, -0.67]","code":"nice_t_test(data = mtcars,             response = \"mpg\",             group = \"am\",             var.equal = TRUE) |>    nice_table()"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"one-sided-instead-of-two-sided","dir":"Articles","previous_headings":"Special cases","what":"One-sided (instead of two-sided)","title":"Publication-ready t-tests in R","text":"Dependent Variable t df p d 95% CI mpg -3.77 18.33 .001*** -1.48 [-2.27, -0.67]","code":"nice_t_test(data = mtcars,             response = \"mpg\",             group = \"am\",             alternative = \"less\",             warning = FALSE) |>    nice_table()"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"one-sample-instead-of-two-sample","dir":"Articles","previous_headings":"Special cases","what":"One-sample (instead of two-sample)","title":"Publication-ready t-tests in R","text":"Dependent Variable t df p d 95% CI mpg 2.90 31 .007** 0.51 [0.14, 0.88]","code":"nice_t_test(data = mtcars,             response = \"mpg\",             mu = 17,             warning = FALSE) |>    nice_table()"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"paired-t-test-instead-of-independent-samples","dir":"Articles","previous_headings":"Special cases","what":"Paired t test (instead of independent samples)","title":"Publication-ready t-tests in R","text":"Note paired t tests, need use paired = TRUE, also need data ‚Äúlong‚Äù format rather wide format (like ToothGrowth data set). case, group argument refers participant ID example, group/participant measured several times, thus several rows. Dependent Variable t df p d 95% CI len 3.30 29 .003** 0.60 [0.21, 0.99]","code":"nice_t_test(data = ToothGrowth,             response = \"len\",             group = \"supp\",             paired = TRUE) |>    nice_table()"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"multiple-comparison-corrections","dir":"Articles","previous_headings":"Special cases","what":"Multiple comparison corrections","title":"Publication-ready t-tests in R","text":"also possible correct multiple comparisons. Note Bonferroni correction supported time (simply multiplies p-value number tests). Bonferroni automatically correct number tests. Dependent Variable t df p d 95% CI mpg -3.77 18.33 .008** -1.48 [-2.27, -0.67] cyl 3.35 25.85 .015* 1.21 [0.43, 1.97] disp 4.20 29.26 .001** 1.45 [0.64, 2.23] hp 1.27 18.72 1.326 0.49 [-0.23, 1.21] drat -5.65 27.20 < .001*** -2.00 [-2.86, -1.12] wt 5.49 29.23 < .001*** 1.89 [1.03, 2.73]","code":"nice_t_test(data = mtcars,             response = names(mtcars)[1:6],             group = \"am\",             correction = \"bonferroni\",             warning = FALSE) |>    nice_table()"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"integrations","dir":"Articles","previous_headings":"","what":"Integrations","title":"Publication-ready t-tests in R","text":"ways t-tests format results properly, wish‚Äîexample broom report packages. Examples .","code":"model <- t.test(mpg ~ am, data = mtcars)"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"broom-table","dir":"Articles","previous_headings":"Integrations","what":"broom table","title":"Publication-ready t-tests in R","text":"Method Alternative Mean 1 Mean 2 M1 - M2 t df p 95% CI Welch Two Sample t-test two.sided 17.15 24.39 -7.24 -3.77 18.33 .001** [-11.28, -3.21]","code":"library(broom) (stats.table <- tidy(model, conf.int = TRUE)) ## # A tibble: 1 √ó 10 ##   estimate estimate1 estimate2 statistic p.value parameter conf.low conf.high ##      <dbl>     <dbl>     <dbl>     <dbl>   <dbl>     <dbl>    <dbl>     <dbl> ## 1    -7.24      17.1      24.4     -3.77 0.00137      18.3    -11.3     -3.21 ## # ‚Ñπ 2 more variables: method <chr>, alternative <chr> nice_table(stats.table, broom = \"t.test\")"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"report-table","dir":"Articles","previous_headings":"Integrations","what":"report table","title":"Publication-ready t-tests in R","text":"Method Alternative Parameter Group Mean_Group1 Mean_Group2 Difference t 95% CI (t) df p d 95% CI (d) Welch Two Sample t-test two.sided mpg 17.15 24.39 -7.24 -3.77 [-11.28, -3.21] 18.33 .001** -1.76 [-2.82, -0.67] report package provides quite comprehensive tables, one may request abbreviated table short argument. Parameter Group t df p d 95% CI (d) mpg -3.77 18.33 .001** -1.76 [-2.82, -0.67] go!","code":"library(report) (stats.table <- as.data.frame(report(model))) ## Welch Two Sample t-test ##  ## Parameter | Group | Mean_Group1 | Mean_Group2 | Difference |          95% CI | t(18.33) |     p |     d |          d  CI ## ------------------------------------------------------------------------------------------------------------------------ ## mpg       |    am |       17.15 |       24.39 |      -7.24 | [-11.28, -3.21] |    -3.77 | 0.001 | -1.76 | [-2.82, -0.67] ##  ## Alternative hypothesis: two.sided nice_table(stats.table, report = \"t.test\") nice_table(stats.table, report = \"t.test\", short = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/t-test.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Integrations","what":"Thanks for checking in","title":"Publication-ready t-tests in R","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"basic-idea","dir":"Articles","previous_headings":"","what":"Basic idea","title":"Publication-ready APA tables: from R to Word in 2 min","text":"previous workflow pretty tedious, preparing tables R (data frames), export Excel, copy Excel Word, finally format table Word. Whenever make minor changes, take quite bit time repeat steps. Fortunately, found package suits needs nicely, flextable. However, really need tables APA style 7th edition (Times New Roman size 12, horizontal lines, double-spaced, right number decimals, etc.), made function just default settings like simplify life. many existing options APA tables. however prebuild tables specific analyses contexts provide little flexibility (yet won‚Äôt export Word). need build tables require flexibility, read !","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"getting-started","dir":"Articles","previous_headings":"Basic idea","what":"Getting started","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\"). function can used almost dataframe (though allow duplicate column names). ‚Äôs simple example using mtcars dataset, comes base R (meaning can try example without downloading anything). Table 1 Motor Trend Car Road Tests mpg cyl disp hp drat wt qsec vs gear carb 21.00 6.00 160.00 110.00 3.90 2.62 16.46 0.00 1.00 4.00 4.00 21.00 6.00 160.00 110.00 3.90 2.88 17.02 0.00 1.00 4.00 4.00 22.80 4.00 108.00 93.00 3.85 2.32 18.61 1.00 1.00 4.00 1.00 Note. data extracted 1974 Motor Trend US magazine. * p < .05, ** p < .01, *** p < .001","code":"library(rempsyc) nice_table(   mtcars[1:3, ],    title = c(\"Table 1\", \"Motor Trend Car Road Tests\"),   note = c(\"The data was extracted from the 1974 Motor Trend US magazine.\",            \"* p < .05, ** p < .01, *** p < .001\"))"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"publication-ready-tables","dir":"Articles","previous_headings":"","what":"Publication-ready tables","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Let‚Äôs setup ‚Äòcredible‚Äô table actual statistics demonstration. normally need bit complicated code extract relevant statistical information create dataframe suits needs.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"custom-table","dir":"Articles","previous_headings":"Publication-ready tables","what":"Custom table","title":"Publication-ready APA tables: from R to Word in 2 min","text":"dataframe looks like (notice large number decimals): Now can apply function! Term Œ≤ SE t p 95% CI (Intercept) -0.18 0.09 -2.15 .041* [-0.36, -0.01] cyl -0.11 0.15 -0.72 .479 [-0.42, 0.20] wt -0.62 0.11 -5.70 < .001*** [-0.85, -0.40] hp -0.29 0.12 -2.40 .023* [-0.53, -0.04] wt √ó hp 0.29 0.09 3.23 .003** [0.11, 0.47] Next, can save flextable object, can later edit, view, export another software (e.g., Microsoft Word).","code":"# Standardize variables to get standardized coefficients mtcars.std <- lapply(mtcars, scale) # Create a simple linear model model <- lm(mpg ~ cyl + wt * hp, mtcars.std) # Gather summary statistics stats.table <- as.data.frame(summary(model)$coefficients) # Get the confidence interval (CI) of the regression coefficient CI <- confint(model) # Add a row to join the variables names and CI to the stats stats.table <- cbind(row.names(stats.table), stats.table, CI) # Rename the columns appropriately names(stats.table) <- c(\"Term\", \"B\", \"SE\", \"t\", \"p\", \"CI_lower\", \"CI_upper\") stats.table ##                    Term          B         SE          t            p ## (Intercept) (Intercept) -0.1835269 0.08532112 -2.1510135 4.058431e-02 ## cyl                 cyl -0.1082286 0.15071576 -0.7180977 4.788652e-01 ## wt                   wt -0.6230206 0.10927573 -5.7013627 4.663587e-06 ## hp                   hp -0.2874898 0.11955935 -2.4045781 2.331865e-02 ## wt:hp             wt:hp  0.2875867 0.08895462  3.2329593 3.221753e-03 ##               CI_lower     CI_upper ## (Intercept) -0.3585914 -0.008462403 ## cyl         -0.4174718  0.201014550 ## wt          -0.8472358 -0.398805290 ## hp          -0.5328053 -0.042174267 ## wt:hp        0.1050669  0.470106453 nice_table(stats.table) my_table <- nice_table(stats.table)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"save-table-to-word","dir":"Articles","previous_headings":"Publication-ready tables","what":"Save table to Word","title":"Publication-ready APA tables: from R to Word in 2 min","text":"One can easily save table word specifying object name desired path. Simply change path like save . copy-paste path name, remember use ‚ÄúR‚Äù slashes (‚Äò/‚Äô rather ‚Äò\\‚Äô). Also remember specify file name .docx extension. ‚Äôs ! Simple eh?","code":"flextable::save_as_docx(my_table, path = \"nice_tablehere.docx\")"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"statistical-formatting","dir":"Articles","previous_headings":"Publication-ready tables","what":"Statistical formatting","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Notice provide CI_lower CI_upper column names, automatically properly format confidence interval column remove lower upper bound columns. can also see automatically formats df, b, t, p values italic. also correctly rounded row, formatted p values < .001 stripped leading zeros (correlations r, R2, sr2). Note: order work automatically, columns must named correctly. Currently function make following conversions: p, t, SE, SD, M, W, N, n, z, F, b, r, df italic; R2 sr2 italic squared, dR italic R subscript, np2 italic Œ∑ subscript-p squared, ges italic Œ∑ subscript-G squared, B Œ≤. seeing symbol ? Contact ‚Äôll add ! Let‚Äôs test simply changing dataframe names exercise. dR N M SD W Œ∑p2 Œ∑G2 z r R2 sr2 21.00 6 160.00 110.00 3.90 2.62 16.46 0 1.0 .40 .40 21.00 6 160.00 110.00 3.90 2.88 17.02 0 1.0 .40 .40 22.80 4 108.00 93.00 3.85 2.32 18.61 1 1.0 .40 .10","code":"test <- head(mtcars, 3) names(test) <- c(\"dR\", \"N\", \"M\", \"SD\", \"W\", \"np2\", \"ges\", \"z\", \"r\", \"R2\", \"sr2\") test[, 10:11] <- test[, 10:11]/10 nice_table(test)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"highlighting","dir":"Articles","previous_headings":"Publication-ready tables","what":"Highlighting","title":"Publication-ready APA tables: from R to Word in 2 min","text":"can also add argument highlight significant results better visual discrimination, wish . Term Œ≤ SE t p 95% CI (Intercept) -0.18 0.09 -2.15 .041* [-0.36, -0.01] cyl -0.11 0.15 -0.72 .479 [-0.42, 0.20] wt -0.62 0.11 -5.70 < .001*** [-0.85, -0.40] hp -0.29 0.12 -2.40 .023* [-0.53, -0.04] wt √ó hp 0.29 0.09 3.23 .003** [0.11, 0.47] Pro tip: can instead provide highlight argument numeric value set whatever critical p-value check want, like highlight = .10, ‚Äúmarginally significant‚Äù results, highlight = .01 want conservative. Term Œ≤ SE t p 95% CI (Intercept) -0.18 0.09 -2.15 .041* [-0.36, -0.01] cyl -0.11 0.15 -0.72 .479 [-0.42, 0.20] wt -0.62 0.11 -5.70 < .001*** [-0.85, -0.40] hp -0.29 0.12 -2.40 .023* [-0.53, -0.04] wt √ó hp 0.29 0.09 3.23 .003** [0.11, 0.47] remove traditional significance asterisks, can set stars argument FALSE. Term Œ≤ SE t p 95% CI (Intercept) -0.18 0.09 -2.15 .041 [-0.36, -0.01] cyl -0.11 0.15 -0.72 .479 [-0.42, 0.20] wt -0.62 0.11 -5.70 < .001 [-0.85, -0.40] hp -0.29 0.12 -2.40 .023 [-0.53, -0.04] wt √ó hp 0.29 0.09 3.23 .003 [0.11, 0.47]","code":"nice_table(stats.table, highlight = TRUE) nice_table(stats.table, highlight = .01) nice_table(stats.table, stars = FALSE)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"integrations","dir":"Articles","previous_headings":"","what":"Integrations","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Making table manually may intimidating first. Fortunately, function integrates nicely broom report packages. can also skip complicated code one OK using default broom/report output. requires specifying type model function‚Äôs broom/report argument (supported options lm, t.test, cor.test wilcox.test). go example .","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"broom-table","dir":"Articles","previous_headings":"Integrations","what":"broom table","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Term b SE t p 95% CI (Intercept) 49.49 3.66 13.51 < .001*** [41.97, 57.01] cyl -0.37 0.51 -0.72 .479 [-1.41, 0.68] wt -7.63 1.52 -5.01 < .001*** [-10.75, -4.51] hp -0.11 0.03 -3.64 .001** [-0.17, -0.05] wt √ó hp 0.03 0.01 3.23 .003** [0.01, 0.04]","code":"library(broom) model <- lm(mpg ~ cyl + wt * hp, mtcars) (stats.table <- tidy(model, conf.int = TRUE)) ## # A tibble: 5 √ó 7 ##   term        estimate std.error statistic  p.value  conf.low conf.high ##   <chr>          <dbl>     <dbl>     <dbl>    <dbl>     <dbl>     <dbl> ## 1 (Intercept)  49.5      3.66       13.5   1.58e-13  42.0       57.0    ## 2 cyl          -0.365    0.509      -0.718 4.79e- 1  -1.41       0.678  ## 3 wt           -7.63     1.52       -5.01  2.93e- 5 -10.7       -4.51   ## 4 hp           -0.108    0.0298     -3.64  1.14e- 3  -0.169     -0.0473 ## 5 wt:hp         0.0258   0.00799     3.23  3.22e- 3   0.00944    0.0422 nice_table(stats.table, broom = \"lm\")"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"report-table","dir":"Articles","previous_headings":"Integrations","what":"report table","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Parameter Fit b 95% CI (b) t df p Œ≤ 95% CI (Œ≤) (Intercept)  49.49 [41.97, 57.01] 13.51 27 < .001*** -0.18 [-0.36, -0.01] cyl  -0.37 [-1.41, 0.68] -0.72 27 .479 -0.11 [-0.42, 0.20] wt  -7.63 [-10.75, -4.51] -5.01 27 < .001*** -0.62 [-0.85, -0.40] hp  -0.11 [-0.17, -0.05] -3.64 27 .001** -0.29 [-0.53, -0.04] wt √ó hp  0.03 [0.01, 0.04] 3.23 27 .003** 0.29 [0.11, 0.47]          AIC 147.01        AICc 150.37        BIC 155.80        R2 0.89        R2 (adj.) 0.87        Sigma 2.17        report package provides quite comprehensive tables, one may request abbreviated table short argument. Parameter b t df p Œ≤ 95% CI (Œ≤) (Intercept) 49.49 13.51 27 < .001*** -0.18 [-0.36, -0.01] cyl -0.37 -0.72 27 .479 -0.11 [-0.42, 0.20] wt -7.63 -5.01 27 < .001*** -0.62 [-0.85, -0.40] hp -0.11 -3.64 27 .001** -0.29 [-0.53, -0.04] wt √ó hp 0.03 3.23 27 .003** 0.29 [0.11, 0.47]","code":"library(report) model <- lm(mpg ~ cyl + wt * hp, mtcars) (stats.table <- as.data.frame(report(model))) ## Parameter   | Coefficient |          95% CI | t(27) |      p | Std. Coef. | Std. Coef. 95% CI |    Fit ## ------------------------------------------------------------------------------------------------------ ## (Intercept) |       49.49 | [ 41.97, 57.01] | 13.51 | < .001 |      -0.18 |    [-0.36, -0.01] |        ## cyl         |       -0.37 | [ -1.41,  0.68] | -0.72 | 0.479  |      -0.11 |    [-0.42,  0.20] |        ## wt          |       -7.63 | [-10.75, -4.51] | -5.01 | < .001 |      -0.62 |    [-0.85, -0.40] |        ## hp          |       -0.11 | [ -0.17, -0.05] | -3.64 | 0.001  |      -0.29 |    [-0.53, -0.04] |        ## wt √ó hp     |        0.03 | [  0.01,  0.04] |  3.23 | 0.003  |       0.29 |    [ 0.11,  0.47] |        ##             |             |                 |       |        |            |                   |        ## AIC         |             |                 |       |        |            |                   | 147.01 ## AICc        |             |                 |       |        |            |                   | 150.37 ## BIC         |             |                 |       |        |            |                   | 155.80 ## R2          |             |                 |       |        |            |                   |   0.89 ## R2 (adj.)   |             |                 |       |        |            |                   |   0.87 ## Sigma       |             |                 |       |        |            |                   |   2.17 nice_table(stats.table) nice_table(stats.table, short = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"rempsyc-table","dir":"Articles","previous_headings":"Integrations","what":"rempsyc table","title":"Publication-ready APA tables: from R to Word in 2 min","text":"nice_table also integrates nicely functions rempsyc package: nice_t_test, nice_mod, nice_slopes, nice_lm, nice_lm_slopes, provide good default formats include effect sizes. Let‚Äôs make quick demo . t-test function supports making several t-tests specifying desired dependent variables.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"t-tests-nice_t_test","dir":"Articles","previous_headings":"Integrations > rempsyc table","what":"t-tests: nice_t_test","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Dependent Variable t df p d 95% CI mpg -3.77 18.33 .001** -1.48 [-2.27, -0.67] disp 4.20 29.26 < .001*** 1.45 [0.64, 2.23] drat -5.65 27.20 < .001*** -2.00 [-2.86, -1.12]","code":"stats.table <- nice_t_test(   data = mtcars,   response = c(\"mpg\", \"disp\", \"drat\"),   group = \"am\",   warning = FALSE) stats.table ##   Dependent Variable         t       df            p         d   CI_lower ## 1                mpg -3.767123 18.33225 1.373638e-03 -1.477947 -2.2659731 ## 2               disp  4.197727 29.25845 2.300413e-04  1.445221  0.6417834 ## 3               drat -5.646088 27.19780 5.266742e-06 -2.003084 -2.8592770 ##     CI_upper ## 1 -0.6705686 ## 2  2.2295592 ## 3 -1.1245498 nice_table(stats.table)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"moderations-nice_mod","dir":"Articles","previous_headings":"Integrations > rempsyc table","what":"Moderations: nice_mod","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Dependent Variable Predictor df Œ≤ t p sr2 95% CI mpg gear 28 -0.09 -0.80 .431 .00 [0.00, 0.03] wt 28 -0.95 -8.60 < .001*** .56 [0.31, 0.80] gear √ó wt 28 -0.24 -2.16 .040* .04 [0.00, 0.10]","code":"stats.table <- nice_mod(   data = mtcars,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\") stats.table ##   Dependent Variable Predictor df           B          t            p ## 1                mpg      gear 28 -0.08718042 -0.7982999 4.314156e-01 ## 2                mpg        wt 28 -0.94959988 -8.6037724 2.383144e-09 ## 3                mpg   gear:wt 28 -0.23559962 -2.1551077 3.989970e-02 ##           sr2     CI_lower   CI_upper ## 1 0.004805465 0.0000000000 0.02702141 ## 2 0.558188818 0.3142326391 0.80214500 ## 3 0.035022025 0.0003502202 0.09723370 nice_table(stats.table)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"custom-cell-formatting","dir":"Articles","previous_headings":"","what":"Custom cell formatting","title":"Publication-ready APA tables: from R to Word in 2 min","text":"cases, one may want define specific formatting specific columns. example, one may building table full p-values may want formatted (just appropriate columns).","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"p-values","dir":"Articles","previous_headings":"Custom cell formatting","what":"p-values","title":"Publication-ready APA tables: from R to Word in 2 min","text":"z r R2 sr2 < .001*** 1.00 .400 .400 < .001*** 1.00 .400 .400 1.00 1.00 .400 .100","code":"nice_table(test[8:11], col.format.p = 1:4)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"r-values","dir":"Articles","previous_headings":"Custom cell formatting","what":"r-values","title":"Publication-ready APA tables: from R to Word in 2 min","text":"goes r-values. see , can also overwrite automatic default formatting. z r R2 sr2 .00 1.0 .40 .40 .00 1.0 .40 .40 1.0 1.0 .40 .10","code":"nice_table(test[8:11], col.format.r = 1:4)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"custom-functions","dir":"Articles","previous_headings":"Custom cell formatting","what":"Custom functions","title":"Publication-ready APA tables: from R to Word in 2 min","text":"one can even provide custom function: z r R2 sr2 0 12.1 11.5 11.5 0 12.1 11.5 11.5 1 12.1 11.5 11.2 z r R2 sr2 0 √ó 1 √ó 0.4 √ó 0.4 0 √ó 1 √ó 0.4 √ó 0.4 1 √ó 1 √ó 0.4 √ó 0.1 M SD W Œ∑p2 160 110 4 3 160 110 4 3 108 93 4 2 M SD W Œ∑p2 160.00000 110.00000 3.90000 2.62000 160.00000 110.00000 3.90000 2.87500 108.00000 93.00000 3.85000 2.32000","code":"fun <- function(x) {x+11.1}  nice_table(test[8:11], col.format.custom = 2:4, format.custom = \"fun\") fun <- function(x) {paste(\"√ó\", x)}  nice_table(test[8:11], col.format.custom = 2:4, format.custom = \"fun\") fun <- function(x) {formatC(x, format = \"f\", digits = 0)}  nice_table(test[3:6], col.format.custom = 1:4, format.custom = \"fun\") fun <- function(x) {formatC(x, format = \"f\", digits = 5)}  nice_table(test[3:6], col.format.custom = 1:4, format.custom = \"fun\")"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"further-editing","dir":"Articles","previous_headings":"","what":"Further editing","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Often, one need tweak table particular situation. fear. function outputs flextable object, can ‚Äòeasily‚Äô edited via regular flextable functions. intro flextable functions, see: https://davidgohel.github.io/flextable/. basic formatting example provided flextable package: Model Term Standardized Beta SE t p-value 95% CI (Intercept) -0.18 0.09 -2.15 .041* [-0.36, -0.01] cyl -0.11 0.15 -0.72 .479 [-0.42, 0.20] wt -0.62 0.11 -5.70 < .001*** [-0.85, -0.40] hp -0.29 0.12 -2.40 .023* [-0.53, -0.04] wt √ó hp 0.29 0.09 3.23 .003** [0.11, 0.47]","code":"library(dplyr) library(flextable) my_table %>%   italic(j = 1, part = \"body\") %>%   bg(bg = \"gray\", part = \"header\") %>%   color(color = \"blue\", part = \"header\") %>%   color(~ t > -3.5, ~ t + SE, color = \"red\") %>%   bold(~ t > -3.5, ~ t + p, bold = TRUE) %>%   set_header_labels(Term = \"Model Term\",                     B   = \"Standardized Beta\",                     p = \"p-value\")"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"special-situation-multilevel-headers","dir":"Articles","previous_headings":"","what":"Special situation: multilevel headers","title":"Publication-ready APA tables: from R to Word in 2 min","text":"people asked make multilevel descriptive level tables nice_table. several ways using package. straightforward, ‚Äôs attempt multiple time measurements, multiple groups, multiple dependent variables. assuming study several time measurements, make copy iris data set pretend ‚ÄúTime 2‚Äù. Species grouping variable. can apply simple function, however, (painstakingly) reshape data proper format. Variable T1.setosa.M T1.setosa.SD T1.versicolor.M T1.versicolor.SD T1.virginica.M T1.virginica.SD T2.setosa.M T2.setosa.SD T2.versicolor.M T2.versicolor.SD T2.virginica.M T2.virginica.SD Sepal.Length 5.01 0.35 5.94 0.52 6.59 0.64 6.01 0.35 6.94 0.52 7.59 0.64 Sepal.Width 3.43 0.38 2.77 0.31 2.97 0.32 4.43 0.38 3.77 0.31 3.97 0.32 Petal.Length 1.46 0.17 4.26 0.47 5.55 0.55 2.46 0.17 5.26 0.47 6.55 0.55 far good; ‚Äôve managed transform data suitable format next step. data right shape (header components separated dots), can apply magic: Variable T1 T2 setosa versicolor virginica setosa versicolor virginica M SD M SD M SD M SD M SD M SD Sepal.Length 5.01 0.35 5.94 0.52 6.59 0.64 6.01 0.35 6.94 0.52 7.59 0.64 Sepal.Width 3.43 0.38 2.77 0.31 2.97 0.32 4.43 0.38 3.77 0.31 3.97 0.32 Petal.Length 1.46 0.17 4.26 0.47 5.55 0.55 2.46 0.17 5.26 0.47 6.55 0.55 find efficient way (data wrangling part), please let know. Nice result though!","code":"# Setup example dataset data <- cbind(iris[c(5, 1:3)], iris[1:3]+1) names(data)[-1] <- c(paste0(\"T1.\", names(data[2:4])),                      paste0(\"T2.\", names(data[2:4])))  # Get descriptive statistics library(dplyr) descriptive.data <- data %>%   group_by(Species) %>%    summarize(across(T1.Sepal.Length:T2.Petal.Length,                     list(m = mean, sd = sd),                    .names = \"{.col}.{.fn}\"))  # Rename the columns so we can merge them later names(descriptive.data) <- c(\"Species\", rep(c(\"T1.M\", \"T1.SD\"), 3),                              rep(c(\"T2.M\", \"T2.SD\"), 3))  # Extract the data by variable and measurement time T1.disp <- cbind(descriptive.data[1, 2:3],                   descriptive.data[2, 2:3],                   descriptive.data[3, 2:3]) T1.hp <- cbind(descriptive.data[1, 4:5],                 descriptive.data[2, 4:5],                 descriptive.data[3, 4:5]) T1.drat <- cbind(descriptive.data[1, 6:7],                   descriptive.data[2, 6:7],                   descriptive.data[3, 6:7]) T2.disp <- cbind(descriptive.data[1, 8:9],                  descriptive.data[2, 8:9],                   descriptive.data[3, 8:9]) T2.hp <- cbind(descriptive.data[1, 10:11],                 descriptive.data[2, 10:11],                 descriptive.data[3, 10:11]) T2.drat <- cbind(descriptive.data[1, 12:13],                   descriptive.data[2, 12:13],                   descriptive.data[3, 12:13])  # Combine Time 1 with Time 2 T1 <- rbind(T1.disp, T1.hp, T1.drat) T2 <- rbind(T2.disp, T2.hp, T2.drat) wide.data <- cbind(Variable = names(iris[1:3]), T1, T2)  # Rename variables to avoid duplicate names not allowed names(wide.data)[-1] <- paste0(   rep(c(\"T1.\", \"T2.\"), each = 6),    rep(descriptive.data$Species, times = 2, each = 2),   paste0(c(\".M\", \".SD\")))  # Make preliminary nice_table nice_table(wide.data) nice_table(wide.data, separate.header = TRUE, italics = seq(wide.data))"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"multilevel-heading-with-formatting","dir":"Articles","previous_headings":"Special situation: multilevel headers","what":"Multilevel heading, with formatting","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Another colleague asked, whether possible use multilevel headings, still benefiting regular automatic formatting p-values, confidence intervals, etc. challenging task implement, think ‚Äôve got something mostly work. Demo: Dependent Variable T1.t T1.df T1.p T1.d T1.CI_lower T1.CI_upper T2.t T2.df T2.p T2.d T2.CI_lower T2.CI_upper mpg -3.77 18.33 0.00 -1.48 -2.27 -0.67 -4.67 22.72 0.00 -1.73 -2.55 -0.90 disp 4.20 29.26 0.00 1.45 0.64 2.23 5.94 26.98 0.00 1.97 1.10 2.82 Dependent Variable T1 T2 t df p d 95% CI t df p d 95% CI mpg -3.77 18.33 .001** -1.48 [-2.27, -0.67] -4.67 22.72 < .001*** -1.73 [-2.55, -0.90] disp 4.20 29.26 < .001*** 1.45 [0.64, 2.23] 5.94 26.98 < .001*** 1.97 [1.10, 2.82] Let‚Äôs test adding another level heading testing. Dependent Variable Early.T1.t Early.T1.df Early.T1.p Early.T1.d Early.T1.CI_lower Early.T1.CI_upper Late.T2.t Late.T2.df Late.T2.p Late.T2.d Late.T2.CI_lower Late.T2.CI_upper mpg -3.77 18.33 0.00 -1.48 -2.27 -0.67 -4.67 22.72 0.00 -1.73 -2.55 -0.90 disp 4.20 29.26 0.00 1.45 0.64 2.23 5.94 26.98 0.00 1.97 1.10 2.82 Dependent Variable Early Late T1 T2 t df p d 95% CI t df p d 95% CI mpg -3.77 18.33 .001** -1.48 [-2.27, -0.67] -4.67 22.72 < .001*** -1.73 [-2.55, -0.90] disp 4.20 29.26 < .001*** 1.45 [0.64, 2.23] 5.94 26.98 < .001*** 1.97 [1.10, 2.82]","code":"T1.mpg <- nice_t_test(data = mtcars, response = \"mpg\", group = \"am\") T2.mpg <- nice_t_test(data = mtcars, response = \"mpg\", group = \"vs\") T1.disp <- nice_t_test(data = mtcars, response = \"disp\", group = \"am\") T2.disp <- nice_t_test(data = mtcars, response = \"disp\", group = \"vs\") names(T1.mpg)[-1] <- paste0(\"T1.\", names(T1.mpg)[-1]) names(T2.mpg) <- paste0(\"T2.\", names(T2.mpg)) names(T1.disp)[-1] <- paste0(\"T1.\", names(T1.disp)[-1]) names(T2.disp) <- paste0(\"T2.\", names(T2.disp)) T1 <- rbind(T1.mpg, T1.disp) T2 <- rbind(T2.mpg, T2.disp) wide.data <- cbind(T1, T2[-(1)]) nice_table(wide.data) nice_table(wide.data, separate.header = TRUE) names(wide.data)[-1] <- paste0(rep(c(\"Early.\", \"Late.\"), each = 6),                                 names(wide.data)[-1]) nice_table(wide.data) nice_table(wide.data, separate.header = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/table.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Special situation: multilevel headers","what":"Thanks for checking in","title":"Publication-ready APA tables: from R to Word in 2 min","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"getting-started","dir":"Articles","previous_headings":"","what":"Getting started","title":"Publication-ready violin plots in R","text":"happened lots plots slight variations, made function make life easier. function, particular, serves compare 2 experimental groups (although still plot 1 group). use violin plots instead bar plots provide information space (precisely, distribution density/frequency responses, allows visually estimate normality, skewness, kurtosis). Let‚Äôs first load demo data. data set comes base R (meaning can directly type command R console). Load rempsyc package: Note: haven‚Äôt installed package yet, need install via following command: install.packages(\"rempsyc\").","code":"data(\"ToothGrowth\") head(ToothGrowth) ##    len supp dose ## 1  4.2   VC  0.5 ## 2 11.5   VC  0.5 ## 3  7.3   VC  0.5 ## 4  5.8   VC  0.5 ## 5  6.4   VC  0.5 ## 6 10.0   VC  0.5 library(rempsyc) nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\") Dots = means Error bars = 95% confidence intervals Width = distribution density (frequency)"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"save-a-high-resolution-image-file-to-specified-directory","dir":"Articles","previous_headings":"Getting started","what":"Save a high-resolution image file to specified directory","title":"Publication-ready violin plots in R","text":"Pro tip: Recommended dimensions saving 7 inches wide 7 inches high. .pdf .eps formats recommended scalable vector graphics high-resolution submissions scientific journals. However, can also save formats, .tiff, .png, .jpg.","code":"ggplot2::ggsave('nice_violinplothere.pdf', width = 7, height = 7,                  unit = 'in', dpi = 300) # Change the path to where you would like to save it. # If you copy-paste your path name,  # remember to use \"R\" slashes ('/' rather than '\\'). # Also remember to specify the .tiff extension of the file."},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"change-x--and-y--axes-labels","dir":"Articles","previous_headings":"Customization","what":"Change x- and y- axes labels","title":"Publication-ready violin plots in R","text":"","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             ytitle = \"Length of Tooth\",             xtitle = \"Vitamin C Dosage\")"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"see-difference-between-two-groups","dir":"Articles","previous_headings":"Customization","what":"See difference between two groups","title":"Publication-ready violin plots in R","text":"see two groups statistically significantly different.","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             comp1 = \"0.5\",             comp2 = \"2\")"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"see-difference-between-two-other-groups","dir":"Articles","previous_headings":"Customization","what":"See difference between two other groups","title":"Publication-ready violin plots in R","text":"can also select groups based position x-axis (notice quotes time).","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             comp1 = 2,             comp2 = 3)"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"compare-all-three-groups","dir":"Articles","previous_headings":"Customization","what":"Compare all three groups","title":"Publication-ready violin plots in R","text":"want look three groups time? Unfortunately, underlying package use, ggsignif, allow comparison one group . need tweak manually instead. (Note can also use technique significance computed ggsignif correspond number stars want use, example use different p-value t-test.)","code":"nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   signif_annotation = c(\"*\",\"**\",\"***\"), # manually enter the number of stars   signif_yposition = c(30,36,40), # What height (y) should the stars appear?   signif_xmin = c(1,2,1), # Where should the left-sided brackets start (x)?   signif_xmax = c(2,3,3)) # Where should the right-sided brackets end (x)?"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"include-effect-size-cohens-d","dir":"Articles","previous_headings":"Customization","what":"Include effect size (Cohen‚Äôs d)","title":"Publication-ready violin plots in R","text":"","code":"nice_violin(data = mtcars,             group = \"am\",             response = \"mpg\",             comp1 = 1,             comp2 = 2,             has.d = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"set-the-colours-manually","dir":"Articles","previous_headings":"Customization","what":"Set the colours manually","title":"Publication-ready violin plots in R","text":"","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             colours = c(\"darkseagreen\",\"cadetblue\",\"darkslateblue\"))"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"changing-the-names-of-the-x-axis-labels","dir":"Articles","previous_headings":"Customization","what":"Changing the names of the x-axis labels","title":"Publication-ready violin plots in R","text":"","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             xlabels = c(\"Low\", \"Medium\", \"High\"))"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"removing-the-x-axis-or-y-axis-titles","dir":"Articles","previous_headings":"Customization","what":"Removing the x-axis or y-axis titles","title":"Publication-ready violin plots in R","text":"","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             ytitle = NULL,             xtitle = NULL)"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"removing-the-x-axis-or-y-axis-labels-for-whatever-purpose","dir":"Articles","previous_headings":"Customization","what":"Removing the x-axis or y-axis labels (for whatever purpose)","title":"Publication-ready violin plots in R","text":"","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             has.ylabels = FALSE,             has.xlabels = FALSE)"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"set-y-scale-manually","dir":"Articles","previous_headings":"Customization","what":"Set y-scale manually","title":"Publication-ready violin plots in R","text":"","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             ymin = 5,             ymax = 35,             yby = 5)"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"with-x-number-of-groups","dir":"Articles","previous_headings":"Customization","what":"With x number of groups","title":"Publication-ready violin plots in R","text":"Pro tip: Save figure greater width groups!","code":"ToothGrowth$six.groups <- sample(1:6, 60, replace=T) nice_violin(data = ToothGrowth,             group = \"six.groups\",             response = \"len\")"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"plotting-individual-observations","dir":"Articles","previous_headings":"Customization","what":"Plotting individual observations","title":"Publication-ready violin plots in R","text":"","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             obs = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"micro-customizations","dir":"Articles","previous_headings":"Customization","what":"Micro-Customizations","title":"Publication-ready violin plots in R","text":"also possible several minor adjustments: () adjust width caps (legs) confidence intervals CIcap.width argument (set 0 get rid ); (b) define level transparency alpha argument (1 transparency), (c) define colour violins‚Äô borders border.colour argument (default white equivalent borders).","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             CIcap.width = 0,             alpha = .70,             border.colour = \"white\")"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"bootstrapping","dir":"Articles","previous_headings":"Customization","what":"Bootstrapping","title":"Publication-ready violin plots in R","text":"function used give 95% bootstrapped confidence intervals (2000 bootstraps) error bars default, bootstrapping now specified explicitly. Bootstrapping non-parametric technique, meaning need respect classical parametric assumptions (normality, homoscedasticity, etc.). case ‚Äôs just nice alternative way look data. Note: bootstrapping requires number bootstraps equal higher number observations (rows). people sometimes work big datasets, ‚Äôve added option specify specific number bootstraps option bootstraps = 2000 (change default desired value). ‚Äôve recently work large data set (7 million observations), impractical 7 million bootstraps (, long operation), also added option turn bootstrapping completely just use regular confidence interval instead (boot = FALSE, now default).","code":""},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"putting-it-all-together","dir":"Articles","previous_headings":"Customization","what":"Putting it all together","title":"Publication-ready violin plots in R","text":"‚Äôd like see available options (bit long):","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             boot = TRUE,             bootstraps = 200,             ytitle = \"Length of Tooth\",                xtitle = \"Vitamin C Dosage\",             colours = c(\"darkseagreen\", \"cadetblue\", \"darkslateblue\"),             has.ylabels = TRUE,             has.xlabels = TRUE,             xlabels = c(\"Low\", \"Medium\", \"High\"),             ymin = 0,             ymax = 45,             yby = 15,             signif_annotation = c(\"*\",\"NS\",\"***\"),             signif_yposition = c(30,36,41),             signif_xmin = c(1,2,1),             signif_xmax = c(2,3,3),             CIcap.width = 0,             alpha = 0.5,             border.colour = \"black\",             border.size = 1,             obs = TRUE,             has.d = TRUE,             d.x = 1.7,             d.y = 20)"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"special-situation-add-other-plot-elements","dir":"Articles","previous_headings":"","what":"Special situation: Add other plot elements","title":"Publication-ready violin plots in R","text":"good thing function outputs ggplot object, can continue use build plot customize . instance, recently wanted add mean sample size annotations group (group sample sizes ranging 100 35,000, important know groups representative). demonstration, let‚Äôs just build multiple-groups plot earlier. simply added conventional ggplot code plot object. (first compute statistics going using:)","code":"# Create our group variable: ToothGrowth$groups <- factor(sample(1:6,60, replace=T))  # Make the plot and save it to object \"p\" p <- nice_violin(data = ToothGrowth,                  group = \"groups\",                  response = \"len\",                  border.size = 1) # Compute basic statistics and save to object library(psych) # Install the psych package if you don't already have it statsSummary <- describeBy(   x = ToothGrowth$len, group = ToothGrowth$groups, mat = TRUE)  # Add our annotations! (Warning: a bit more complicated code ahead!) library(ggplot2) p + annotate(   geom = \"text\",    # First annotation adds the average   x = seq(length(levels(ToothGrowth$groups))),   # Specifies annotations is for all groups/x-axis ticks   y = statsSummary$mean+2,    # Puts mean at mean value on the y-axis (adds 2)   label = paste0(\"m =\", round(statsSummary$mean, 2))) +    # That prints the mean on the plot   annotate(     geom = \"text\",      # (Second annotation adds the sample size)     x = seq(length(levels(ToothGrowth$groups))),     y = statsSummary$mean-2,      # Puts sample size at mean value on the y-axis (substracts 2)     label = paste0(\"n =\", round(statsSummary$n, 2))) # That prints the sample size on the plot"},{"path":"https://rempsyc.remi-theriault.com/articles/violin.html","id":"thanks-for-checking-in","dir":"Articles","previous_headings":"Special situation: Add other plot elements","what":"Thanks for checking in","title":"Publication-ready violin plots in R","text":"Make sure check page use code time encounter errors, periodically update improve code. Feel free contact comments, questions, requests improve function https://github.com/rempsyc/rempsyc/issues. See tutorials : https://remi-theriault.com/tutorials.","code":""},{"path":"https://rempsyc.remi-theriault.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"R√©mi Th√©riault. Author, maintainer.","code":""},{"path":"https://rempsyc.remi-theriault.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version x86_64-w64-mingw32) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version x86_64) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version mingw32) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version ucrt) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version x86_64, mingw32) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version ) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version 4) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version 2.2) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version 2022) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version 10) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version 31) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version 83211) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version R) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version R version 4.2.2 (2022-10-31 ucrt)) [Computer software]. https://rempsyc.remi-theriault.com Th√©riault, R. (2022). rempsyc: Convenience functions psychology (R package version Innocent Trusting) [Computer software]. https://rempsyc.remi-theriault.com","code":"@Misc{,   title = {rempsyc: Convenience Functions for Psychology},   author = {R√©mi Th√©riault},   year = {2022},   note = {(R package version x86_64-w64-mingw32) [Computer software].},   note = {(R package version x86_64) [Computer software].},   note = {(R package version mingw32) [Computer software].},   note = {(R package version ucrt) [Computer software].},   note = {(R package version x86_64, mingw32) [Computer software].},   note = {(R package version ) [Computer software].},   note = {(R package version 4) [Computer software].},   note = {(R package version 2.2) [Computer software].},   note = {(R package version 2022) [Computer software].},   note = {(R package version 10) [Computer software].},   note = {(R package version 31) [Computer software].},   note = {(R package version 83211) [Computer software].},   note = {(R package version R) [Computer software].},   note = {(R package version R version 4.2.2 (2022-10-31 ucrt)) [Computer software].},   note = {(R package version Innocent and Trusting) [Computer software].},   url = {https://rempsyc.remi-theriault.com}, }"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"rempsyc-convenience-functions-for-psychology-","dir":"","previous_headings":"","what":"Convenience Functions for Psychology","title":"Convenience Functions for Psychology","text":"R package convenience functions make workflow faster easier. Easily customizable plots (via ggplot2), nice APA tables exportable Word (via flextable), easily run statistical tests check assumptions, automatize various tasks. Mostly geared researchers psychological sciences. package still active development. Feel free open issue ask help, report bug, request feature. Release notes Development objectives (-list)","code":""},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Convenience Functions for Psychology","text":"can install rempsyc package directly CRAN: development version r-universe (note 24-hour delay GitHub): GitHub, latest version: can load package open help file, click ‚ÄúIndex‚Äù bottom. see available functions listed.","code":"install.packages(\"rempsyc\") install.packages(\"rempsyc\", repos = c(   rempsyc = \"https://rempsyc.r-universe.dev\",   CRAN = \"https://cloud.r-project.org\")) # If package `remotes` isn't already installed, install it with `install.packages(\"remotes\")` remotes::install_github(\"rempsyc/rempsyc\") library(rempsyc) ?rempsyc"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Convenience Functions for Psychology","text":"Nice APA tables T-tests, planned contrasts, regressions, moderations, simple slopes Visualization Utility functions Testing assumptions lavaanExtra","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_table","dir":"","previous_headings":"","what":"nice_table","title":"Convenience Functions for Psychology","text":"Make nice APA tables easily wrapper around flextable package sensical defaults automatic formatting features. tables can saved flextable::save_as_docx function, flextable objects, can modified . function also integrates objects broom report packages. Full tutorial: https://rempsyc.remi-theriault.com/articles/table Note: smoother integrated presentation flow, function now featured along functions.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_t_test","dir":"","previous_headings":"","what":"nice_t_test","title":"Convenience Functions for Psychology","text":"Easily compute t-test analyses, effect sizes, format publication-ready format. Supports multiple dependent variables . 95% confidence interval effect size (Cohen‚Äôs d).  Full tutorial: https://rempsyc.remi-theriault.com/articles/t-test","code":"library(rempsyc)  nice_t_test(data = mtcars,             response = c(\"mpg\", \"disp\", \"drat\", \"wt\"),             group = \"am\") -> t.tests t.tests #>   Dependent Variable         t       df              p         d   CI_lower #> 1                mpg -3.767123 18.33225 0.001373638333 -1.477947 -2.2659731 #> 2               disp  4.197727 29.25845 0.000230041299  1.445221  0.6417834 #> 3               drat -5.646088 27.19780 0.000005266742 -2.003084 -2.8592770 #> 4                 wt  5.493905 29.23352 0.000006272020  1.892406  1.0300224 #>     CI_upper #> 1 -0.6705686 #> 2  2.2295592 #> 3 -1.1245498 #> 4  2.7329218  # Format t-test results t_table <- nice_table(t.tests) t_table # Save to word flextable::save_as_docx(t_table, path = \"D:/R treasures/t_tests.docx\")"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_contrasts","dir":"","previous_headings":"","what":"nice_contrasts","title":"Convenience Functions for Psychology","text":"Easily compute regression planned contrast analyses (pairwise comparisons similar t-tests powerful 2 groups), format publication-ready format. Supports multiple dependent variables (supports three groups moment). particular case, confidence intervals bootstraped around Cohen‚Äôs d.  Full tutorial: https://rempsyc.remi-theriault.com/articles/contrasts","code":"contrasts <- nice_contrasts(   data = mtcars,   response = c(\"mpg\", \"disp\"),   group = \"cyl\",   covariates = \"hp\") contrasts #>   Dependent Variable Comparison df         t              p         d #> 1                mpg      4 - 8 28  3.663188 0.001028617005  3.587739 #> 2                mpg      6 - 8 28  1.290359 0.207480642577  1.440495 #> 3                mpg      4 - 6 28  3.640418 0.001092088865  2.147244 #> 4               disp      4 - 8 28 -6.040561 0.000001640986 -4.803022 #> 5               disp      6 - 8 28 -4.861413 0.000040511099 -3.288726 #> 6               disp      4 - 6 28 -2.703423 0.011534398020 -1.514296 #>     CI_lower   CI_upper #> 1  2.6313865  4.5520939 #> 2  0.8069705  1.9501735 #> 3  1.3395887  3.0175848 #> 4 -5.7954871 -3.9271356 #> 5 -4.2824222 -2.1855571 #> 6 -2.2702868 -0.9346695  # Format contrasts results nice_table(contrasts, highlight = .001)"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_mod","dir":"","previous_headings":"","what":"nice_mod","title":"Convenience Functions for Psychology","text":"Easily compute moderation analyses, effect sizes, format publication-ready format. Supports multiple dependent variables covariates .  Full tutorial: https://rempsyc.remi-theriault.com/articles/moderation","code":"moderations <- nice_mod(   data = mtcars,   response = c(\"mpg\", \"disp\"),   predictor = \"gear\",   moderator = \"wt\") moderations #>   Model Number Dependent Variable Predictor df          b          t          p #> 1            1                mpg      gear 28   5.615951  1.9437108 0.06204275 #> 2            1                mpg        wt 28   1.403861  0.4301493 0.67037970 #> 3            1                mpg   gear:wt 28  -1.966931 -2.1551077 0.03989970 #> 4            2               disp      gear 28  35.797623  0.6121820 0.54535707 #> 5            2               disp        wt 28 160.930043  2.4364098 0.02144867 #> 6            2               disp   gear:wt 28 -15.037022 -0.8140664 0.42247646 #>           sr2     CI_lower   CI_upper #> 1 0.028488305 0.0000000000 0.08418650 #> 2 0.001395217 0.0000000000 0.01331121 #> 3 0.035022025 0.0003502202 0.09723370 #> 4 0.002737218 0.0000000000 0.01919662 #> 5 0.043355972 0.0004335597 0.11228977 #> 6 0.004840251 0.0000000000 0.02679265  # Format moderation results nice_table(moderations, highlight = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_lm","dir":"","previous_headings":"","what":"nice_lm","title":"Convenience Functions for Psychology","text":"complicated models supported nice_mod, one can define model traditional way feed nice_lm instead. Supports multiple lm models well.  Full tutorial: https://rempsyc.remi-theriault.com/articles/moderation","code":"model1 <- lm(mpg ~ cyl + wt * hp, mtcars) model2 <- lm(qsec ~ disp + drat * carb, mtcars) mods <- nice_lm(list(model1, model2)) mods #>   Model Number Dependent Variable Predictor df            b          t #> 1            1                mpg       cyl 27 -0.365239089 -0.7180977 #> 2            1                mpg        wt 27 -7.627489287 -5.0146028 #> 3            1                mpg        hp 27 -0.108394273 -3.6404181 #> 4            1                mpg     wt:hp 27  0.025836594  3.2329593 #> 5            2               qsec      disp 27 -0.006222635 -1.9746464 #> 6            2               qsec      drat 27  0.227692395  0.1968842 #> 7            2               qsec      carb 27  1.154106215  0.7179431 #> 8            2               qsec drat:carb 27 -0.477539959 -1.0825727 #>               p          sr2     CI_lower   CI_upper #> 1 0.47886516037 0.0021596150 0.0000000000 0.01306786 #> 2 0.00002928375 0.1053130854 0.0089876445 0.20163853 #> 3 0.00113640283 0.0555024045 0.0005550240 0.11934768 #> 4 0.00322175341 0.0437733438 0.0004377334 0.09898662 #> 5 0.05861684483 0.0702566891 0.0000000000 0.19796621 #> 6 0.84539274511 0.0006984424 0.0000000000 0.01347203 #> 7 0.47895897531 0.0092872897 0.0000000000 0.05587351 #> 8 0.28857203297 0.0211165564 0.0000000000 0.09136014  # Format moderation results nice_table(mods, highlight = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_slopes","dir":"","previous_headings":"","what":"nice_slopes","title":"Convenience Functions for Psychology","text":"Easily compute simple slopes moderation analysis, effect sizes, format publication-ready format. Supports multiple dependent variables covariates .  Full tutorial: https://rempsyc.remi-theriault.com/articles/moderation","code":"simple.slopes <- nice_slopes(   data = mtcars,   response = c(\"mpg\", \"disp\"),   predictor = \"gear\",   moderator = \"wt\") simple.slopes #>   Model Number Dependent Variable Predictor (+/-1 SD) df         b         t #> 1            1                mpg       gear (LOW-wt) 28  7.540509 2.0106560 #> 2            1                mpg      gear (MEAN-wt) 28  5.615951 1.9437108 #> 3            1                mpg      gear (HIGH-wt) 28  3.691393 1.7955678 #> 4            2               disp       gear (LOW-wt) 28 50.510710 0.6654856 #> 5            2               disp      gear (MEAN-wt) 28 35.797623 0.6121820 #> 6            2               disp      gear (HIGH-wt) 28 21.084536 0.5067498 #>            p         sr2 CI_lower   CI_upper #> 1 0.05408136 0.030484485        0 0.08823243 #> 2 0.06204275 0.028488305        0 0.08418650 #> 3 0.08336403 0.024311231        0 0.07551496 #> 4 0.51118526 0.003234637        0 0.02113980 #> 5 0.54535707 0.002737218        0 0.01919662 #> 6 0.61629796 0.001875579        0 0.01548357  # Format simple slopes results nice_table(simple.slopes)"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_lm_slopes","dir":"","previous_headings":"","what":"nice_lm_slopes","title":"Convenience Functions for Psychology","text":"complicated models supported nice_slopes, one can define model traditional way feed nice_lm_slopes instead. Supports multiple lm models well, predictor moderator need models (dependent variable can change).  Full tutorial: https://rempsyc.remi-theriault.com/articles/moderation","code":"model1 <- lm(mpg ~ gear * wt, mtcars) model2 <- lm(disp ~ gear * wt, mtcars) my.models <- list(model1, model2) simple.slopes <- nice_lm_slopes(my.models, predictor = \"gear\", moderator = \"wt\") simple.slopes #>   Model Number Dependent Variable Predictor (+/-1 SD) df         b         t #> 1            1                mpg       gear (LOW-wt) 28  7.540509 2.0106560 #> 2            1                mpg      gear (MEAN-wt) 28  5.615951 1.9437108 #> 3            1                mpg      gear (HIGH-wt) 28  3.691393 1.7955678 #> 4            2               disp       gear (LOW-wt) 28 50.510710 0.6654856 #> 5            2               disp      gear (MEAN-wt) 28 35.797623 0.6121820 #> 6            2               disp      gear (HIGH-wt) 28 21.084536 0.5067498 #>            p         sr2 CI_lower   CI_upper #> 1 0.05408136 0.030484485        0 0.08823243 #> 2 0.06204275 0.028488305        0 0.08418650 #> 3 0.08336403 0.024311231        0 0.07551496 #> 4 0.51118526 0.003234637        0 0.02113980 #> 5 0.54535707 0.002737218        0 0.01919662 #> 6 0.61629796 0.001875579        0 0.01548357  # Format simple slopes results nice_table(simple.slopes)"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"visualization","dir":"","previous_headings":"","what":"Visualization","title":"Convenience Functions for Psychology","text":"plots can saved ggplot2::ggsave() function. ggplot2 objects can modified .","code":""},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_violin","dir":"","previous_headings":"","what":"nice_violin","title":"Convenience Functions for Psychology","text":"Make nice violin plots easily 95% bootstrapped confidence intervals.  Full tutorial: https://rempsyc.remi-theriault.com/articles/violin","code":"nice_violin(data = ToothGrowth,             group = \"dose\",             response = \"len\",             xlabels = c(\"Low\", \"Medium\", \"High\"),             comp1 = 1,             comp2 = 3,             has.d = TRUE,             d.y = 30) # Save plot ggplot2::ggsave('niceplot.pdf', width = 7, height = 7, unit = 'in',                  dpi = 300, path = \"D:/R treasures/\")"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_scatter","dir":"","previous_headings":"","what":"nice_scatter","title":"Convenience Functions for Psychology","text":"Make nice scatter plots easily.   Full tutorial: https://rempsyc.remi-theriault.com/articles/scatter","code":"nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              has.confband = TRUE,              has.r = TRUE,              has.p = TRUE) nice_scatter(data = mtcars,              predictor = \"wt\",              response = \"mpg\",              group = \"cyl\",              has.confband = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"overlap_circle","dir":"","previous_headings":"","what":"overlap_circle","title":"Convenience Functions for Psychology","text":"Interpolating Inclusion Self Scale (self-merging) easily.   Full tutorial: https://rempsyc.remi-theriault.com/articles/circles","code":"# Score of 3.5 (25% overlap) overlap_circle(3.5) # Score of 6.84 (81.8% overlap) overlap_circle(6.84)"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"cormatrix_excel","dir":"","previous_headings":"","what":"cormatrix_excel","title":"Convenience Functions for Psychology","text":"Easily output correlation matrix export Microsoft Excel, first row column frozen, correlation coefficients colour-coded based effect size (0.0-0.2: small (pink/light blue); 0.2-0.4: medium (orange/blue); 0.4-1.0: large (red/dark blue)).","code":"cormatrix_excel(data = infert,                  filename = \"cormatrix1\",                  select = c(\"age\", \"parity\", \"induced\", \"case\", \"spontaneous\",                             \"stratum\", \"pooled.stratum\")) #> # Correlation Matrix (pearson-method) #>  #> Parameter      |      age |   parity |  induced |     case | spontaneous |  stratum | pooled.stratum #> ---------------------------------------------------------------------------------------------------- #> age            |          |     0.08 |    -0.10 | 3.53e-03 |       -0.08 | -0.21*** |        -0.17** #> parity         |     0.08 |          |  0.45*** | 8.91e-03 |     0.31*** | -0.31*** |           0.12 #> induced        |    -0.10 |  0.45*** |          |     0.02 |    -0.27*** |    -0.10 |          0.16* #> case           | 3.53e-03 | 8.91e-03 |     0.02 |          |     0.36*** | 3.83e-03 |       4.86e-03 #> spontaneous    |    -0.08 |  0.31*** | -0.27*** |  0.36*** |             |     0.06 |        0.21*** #> stratum        | -0.21*** | -0.31*** |    -0.10 | 3.83e-03 |        0.06 |          |        0.75*** #> pooled.stratum |  -0.17** |     0.12 |    0.16* | 4.86e-03 |     0.21*** |  0.75*** |                #>  #> p-value adjustment method: none #>  #>  #>  [Correlation matrix 'cormatrix1.xlsx' has been saved to working directory (or where specified).] #> NULL"},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_na","dir":"","previous_headings":"","what":"nice_na","title":"Convenience Functions for Psychology","text":"Nicely reports NA values according existing guidelines (.e, reporting absolute percentage item-based missing values, plus scale‚Äôs maximum amount missing values given participant). Accordingly, allows specifying list columns representing questionnaire items produce questionnaire-based report missing values.","code":"# Create synthetic data frame for the demonstration set.seed(50) df <- data.frame(scale1_Q1 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA),                  scale1_Q2 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA),                  scale1_Q3 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA),                  scale2_Q1 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA),                  scale2_Q2 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA),                  scale2_Q3 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA),                  scale3_Q1 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA),                  scale3_Q2 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA),                  scale3_Q3 = c(sample(c(NA, 1:6), replace = TRUE), NA, NA))  # Then select your scales by name nice_na(df, scales = c(\"scale1\", \"scale2\", \"scale3\")) #>                   var items na cells na_percent na_max na_max_percent all_na #> 1 scale1_Q1:scale1_Q3     3  6    27      22.22      3            100      2 #> 2 scale2_Q1:scale2_Q3     3  9    27      33.33      3            100      2 #> 3 scale3_Q1:scale3_Q3     3  8    27      29.63      3            100      2 #> 4               Total     9 23    81      28.40      9            100      2  # Or whole dataframe nice_na(df) #>                   var items na cells na_percent na_max na_max_percent all_na #> 1 scale1_Q1:scale3_Q3     9 23    81       28.4      9            100      2"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"extract_duplicates","dir":"","previous_headings":"","what":"extract_duplicates","title":"Convenience Functions for Psychology","text":"Extracts duplicates (including first one, contrary duplicated dplyr::distinct) data frame visual inspection.","code":"df1 <- data.frame(    id = c(1, 2, 3, 1, 3),    item1 = c(NA, 1, 1, 2, 3),    item2 = c(NA, 1, 1, 2, 3),    item3 = c(NA, 1, 1, 2, 3) ) df1 #>   id item1 item2 item3 #> 1  1    NA    NA    NA #> 2  2     1     1     1 #> 3  3     1     1     1 #> 4  1     2     2     2 #> 5  3     3     3     3  extract_duplicates(df1, id = \"id\") #>   Row id item1 item2 item3 count_na #> 1   1  1    NA    NA    NA        3 #> 2   4  1     2     2     2        0 #> 3   3  3     1     1     1        0 #> 4   5  3     3     3     3        0"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"best_duplicate","dir":"","previous_headings":"","what":"best_duplicate","title":"Convenience Functions for Psychology","text":"Extracts ‚Äúbest‚Äù duplicate: one fewer number missing values (case ties, picks first one).","code":"best_duplicate(df1, id = \"id\") #> (2 duplicates removed) #>   id item1 item2 item3 #> 1  1     2     2     2 #> 2  2     1     1     1 #> 3  3     1     1     1"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"scale_mad","dir":"","previous_headings":"","what":"scale_mad","title":"Convenience Functions for Psychology","text":"Scale center (‚Äústandardize‚Äù) data based median median absolute deviation (MAD).","code":"scale_mad(mtcars$mpg) #>  [1]  0.33262558  0.33262558  0.66525116  0.40654238 -0.09239599 -0.20327119 #>  [7] -0.90548075  0.96091834  0.66525116  0.00000000 -0.25870878 -0.51741757 #> [13] -0.35110478 -0.73916796 -1.62616950 -1.62616950 -0.83156395  2.43925425 #> [19]  2.06967028  2.71644224  0.42502157 -0.68373036 -0.73916796 -1.09027273 #> [25]  0.00000000  1.49681511  1.25658552  2.06967028 -0.62829276  0.09239599 #> [31] -0.77612635  0.40654238"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"find_mad","dir":"","previous_headings":"","what":"find_mad","title":"Convenience Functions for Psychology","text":"Identify outliers based (e.g.,) 3 median absolute deviations (MAD) median.","code":"find_mad(data = mtcars, col.list = names(mtcars)[c(1:7, 10:11)], criteria = 3) #> 2 outlier(s) based on 3 median absolute deviations for variable(s):  #>  mpg, cyl, disp, hp, drat, wt, qsec, gear, carb  #>  #> Outliers per variable:  #>  #> $qsec #>   Row qsec_mad #> 1   9 3.665557 #>  #> $carb #>   Row carb_mad #> 1  31 4.046945"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"winsorize_mad","dir":"","previous_headings":"","what":"winsorize_mad","title":"Convenience Functions for Psychology","text":"Winsorize outliers based (e.g.,) 3 median absolute deviations (MAD).","code":"winsorize_mad(mtcars$qsec, criteria = 3) #>  [1] 16.46000 17.02000 18.61000 19.44000 17.02000 20.22000 15.84000 20.00000 #>  [9] 21.95765 18.30000 18.90000 17.40000 17.60000 18.00000 17.98000 17.82000 #> [17] 17.42000 19.47000 18.52000 19.90000 20.01000 16.87000 17.30000 15.41000 #> [25] 17.05000 18.90000 16.70000 16.90000 14.50000 15.50000 14.60000 18.60000"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_reverse","dir":"","previous_headings":"","what":"nice_reverse","title":"Convenience Functions for Psychology","text":"Easily recode scores (reverse-score), typically questionnaire answers.","code":"# Reverse score of 5 with a maximum score of 5 nice_reverse(5, 5) #> [1] 1  # Reverse scores with maximum = 4 and minimum = 0 nice_reverse(1:4, 4, min = 0) #> [1] 3 2 1 0  # Reverse scores with maximum = 3 and minimum = -3 nice_reverse(-3:3, 3, min = -3) #> [1]  3  2  1  0 -1 -2 -3"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"format_value","dir":"","previous_headings":"","what":"format_value","title":"Convenience Functions for Psychology","text":"Easily format p r values. Note: converts character class use figures manuscripts accommodate e.g., ‚Äú< .001‚Äù.","code":"format_p(0.0041231) #> [1] \".004\" format_p(t.tests$p) #> [1] \".001\"   \"< .001\" \"< .001\" \"< .001\" format_r(moderations$sr2) #> [1] \".03\" \".00\" \".04\" \".00\" \".04\" \".00\" format_d(t.tests$d) #> [1] \"-1.48\" \"1.45\"  \"-2.00\" \"1.89\""},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_randomize","dir":"","previous_headings":"","what":"nice_randomize","title":"Convenience Functions for Psychology","text":"Randomize easily different designs. Full tutorial: https://rempsyc.remi-theriault.com/articles/randomize","code":"# Specify design, number of conditions, number of participants, and names of conditions: nice_randomize(design = \"between\", Ncondition = 4, n = 8,                condition.names = c(\"BP\",\"CX\",\"PZ\",\"ZL\")) #>   id Condition #> 1  1        ZL #> 2  2        BP #> 3  3        PZ #> 4  4        CX #> 5  5        CX #> 6  6        PZ #> 7  7        BP #> 8  8        ZL  # Within-Group Design nice_randomize(design = \"within\", Ncondition = 3, n = 3,                condition.names = c(\"SV\",\"AV\",\"ST\")) #>   id    Condition #> 1  1 SV - AV - ST #> 2  2 AV - ST - SV #> 3  3 AV - SV - ST"},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_assumptions","dir":"","previous_headings":"","what":"nice_assumptions","title":"Convenience Functions for Psychology","text":"Test linear regression assumptions easily nice summary table.  Full tutorial: https://rempsyc.remi-theriault.com/articles/assumptions","code":"# Create regression model model <- lm(mpg ~ wt * cyl + gear, data = mtcars) # View results View(nice_assumptions(model))"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_normality","dir":"","previous_headings":"","what":"nice_normality","title":"Convenience Functions for Psychology","text":"Easily make nice density QQ plots per-group.  Full tutorial: https://rempsyc.remi-theriault.com/articles/assumptions","code":"nice_normality(data = iris,                variable = \"Sepal.Length\",                group = \"Species\",                grid = FALSE,                shapiro = TRUE,                histogram = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"plot_outliers","dir":"","previous_headings":"","what":"plot_outliers","title":"Convenience Functions for Psychology","text":"Visually check outliers based (e.g.) +/- 3 MAD (median absolute deviations) SD (standard deviations).   Full tutorial: https://rempsyc.remi-theriault.com/articles/assumptions","code":"plot_outliers(airquality,                group = \"Month\",               response = \"Ozone\") plot_outliers(airquality,               response = \"Ozone\",               method = \"sd\")"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_var","dir":"","previous_headings":"","what":"nice_var","title":"Convenience Functions for Psychology","text":"Obtain variance per group well check rule thumb one group variance four times bigger groups. Full tutorial: https://rempsyc.remi-theriault.com/articles/assumptions","code":"nice_var(data = iris,          variable = \"Sepal.Length\",          group = \"Species\") #>        Species Setosa Versicolor Virginica Variance.ratio Criteria #> 1 Sepal.Length  0.124      0.266     0.404            3.3        4 #>   Heteroscedastic #> 1           FALSE"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"nice_varplot","dir":"","previous_headings":"","what":"nice_varplot","title":"Convenience Functions for Psychology","text":"Attempt visualize variance per group.  Full tutorial: https://rempsyc.remi-theriault.com/articles/assumptions","code":"nice_varplot(data = iris,              variable = \"Sepal.Length\",              group = \"Species\")"},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"lavaanextra","dir":"","previous_headings":"","what":"lavaanExtra","title":"Convenience Functions for Psychology","text":"alternative, vector-based syntax lavaan (latent variable analysis/structural equation modeling package), well convenience functions naming paths defining indirect links automatically, see package, lavaanExtra. https://lavaanExtra.remi-theriault.com/","code":""},{"path":"https://rempsyc.remi-theriault.com/index.html","id":"support-me-and-this-package","dir":"","previous_headings":"","what":"Support me and this package","title":"Convenience Functions for Psychology","text":"Thank support. can support package : https://github.com/sponsors/rempsyc","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright ¬© 2007 Free Software Foundation, Inc.¬†<http://fsf.org/> Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program‚Äìmake sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers‚Äô authors‚Äô protection, GPL clearly explains warranty free software. users‚Äô authors‚Äô sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users‚Äô freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"‚ÄúLicense‚Äù refers version 3 GNU General Public License. ‚ÄúCopyright‚Äù also means copyright-like laws apply kinds works, semiconductor masks. ‚ÄúProgram‚Äù refers copyrightable work licensed License. licensee addressed ‚Äú‚Äù. ‚ÄúLicensees‚Äù ‚Äúrecipients‚Äù may individuals organizations. ‚Äúmodify‚Äù work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called ‚Äúmodified version‚Äù earlier work work ‚Äúbased ‚Äù earlier work. ‚Äúcovered work‚Äù means either unmodified Program work based Program. ‚Äúpropagate‚Äù work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. ‚Äúconvey‚Äù work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays ‚ÄúAppropriate Legal Notices‚Äù extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"‚Äúsource code‚Äù work means preferred form work making modifications . ‚ÄúObject code‚Äù means non-source form work. ‚ÄúStandard Interface‚Äù means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. ‚ÄúSystem Libraries‚Äù executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. ‚ÄúMajor Component‚Äù, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . ‚ÄúCorresponding Source‚Äù work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work‚Äôs System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users‚Äô Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work‚Äôs users, third parties‚Äô legal rights forbid circumvention technological measures.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program‚Äôs source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 ‚Äúkeep intact notices‚Äù. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called ‚Äúaggregate‚Äù compilation resulting copyright used limit access legal rights compilation‚Äôs users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. ‚ÄúUser Product‚Äù either (1) ‚Äúconsumer product‚Äù, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, ‚Äúnormally used‚Äù refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. ‚ÄúInstallation Information‚Äù User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"‚ÄúAdditional permissions‚Äù terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered ‚Äúrestrictions‚Äù within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. ‚Äúentity transaction‚Äù transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party‚Äôs predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"‚Äúcontributor‚Äù copyright holder authorizes use License Program work Program based. work thus licensed called contributor‚Äôs ‚Äúcontributor version‚Äù. contributor‚Äôs ‚Äúessential patent claims‚Äù patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, ‚Äúcontrol‚Äù includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor‚Äôs essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, ‚Äúpatent license‚Äù express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). ‚Äúgrant‚Äù patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. ‚ÄúKnowingly relying‚Äù means actual knowledge , patent license, conveying covered work country, recipient‚Äôs use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license ‚Äúdiscriminatory‚Äù include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others‚Äô Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License ‚Äúlater version‚Äù applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy‚Äôs public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM ‚Äú‚Äù WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://rempsyc.remi-theriault.com/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least ‚Äúcopyright‚Äù line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program‚Äôs commands might different; GUI interface, use ‚Äúbox‚Äù. also get employer (work programmer) school, , sign ‚Äúcopyright disclaimer‚Äù program, necessary. information , apply follow GNU GPL, see <http://www.gnu.org/licenses/>. GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read <http://www.gnu.org/philosophy/--lgpl.html>.","code":"<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year>  <name of author>  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>. <program>  Copyright (C) <year>  <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://rempsyc.remi-theriault.com/reference/best_duplicate.html","id":null,"dir":"Reference","previous_headings":"","what":"Choose the best duplicate ‚Äî best_duplicate","title":"Choose the best duplicate ‚Äî best_duplicate","text":"Chooses best duplicate, based duplicate smallest number missing values. case ties, picks first duplicate, one likely valid authentic, given practice effects.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/best_duplicate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choose the best duplicate ‚Äî best_duplicate","text":"","code":"best_duplicate(data, id)"},{"path":"https://rempsyc.remi-theriault.com/reference/best_duplicate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choose the best duplicate ‚Äî best_duplicate","text":"data data frame. id ID variable check duplicates.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/best_duplicate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Choose the best duplicate ‚Äî best_duplicate","text":"dataframe, containing \"best\" duplicates.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/best_duplicate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Choose the best duplicate ‚Äî best_duplicate","text":"easystats equivalent, see: datawizard::data_duplicated().","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/best_duplicate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Choose the best duplicate ‚Äî best_duplicate","text":"","code":"df1 <- data.frame(    id = c(1, 2, 3, 1, 3),    item1 = c(NA, 1, 1, 2, 3),    item2 = c(NA, 1, 1, 2, 3),    item3 = c(NA, 1, 1, 2, 3) )  best_duplicate(df1, id = \"id\") #> (2 duplicates removed) #>   id item1 item2 item3 #> 1  1     2     2     2 #> 2  2     1     1     1 #> 3  3     1     1     1"},{"path":"https://rempsyc.remi-theriault.com/reference/car_Anova.html","id":null,"dir":"Reference","previous_headings":"","what":"Anova Tables for Various Statistical Models (car::Anova) ‚Äî car_Anova","title":"Anova Tables for Various Statistical Models (car::Anova) ‚Äî car_Anova","text":"Compute ANOVA car package Anova function.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/car_Anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Anova Tables for Various Statistical Models (car::Anova) ‚Äî car_Anova","text":"","code":"car_Anova(   mod,   error,   type = c(\"II\", \"III\", 2, 3),   white.adjust = c(FALSE, TRUE, \"hc3\", \"hc0\", \"hc1\", \"hc2\", \"hc4\"),   vcov. = NULL,   singular.ok,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/car_Anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Anova Tables for Various Statistical Models (car::Anova) ‚Äî car_Anova","text":"mod lm, aov, glm, multinom, polr mlm, coxph, coxme, lme, mer, merMod, svyglm, svycoxph, rlm, suitable model object. error linear model, lm model object error sum squares degrees freedom calculated. F-tests generalized linear model, glm object dispersion estimated. specified, mod used. type type test, \"II\", \"III\", 2, 3. Roman numerals equivalent corresponding Arabic numerals. white.adjust FALSE, default, tests use heteroscedasticity-corrected coefficient covariance matrix; various values argument specify different corrections. See documentation hccm details. white.adjust=TRUE \"hc3\" correction selected.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/car_Anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Anova Tables for Various Statistical Models (car::Anova) ‚Äî car_Anova","text":"object class \"anova\", \"Anova.mlm\", usually printed. objects class \"Anova.mlm\", also summary method, provides much detail print method MANOVA, including traditional mixed-model univariate F-tests Greenhouse-Geisser Huynh-Feldt corrections.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/car_Anova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Anova Tables for Various Statistical Models (car::Anova) ‚Äî car_Anova","text":"Calculates type-II type-III analysis--variance tables model objects produced lm, glm, multinom (nnet package), polr (MASS package), coxph (survival package), coxme (coxme pckage), svyglm svycoxph (survey package), rlm (MASS package), lmer lme4 package, lme nlme package, (default method) models linear predictor asymptotically normal coefficients (see details ). linear models, F-tests calculated; generalized linear models, likelihood-ratio chisquare, Wald chisquare, F-tests calculated; multinomial logit proportional-odds logit models, likelihood-ratio tests calculated. Various test statistics provided multivariate linear models produced lm manova. Partial-likelihood-ratio tests Wald tests provided Cox models. Wald chi-square tests provided fixed effects linear generalized linear mixed-effects models. Wald chi-square F tests provided default case.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/car_Anova.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Anova Tables for Various Statistical Models (car::Anova) ‚Äî car_Anova","text":"John Fox jfox@mcmaster.ca; code Mauchly test Greenhouse-Geisser Huynh-Feldt corrections non-spericity repeated-measures ANOVA adapted functions stats:::stats:::mauchly.test.SSD stats:::sphericity R Core; summary.Anova.mlm print.summary.Anova.mlm incorporates code contributed Gabriel Baud-Bovy.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/car_Anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Anova Tables for Various Statistical Models (car::Anova) ‚Äî car_Anova","text":"","code":"# \\donttest{ m <- lm(mpg ~ cyl + disp, data = mtcars) car_Anova(m) #> Anova Table (Type II tests) #>  #> Response: mpg #>            Sum Sq Df F value  Pr(>F)   #> cyl        46.418  1  4.9720 0.03366 * #> disp       37.594  1  4.0268 0.05419 . #> Residuals 270.740 29                   #> --- #> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 # }"},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel","text":"Easily output correlation matrix export Microsoft Excel, first row column frozen, correlation coefficients colour-coded based effect size (0.0-0.2: small (colour); 0.2-0.4: medium (pink/light blue); 0.4-1.0: large (red/dark blue)), following Cohen's suggestions small (.10), medium (.30), large (.50) correlation sizes. Based correlation openxlsx2 packages.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel","text":"","code":"cormatrix_excel(   data,   filename,   overwrite = TRUE,   p_adjust = \"none\",   print.mat = TRUE,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel","text":"data data frame filename Desired filename (path can added hand need specify extension). overwrite Whether allow overwriting previous file. p_adjust Default p-value adjustment method (default \"none\", although correlation::correlation()'s default \"holm\") print.mat Logical, whether also print correlation matrix console. ... Parameters passed correlation package (see correlation::correlation())","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel","text":"Microsoft Excel document, containing colour-coded correlation matrix significance stars, first sheet, colour-coded p-values second sheet.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel","text":"Adapted @JanMarvin (JanMarvin/openxlsx2#286) original rempsyc::cormatrix_excel.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel","text":"","code":".old_wd <- setwd(tempdir()) # Basic example cormatrix_excel(mtcars, select = c(\"mpg\", \"cyl\", \"disp\", \"hp\", \"carb\"), filename = \"cormatrix1\") #> # Correlation Matrix (pearson-method) #>  #> Parameter |      mpg |      cyl |     disp |       hp |    carb #> --------------------------------------------------------------- #> mpg       |          | -0.85*** | -0.85*** | -0.78*** | -0.55** #> cyl       | -0.85*** |          |  0.90*** |  0.83*** |  0.53** #> disp      | -0.85*** |  0.90*** |          |  0.79*** |   0.39* #> hp        | -0.78*** |  0.83*** |  0.79*** |          | 0.75*** #> carb      |  -0.55** |   0.53** |    0.39* |  0.75*** |         #>  #> p-value adjustment method: none #>  #>  #>  [Correlation matrix 'cormatrix1.xlsx' has been saved to working directory (or where specified).] #> Warning: will not open file when not interactive #> NULL cormatrix_excel(iris, p_adjust = \"none\", filename = \"cormatrix2\") #> # Correlation Matrix (pearson-method) #>  #> Parameter    | Sepal.Length | Sepal.Width | Petal.Length | Petal.Width #> ---------------------------------------------------------------------- #> Sepal.Length |              |       -0.12 |      0.87*** |     0.82*** #> Sepal.Width  |        -0.12 |             |     -0.43*** |    -0.37*** #> Petal.Length |      0.87*** |    -0.43*** |              |     0.96*** #> Petal.Width  |      0.82*** |    -0.37*** |      0.96*** |             #>  #> p-value adjustment method: none #>  #>  #>  [Correlation matrix 'cormatrix2.xlsx' has been saved to working directory (or where specified).] #> Warning: will not open file when not interactive #> NULL cormatrix_excel(airquality, method = \"spearman\", filename = \"cormatrix3\") #> # Correlation Matrix (spearman-method) #>  #> Parameter |    Ozone |   Solar.R |      Wind |     Temp |     Month |       Day #> ------------------------------------------------------------------------------- #> Ozone     |          |   0.35*** |  -0.59*** |  0.77*** |      0.14 |     -0.06 #> Solar.R   |  0.35*** |           | -9.77e-04 |    0.21* |     -0.13 |     -0.15 #> Wind      | -0.59*** | -9.77e-04 |           | -0.45*** |     -0.16 |      0.04 #> Temp      |  0.77*** |     0.21* |  -0.45*** |          |   0.37*** |     -0.16 #> Month     |     0.14 |     -0.13 |     -0.16 |  0.37*** |           | -7.85e-03 #> Day       |    -0.06 |     -0.15 |      0.04 |    -0.16 | -7.85e-03 |           #>  #> p-value adjustment method: none #>  #>  #>  [Correlation matrix 'cormatrix3.xlsx' has been saved to working directory (or where specified).] #> Warning: will not open file when not interactive #> NULL setwd(.old_wd)"},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel2.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy export of correlation matrix to Excel (improved version) ‚Äî cormatrix_excel2","title":"Easy export of correlation matrix to Excel (improved version) ‚Äî cormatrix_excel2","text":"Easily output correlation matrix export Microsoft Excel, first row column frozen, correlation coefficients colour-coded based effect size (0.0-0.2: small (colour); 0.2-0.4: medium (pink/light blue); 0.4-1.0: large (red/dark blue)), following Cohen's suggestions small (.10), medium (.30), large (.50) correlation sizes. Based correlation openxlsx2 packages.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy export of correlation matrix to Excel (improved version) ‚Äî cormatrix_excel2","text":"","code":"cormatrix_excel2(   data,   filename,   overwrite = TRUE,   p_adjust = \"none\",   print.mat = TRUE,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy export of correlation matrix to Excel (improved version) ‚Äî cormatrix_excel2","text":"data data frame filename Desired filename (path can added hand need specify extension). overwrite Whether allow overwriting previous file. p_adjust Default p-value adjustment method (default \"none\", although correlation::correlation's default \"holm\") print.mat Logical, whether also print correlation matrix console. ... Parameters passed correlation package (see ?correlation::correlation)","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy export of correlation matrix to Excel (improved version) ‚Äî cormatrix_excel2","text":"Microsoft Excel document, containing colour-coded correlation matrix significance stars, first sheet, colour-coded p-values second sheet.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easy export of correlation matrix to Excel (improved version) ‚Äî cormatrix_excel2","text":"WARNING: function replace cormatrix_excel (original one) soon openxlsx2 available CRAN. meanwhile, experimental subject change. Use care.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Easy export of correlation matrix to Excel (improved version) ‚Äî cormatrix_excel2","text":"Adapted @JanMarvin (JanMarvin/openxlsx2#286) original rempsyc::cormatrix_excel","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy export of correlation matrix to Excel (improved version) ‚Äî cormatrix_excel2","text":"","code":"# \\donttest{ .old_wd <- setwd(tempdir()) # Basic example cormatrix_excel2(mtcars, \"cormatrix1\") #> # Correlation Matrix (pearson-method) #>  #> Parameter |      mpg |      cyl |     disp |       hp |     drat |       wt |     qsec |       vs |       am |     gear |     carb #> ---------------------------------------------------------------------------------------------------------------------------------- #> mpg       |  1.00*** | -0.85*** | -0.85*** | -0.78*** |  0.68*** | -0.87*** |    0.42* |  0.66*** |  0.60*** |   0.48** |  -0.55** #> cyl       | -0.85*** |  1.00*** |  0.90*** |  0.83*** | -0.70*** |  0.78*** | -0.59*** | -0.81*** |  -0.52** |  -0.49** |   0.53** #> disp      | -0.85*** |  0.90*** |  1.00*** |  0.79*** | -0.71*** |  0.89*** |   -0.43* | -0.71*** | -0.59*** | -0.56*** |    0.39* #> hp        | -0.78*** |  0.83*** |  0.79*** |  1.00*** |  -0.45** |  0.66*** | -0.71*** | -0.72*** |    -0.24 |    -0.13 |  0.75*** #> drat      |  0.68*** | -0.70*** | -0.71*** |  -0.45** |  1.00*** | -0.71*** |     0.09 |    0.44* |  0.71*** |  0.70*** |    -0.09 #> wt        | -0.87*** |  0.78*** |  0.89*** |  0.66*** | -0.71*** |  1.00*** |    -0.17 | -0.55*** | -0.69*** | -0.58*** |    0.43* #> qsec      |    0.42* | -0.59*** |   -0.43* | -0.71*** |     0.09 |    -0.17 |  1.00*** |  0.74*** |    -0.23 |    -0.21 | -0.66*** #> vs        |  0.66*** | -0.81*** | -0.71*** | -0.72*** |    0.44* | -0.55*** |  0.74*** |  1.00*** |     0.17 |     0.21 | -0.57*** #> am        |  0.60*** |  -0.52** | -0.59*** |    -0.24 |  0.71*** | -0.69*** |    -0.23 |     0.17 |  1.00*** |  0.79*** |     0.06 #> gear      |   0.48** |  -0.49** | -0.56*** |    -0.13 |  0.70*** | -0.58*** |    -0.21 |     0.21 |  0.79*** |  1.00*** |     0.27 #> carb      |  -0.55** |   0.53** |    0.39* |  0.75*** |    -0.09 |    0.43* | -0.66*** | -0.57*** |     0.06 |     0.27 |  1.00*** #>  #> p-value adjustment method: none #>  #>  [Correlation matrix 'cormatrix1.xlsx' has been saved to working directory (or where specified).] #> Warning: will not open file when not interactive #> NULL cormatrix_excel2(iris, p_adjust = \"none\", \"cormatrix2\") #> # Correlation Matrix (pearson-method) #>  #> Parameter    | Sepal.Length | Sepal.Width | Petal.Length | Petal.Width #> ---------------------------------------------------------------------- #> Sepal.Length |      1.00*** |       -0.12 |      0.87*** |     0.82*** #> Sepal.Width  |        -0.12 |     1.00*** |     -0.43*** |    -0.37*** #> Petal.Length |      0.87*** |    -0.43*** |      1.00*** |     0.96*** #> Petal.Width  |      0.82*** |    -0.37*** |      0.96*** |     1.00*** #>  #> p-value adjustment method: none #>  #>  [Correlation matrix 'cormatrix2.xlsx' has been saved to working directory (or where specified).] #> Warning: will not open file when not interactive #> NULL cormatrix_excel2(airquality, method = \"spearman\", \"cormatrix3\") #> # Correlation Matrix (spearman-method) #>  #> Parameter |    Ozone |   Solar.R |      Wind |     Temp |     Month |       Day #> ------------------------------------------------------------------------------- #> Ozone     |  1.00*** |   0.35*** |  -0.59*** |  0.77*** |      0.14 |     -0.06 #> Solar.R   |  0.35*** |   1.00*** | -9.77e-04 |    0.21* |     -0.13 |     -0.15 #> Wind      | -0.59*** | -9.77e-04 |   1.00*** | -0.45*** |     -0.16 |      0.04 #> Temp      |  0.77*** |     0.21* |  -0.45*** |  1.00*** |   0.37*** |     -0.16 #> Month     |     0.14 |     -0.13 |     -0.16 |  0.37*** |   1.00*** | -7.85e-03 #> Day       |    -0.06 |     -0.15 |      0.04 |    -0.16 | -7.85e-03 |   1.00*** #>  #> p-value adjustment method: none #>  #>  [Correlation matrix 'cormatrix3.xlsx' has been saved to working directory (or where specified).] #> Warning: will not open file when not interactive #> NULL setwd(.old_wd) # }"},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel_deprecated.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel_deprecated","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel_deprecated","text":"Easily output correlation matrix export Microsoft Excel, first row column frozen, correlation coefficients colour-coded based effect size (0.0-0.2: small (colour); 0.2-0.4: medium (pink); 0.4-1.0: large (red)).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel_deprecated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel_deprecated","text":"","code":"cormatrix_excel_deprecated(   data,   filename,   overwrite = TRUE,   use = \"pairwise.complete.obs\" )"},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel_deprecated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel_deprecated","text":"data data frame filename Desired filename (path can added hand need specify extension). overwrite Whether allow overwriting previous file. use handle NA (see ?cor options).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel_deprecated.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel_deprecated","text":"Microsoft Excel document, containing colour-coded correlation matrix.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/cormatrix_excel_deprecated.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy export of correlation matrix to Excel ‚Äî cormatrix_excel_deprecated","text":"","code":"# \\donttest{ .old_wd <- setwd(tempdir()) # Basic example cormatrix_excel_deprecated(mtcars, \"cormatrix\") #>        mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb #> mpg   1.00 -0.85 -0.85 -0.78  0.68 -0.87  0.42  0.66  0.60  0.48 -0.55 #> cyl  -0.85  1.00  0.90  0.83 -0.70  0.78 -0.59 -0.81 -0.52 -0.49  0.53 #> disp -0.85  0.90  1.00  0.79 -0.71  0.89 -0.43 -0.71 -0.59 -0.56  0.39 #> hp   -0.78  0.83  0.79  1.00 -0.45  0.66 -0.71 -0.72 -0.24 -0.13  0.75 #> drat  0.68 -0.70 -0.71 -0.45  1.00 -0.71  0.09  0.44  0.71  0.70 -0.09 #> wt   -0.87  0.78  0.89  0.66 -0.71  1.00 -0.17 -0.55 -0.69 -0.58  0.43 #> qsec  0.42 -0.59 -0.43 -0.71  0.09 -0.17  1.00  0.74 -0.23 -0.21 -0.66 #> vs    0.66 -0.81 -0.71 -0.72  0.44 -0.55  0.74  1.00  0.17  0.21 -0.57 #> am    0.60 -0.52 -0.59 -0.24  0.71 -0.69 -0.23  0.17  1.00  0.79  0.06 #> gear  0.48 -0.49 -0.56 -0.13  0.70 -0.58 -0.21  0.21  0.79  1.00  0.27 #> carb -0.55  0.53  0.39  0.75 -0.09  0.43 -0.66 -0.57  0.06  0.27  1.00 #>  #>  [Correlation matrix 'cormatrix.xlsx' has been saved to working directory (or where specified).] setwd(.old_wd) # }"},{"path":"https://rempsyc.remi-theriault.com/reference/extract_duplicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract all duplicates ‚Äî extract_duplicates","title":"Extract all duplicates ‚Äî extract_duplicates","text":"Extract duplicates, visual inspection. Note also contains first occurrence future duplicates, unlike duplicated() dplyr::distinct()). Also contains additional column reporting number missing values row, help decision-making selecting duplicates keep.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/extract_duplicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract all duplicates ‚Äî extract_duplicates","text":"","code":"extract_duplicates(data, id)"},{"path":"https://rempsyc.remi-theriault.com/reference/extract_duplicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract all duplicates ‚Äî extract_duplicates","text":"data data frame. id ID variable check duplicates.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/extract_duplicates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract all duplicates ‚Äî extract_duplicates","text":"dataframe, containing duplicates.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/extract_duplicates.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract all duplicates ‚Äî extract_duplicates","text":"easystats equivalent, see: datawizard::data_unique().","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/extract_duplicates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract all duplicates ‚Äî extract_duplicates","text":"","code":"df1 <- data.frame(    id = c(1, 2, 3, 1, 3),    item1 = c(NA, 1, 1, 2, 3),    item2 = c(NA, 1, 1, 2, 3),    item3 = c(NA, 1, 1, 2, 3) )  extract_duplicates(df1, id = \"id\") #>   Row id item1 item2 item3 count_na #> 1   1  1    NA    NA    NA        3 #> 2   4  1     2     2     2        0 #> 3   3  3     1     1     1        0 #> 4   5  3     3     3     3        0  # Filter to exclude duplicates df2 <- df1[-c(1, 5),] df2 #>   id item1 item2 item3 #> 2  2     1     1     1 #> 3  3     1     1     1 #> 4  1     2     2     2"},{"path":"https://rempsyc.remi-theriault.com/reference/find_mad.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify outliers based on 3 MAD ‚Äî find_mad","title":"Identify outliers based on 3 MAD ‚Äî find_mad","text":"Identify outliers based 3 median absolute deviations (MAD) median.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/find_mad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify outliers based on 3 MAD ‚Äî find_mad","text":"","code":"find_mad(data, col.list, ID = NULL, criteria = 3, mad.scores = TRUE)"},{"path":"https://rempsyc.remi-theriault.com/reference/find_mad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify outliers based on 3 MAD ‚Äî find_mad","text":"data data frame. col.list List variables check outliers. ID ID variable like outliers identified . criteria many MAD use threshold (similar standard deviations) mad.scores Logical, whether output robust z (MAD) scores (default) raw scores. Defaults TRUE.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/find_mad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify outliers based on 3 MAD ‚Äî find_mad","text":"list dataframes outliers per variable, row numbers, based MAD. printed, provides number outliers, selected variables, outlier flagged one variable. information can obtainned using attributes() function around generated object.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/find_mad.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Identify outliers based on 3 MAD ‚Äî find_mad","text":"function internally use scale_mad() \"standardize\" data based MAD median, check observation greater specified criteria (e.g., +/-3). easystats equivalent, use: performance::check_outliers(x, method = \"zscore_robust, threshold = 3).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/find_mad.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Identify outliers based on 3 MAD ‚Äî find_mad","text":"Leys, C., Ley, C., Klein, O., Bernard, P., & Licata, L. (2013). Detecting outliers: use standard deviation around mean, use absolute deviation around median. Journal Experimental Social Psychology, 49(4), 764‚Äì766. https://doi.org/10.1016/j.jesp.2013.03.013","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/find_mad.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify outliers based on 3 MAD ‚Äî find_mad","text":"","code":"find_mad(   data = mtcars,   col.list = names(mtcars),   criteria = 3 ) #> 20 outlier(s) based on 3 median absolute deviations for variable(s):  #>  mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb  #>  #> The following participants were considered outliers for more than one variable:  #>  #>   Row n #> 1   3 2 #> 2   9 2 #> 3  18 2 #> 4  19 2 #> 5  20 2 #> 6  26 2 #> 7  28 2 #> 8  31 2 #> 9  32 2 #>  #> Outliers per variable:  #>  #> $qsec #>   Row qsec_mad #> 1   9 3.665557 #>  #> $vs #>    Row vs_mad #> 1    3    Inf #> 2    4    Inf #> 3    6    Inf #> 4    8    Inf #> 5    9    Inf #> 6   10    Inf #> 7   11    Inf #> 8   18    Inf #> 9   19    Inf #> 10  20    Inf #> 11  21    Inf #> 12  26    Inf #> 13  28    Inf #> 14  32    Inf #>  #> $am #>    Row am_mad #> 1    1    Inf #> 2    2    Inf #> 3    3    Inf #> 4   18    Inf #> 5   19    Inf #> 6   20    Inf #> 7   26    Inf #> 8   27    Inf #> 9   28    Inf #> 10  29    Inf #> 11  30    Inf #> 12  31    Inf #> 13  32    Inf #>  #> $carb #>   Row carb_mad #> 1  31 4.046945 #>   mtcars2 <- mtcars mtcars2$car <- row.names(mtcars) find_mad(   data = mtcars2,   col.list = names(mtcars),   ID = \"car\",   criteria = 3 ) #> 20 outlier(s) based on 3 median absolute deviations for variable(s):  #>  mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb  #>  #> The following participants were considered outliers for more than one variable:  #>  #>   Row            car n #> 1   3     Datsun 710 2 #> 2   9       Merc 230 2 #> 3  18       Fiat 128 2 #> 4  19    Honda Civic 2 #> 5  20 Toyota Corolla 2 #> 6  26      Fiat X1-9 2 #> 7  28   Lotus Europa 2 #> 8  31  Maserati Bora 2 #> 9  32     Volvo 142E 2 #>  #> Outliers per variable:  #>  #> $qsec #>   Row      car qsec_mad #> 1   9 Merc 230 3.665557 #>  #> $vs #>    Row            car vs_mad #> 1    3     Datsun 710    Inf #> 2    4 Hornet 4 Drive    Inf #> 3    6        Valiant    Inf #> 4    8      Merc 240D    Inf #> 5    9       Merc 230    Inf #> 6   10       Merc 280    Inf #> 7   11      Merc 280C    Inf #> 8   18       Fiat 128    Inf #> 9   19    Honda Civic    Inf #> 10  20 Toyota Corolla    Inf #> 11  21  Toyota Corona    Inf #> 12  26      Fiat X1-9    Inf #> 13  28   Lotus Europa    Inf #> 14  32     Volvo 142E    Inf #>  #> $am #>    Row            car am_mad #> 1    1      Mazda RX4    Inf #> 2    2  Mazda RX4 Wag    Inf #> 3    3     Datsun 710    Inf #> 4   18       Fiat 128    Inf #> 5   19    Honda Civic    Inf #> 6   20 Toyota Corolla    Inf #> 7   26      Fiat X1-9    Inf #> 8   27  Porsche 914-2    Inf #> 9   28   Lotus Europa    Inf #> 10  29 Ford Pantera L    Inf #> 11  30   Ferrari Dino    Inf #> 12  31  Maserati Bora    Inf #> 13  32     Volvo 142E    Inf #>  #> $carb #>   Row           car carb_mad #> 1  31 Maserati Bora 4.046945 #>"},{"path":"https://rempsyc.remi-theriault.com/reference/format_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Easily format p or r values ‚Äî format_value","title":"Easily format p or r values ‚Äî format_value","text":"Easily format p r values. Note: converts character class use figures manuscripts accommodate e.g., \"< .001\".","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/format_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easily format p or r values ‚Äî format_value","text":"","code":"format_value(value, type = \"d\", ...)  format_p(   p,   precision = 0.001,   prefix = NULL,   suffix = NULL,   sign = FALSE,   stars = FALSE )  format_r(r, precision = 0.01)  format_d(d, precision = 0.01)"},{"path":"https://rempsyc.remi-theriault.com/reference/format_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easily format p or r values ‚Äî format_value","text":"value Value formatted, using generic format_value(). type Specify r p value. ... specify precision level, necessary, using generic format_value(). Simply add precision argument. p p value format. precision Level precision desired, necessary. prefix add prefix value. suffix add suffix value. sign Logical. Whether add equal sign p values higher equal .001. stars Logical. Whether add asterisks significant p values. r r value format. d d value format.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/format_value.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easily format p or r values ‚Äî format_value","text":"formatted p, r, d value.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/format_value.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easily format p or r values ‚Äî format_value","text":"easystats equivalent, see: insight::format_value().","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/format_value.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easily format p or r values ‚Äî format_value","text":"","code":"format_value(0.00041231, \"p\") #> [1] \"< .001\" format_value(0.00041231, \"r\") #> [1] \".00\" format_value(1.341231, \"d\") #> [1] \"1.34\" format_p(0.0041231) #> [1] \".004\" format_p(0.00041231) #> [1] \"< .001\" format_r(0.41231) #> [1] \".41\" format_r(0.041231) #> [1] \".04\" format_d(1.341231) #> [1] \"1.34\" format_d(0.341231) #> [1] \"0.34\""},{"path":"https://rempsyc.remi-theriault.com/reference/lmSupport_modelEffectSizes.html","id":null,"dir":"Reference","previous_headings":"","what":"Get effect sizes (lmSupport::modelEffectSizes) ‚Äî lmSupport_modelEffectSizes","title":"Get effect sizes (lmSupport::modelEffectSizes) ‚Äî lmSupport_modelEffectSizes","text":"Get effect sizes lmSupport package modelEffectSizes function. function taken separately package package removed CRAN dependency failing. original documentation: \"Calculates unique SSRs, SSE, SST. Based SSs, calculates partial eta2 delta R2 effects linear model object. categorical variables coded factors, calculates multi-df effect. Manually code regressors get 1 df effects Uses car::Anova() Type 3 error\"","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/lmSupport_modelEffectSizes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get effect sizes (lmSupport::modelEffectSizes) ‚Äî lmSupport_modelEffectSizes","text":"","code":"lmSupport_modelEffectSizes(Model, Print = TRUE, Digits = 4)"},{"path":"https://rempsyc.remi-theriault.com/reference/lmSupport_modelEffectSizes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get effect sizes (lmSupport::modelEffectSizes) ‚Äî lmSupport_modelEffectSizes","text":"Model linear model, produced lm Print Display results screen. Default = TRUE Digits Number digits printing effect sizes","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/lmSupport_modelEffectSizes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get effect sizes (lmSupport::modelEffectSizes) ‚Äî lmSupport_modelEffectSizes","text":"Returns list fields effect sizes, SSE, SST.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/lmSupport_modelEffectSizes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get effect sizes (lmSupport::modelEffectSizes) ‚Äî lmSupport_modelEffectSizes","text":"John J. Curtin, jjcurtin@wisc.edu","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/lmSupport_modelEffectSizes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get effect sizes (lmSupport::modelEffectSizes) ‚Äî lmSupport_modelEffectSizes","text":"","code":"# \\donttest{ m <- lm(mpg ~ cyl + disp, data = mtcars) lmSupport_modelEffectSizes(m) #> lm(formula = mpg ~ cyl + disp, data = mtcars) #>  #> Coefficients #>                   SSR df pEta-sqr dR-sqr #> (Intercept) 1728.9312  1   0.8646     NA #> cyl           46.4184  1   0.1464 0.0412 #> disp          37.5940  1   0.1219 0.0334 #>  #> Sum of squared errors (SSE): 270.7 #> Sum of squared total  (SST): 1126.0 # }"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_assumptions.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy assumptions checks ‚Äî nice_assumptions","title":"Easy assumptions checks ‚Äî nice_assumptions","text":"Test linear regression assumptions easily nice summary table.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_assumptions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy assumptions checks ‚Äî nice_assumptions","text":"","code":"nice_assumptions(model)"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_assumptions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy assumptions checks ‚Äî nice_assumptions","text":"model lm() object passed function.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_assumptions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy assumptions checks ‚Äî nice_assumptions","text":"dataframe, p-value results Shapiro-Wilk, Breusch-Pagan, Durbin-Watson tests, well diagnostic column reporting many assumptions respected given model.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_assumptions.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easy assumptions checks ‚Äî nice_assumptions","text":"Interpretation: (p) values < .05 imply assumptions respected. Diagnostic many assumptions respected given model variable.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_assumptions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy assumptions checks ‚Äî nice_assumptions","text":"","code":"# Create a regression model (using data available in R by default) model <- lm(mpg ~ wt * cyl + gear, data = mtcars) nice_assumptions(model) #>                   Model Normality (Shapiro-Wilk) #> 1 mpg ~ wt * cyl + gear                    0.615 #>   Homoscedasticity (Breusch-Pagan) Autocorrelation of residuals (Durbin-Watson) #> 1                            0.054                                        0.525 #>   Diagnostic #> 1          0  # Multiple dependent variables at once model2 <- lm(qsec ~ disp + drat * carb, mtcars) my.models <- list(model, model2) nice_assumptions(my.models) #>                       Model Normality (Shapiro-Wilk) #> 1     mpg ~ wt * cyl + gear                    0.615 #> 2 qsec ~ disp + drat * carb                    0.013 #>   Homoscedasticity (Breusch-Pagan) Autocorrelation of residuals (Durbin-Watson) #> 1                            0.054                                        0.525 #> 2                            0.947                                        0.003 #>   Diagnostic #> 1          0 #> 2          2"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_contrasts.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy planned contrasts ‚Äî nice_contrasts","title":"Easy planned contrasts ‚Äî nice_contrasts","text":"Easily compute planned contrast analyses (pairwise comparisons similar t-tests powerful 2 groups), format publication-ready format. Supports three groups moment. particular case, confidence intervals bootstraped chosen effect size (default Cohen's d).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_contrasts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy planned contrasts ‚Äî nice_contrasts","text":"","code":"nice_contrasts(   response,   group,   covariates = NULL,   data,   effect.type = \"cohens.d\",   bootstraps = 2000,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_contrasts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy planned contrasts ‚Äî nice_contrasts","text":"response dependent variable. group group comparison. covariates desired covariates model. data data frame. effect.type effect size type use. One \"cohens.d\" (default), \"akp.robust.d\", \"unstandardized\", \"hedges.g\", \"cohens.d.sigma\", \"r\". bootstraps number bootstraps use confidence interval ... Arguments passed bootES::bootES.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_contrasts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy planned contrasts ‚Äî nice_contrasts","text":"dataframe, selected dependent variable(s), comparisons interest, degrees freedom, t-values, p-values, robust Cohen's d (dR), lower upper 95% confidence intervals effect size (.e., dR).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_contrasts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easy planned contrasts ‚Äî nice_contrasts","text":"Statistical power lower standard t test compared planned contrast version two reasons: ) sample size smaller t test, cases two groups selected; b) planned contrast error term smaller standard t test based cases (source). effect size confidence interval calculated via bootES::bootES. easystats equivalent, see: modelbased::estimate_contrasts().","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_contrasts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy planned contrasts ‚Äî nice_contrasts","text":"","code":"# Basic example nice_contrasts(   data = mtcars,   response = \"mpg\",   group = \"cyl\",   bootstraps = 200 ) #> Warning: extreme order statistics used as endpoints #> Warning: extreme order statistics used as endpoints #>   Dependent Variable Comparison df        t            p        d  CI_lower #> 1                mpg      4 - 8 29 8.904534 8.568209e-10 3.587739 2.5429025 #> 2                mpg      6 - 8 29 3.111825 4.152209e-03 1.440495 0.7896218 #> 3                mpg      4 - 6 29 4.441099 1.194696e-04 2.147244 1.3259681 #>   CI_upper #> 1 4.366010 #> 2 1.883638 #> 3 3.295447 # \\donttest{ nice_contrasts(   data = mtcars,   response = \"disp\",   group = \"gear\" ) #> Warning: extreme order statistics used as endpoints #>   Dependent Variable Comparison df         t            p          d #> 1               disp      3 - 5 29  2.916870 6.759287e-03  1.5062653 #> 2               disp      4 - 5 29 -1.816053 7.971420e-02 -0.9666682 #> 3               disp      3 - 4 29  6.385087 5.569503e-07  2.4729335 #>      CI_lower  CI_upper #> 1 -0.02092123 3.0623835 #> 2 -2.54126362 0.1223233 #> 3  1.39861017 3.2630773  # Multiple dependent variables nice_contrasts(   data = mtcars,   response = c(\"mpg\", \"disp\", \"hp\"),   group = \"cyl\" ) #>   Dependent Variable Comparison df          t            p         d   CI_lower #> 1                mpg      4 - 8 29   8.904534 8.568209e-10  3.587739  2.7082311 #> 2                mpg      6 - 8 29   3.111825 4.152209e-03  1.440495  0.8114357 #> 3                mpg      4 - 6 29   4.441099 1.194696e-04  2.147244  1.3096890 #> 4               disp      4 - 8 29 -11.920787 1.064054e-12 -4.803022 -5.7174536 #> 5               disp      6 - 8 29  -7.104461 8.117219e-08 -3.288726 -4.2619982 #> 6               disp      4 - 6 29  -3.131986 3.945539e-03 -1.514296 -2.2028453 #> 7                 hp      4 - 8 29  -8.285112 3.915144e-09 -3.338167 -4.2755262 #> 8                 hp      6 - 8 29  -4.952403 2.895434e-05 -2.292517 -3.1048697 #> 9                 hp      4 - 6 29  -2.162695 3.894886e-02 -1.045650 -1.7383547 #>     CI_upper #> 1  4.5934966 #> 2  1.9738389 #> 3  3.0295578 #> 4 -3.8406127 #> 5 -2.3305573 #> 6 -0.8441953 #> 7 -2.4421783 #> 8 -1.3244859 #> 9 -0.4461889  # Adding covariates nice_contrasts(   data = mtcars,   response = \"mpg\",   group = \"cyl\",   covariates = c(\"disp\", \"hp\") ) #>   Dependent Variable Comparison df          t          p        d  CI_lower #> 1                mpg      4 - 8 27  0.7506447 0.45935889 3.587739 2.7395467 #> 2                mpg      6 - 8 27 -0.6550186 0.51799786 1.440495 0.7790842 #> 3                mpg      4 - 6 27  2.3955766 0.02379338 2.147244 1.3553509 #>   CI_upper #> 1 4.516160 #> 2 1.983830 #> 3 3.095627 # }"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_density.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy density plots ‚Äî nice_density","title":"Easy density plots ‚Äî nice_density","text":"Make nice density plots easily. Internally, uses na.rm = TRUE.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_density.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy density plots ‚Äî nice_density","text":"","code":"nice_density(   data,   variable,   group,   colours,   ytitle = \"Density\",   xtitle = variable,   groups.labels = NULL,   grid = TRUE,   shapiro = FALSE,   title = variable,   histogram = FALSE,   breaks.auto = FALSE,   bins = 30 )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_density.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy density plots ‚Äî nice_density","text":"data data frame variable dependent variable plotted. group group plot variable. colours Desired colours plot, desired. ytitle optional y-axis label, desired. xtitle optional x-axis label, desired. groups.labels groups.labels (might rename xlabels consistency functions) grid Logical, whether keep default background grid . APA style suggests using grid background, though case may find useful easily estimate slopes different groups. shapiro Logical, whether include p-value Shapiro-Wilk test plot. title desired title plot. Can put NULL remove. histogram Logical, whether add histogram breaks.auto histogram = TRUE, option set bins/breaks automatically, mimicking default behaviour base R hist() (Sturges method). Defaults FALSE. bins histogram = TRUE, option change default bin (30).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_density.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy density plots ‚Äî nice_density","text":"density plot class ggplot, group (provided), along reference line representing matched normal distribution.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_density.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy density plots ‚Äî nice_density","text":"","code":"# Make the basic plot nice_density(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\" )   # Further customization nice_density(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\",   colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),   xtitle = \"Sepal Length\",   ytitle = \"Density (vs. Normal Distribution)\",   groups.labels = c(     \"(a) Setosa\",     \"(b) Versicolor\",     \"(c) Virginica\"   ),   grid = FALSE,   shapiro = TRUE,   title = \"Density (Sepal Length)\",   histogram = TRUE )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Nice formatting of lm models ‚Äî nice_lm","title":"Nice formatting of lm models ‚Äî nice_lm","text":"Formats output lm() model object publication-ready format.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nice formatting of lm models ‚Äî nice_lm","text":"","code":"nice_lm(   model,   b.label = \"b\",   standardize = FALSE,   mod.id = TRUE,   ci.alternative = \"two.sided\",   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nice formatting of lm models ‚Äî nice_lm","text":"model model formatted. b.label rename default \"b\" column (e.g., capital B using standardized data converted Greek beta symbol nice_table function). Now attempts automatically detect whether variables standardized, , sets b.label = \"B\" automatically. Factor variables dummy variables (two numeric values) ignored checking standardization. argument now deprecated, please use argument standardize directly instead. standardize Logical, whether standardize data refitting model. TRUE, automatically sets b.label = \"B\". Defaults FALSE. Note factor variables, pseudo-betas, coefficients interpreted like Cohen's d. mod.id Logical. Whether display model number, one model. ci.alternative Alternative confidence interval sr2. can either \"two.sided (default package), \"greater\", \"less\". ... arguments passed effectsize::r2_semipartial function effect size.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Nice formatting of lm models ‚Äî nice_lm","text":"formatted dataframe specified lm model, DV, IV, degrees freedom, regression coefficient, t-value, p-value, effect size, semi-partial correlation squared, confidence interval.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Nice formatting of lm models ‚Äî nice_lm","text":"effect size, sr2 (semi-partial correlation squared, also known delta R2), computed effectsize::r2_semipartial. Please read documentation function, especially regarding interpretation confidence interval. rempsyc, instead using default one-sided alternative (\"greater\"), use two-sided alternative. interpret sr2, use effectsize::interpret_r2_semipartial(). easystats equivalent, use report::report() lm() model object.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nice formatting of lm models ‚Äî nice_lm","text":"","code":"# Make and format model model <- lm(mpg ~ cyl + wt * hp, mtcars) nice_lm(model) #>   Dependent Variable Predictor df           b          t            p #> 1                mpg       cyl 27 -0.36523909 -0.7180977 4.788652e-01 #> 2                mpg        wt 27 -7.62748929 -5.0146028 2.928375e-05 #> 3                mpg        hp 27 -0.10839427 -3.6404181 1.136403e-03 #> 4                mpg     wt:hp 27  0.02583659  3.2329593 3.221753e-03 #>           sr2     CI_lower   CI_upper #> 1 0.002159615 0.0000000000 0.01306786 #> 2 0.105313085 0.0089876445 0.20163853 #> 3 0.055502405 0.0005550240 0.11934768 #> 4 0.043773344 0.0004377334 0.09898662  # Make and format multiple models model2 <- lm(qsec ~ disp + drat * carb, mtcars) my.models <- list(model, model2) x <- nice_lm(my.models) x #>   Model Number Dependent Variable Predictor df            b          t #> 1            1                mpg       cyl 27 -0.365239089 -0.7180977 #> 2            1                mpg        wt 27 -7.627489287 -5.0146028 #> 3            1                mpg        hp 27 -0.108394273 -3.6404181 #> 4            1                mpg     wt:hp 27  0.025836594  3.2329593 #> 5            2               qsec      disp 27 -0.006222635 -1.9746464 #> 6            2               qsec      drat 27  0.227692395  0.1968842 #> 7            2               qsec      carb 27  1.154106215  0.7179431 #> 8            2               qsec drat:carb 27 -0.477539959 -1.0825727 #>              p          sr2     CI_lower   CI_upper #> 1 4.788652e-01 0.0021596150 0.0000000000 0.01306786 #> 2 2.928375e-05 0.1053130854 0.0089876445 0.20163853 #> 3 1.136403e-03 0.0555024045 0.0005550240 0.11934768 #> 4 3.221753e-03 0.0437733438 0.0004377334 0.09898662 #> 5 5.861684e-02 0.0702566891 0.0000000000 0.19796621 #> 6 8.453927e-01 0.0006984424 0.0000000000 0.01347203 #> 7 4.789590e-01 0.0092872897 0.0000000000 0.05587351 #> 8 2.885720e-01 0.0211165564 0.0000000000 0.09136014 # Get interpretations cbind(x, Interpretation = effectsize::interpret_r2_semipartial(x$sr2)) #>   Model Number Dependent Variable Predictor df            b          t #> 1            1                mpg       cyl 27 -0.365239089 -0.7180977 #> 2            1                mpg        wt 27 -7.627489287 -5.0146028 #> 3            1                mpg        hp 27 -0.108394273 -3.6404181 #> 4            1                mpg     wt:hp 27  0.025836594  3.2329593 #> 5            2               qsec      disp 27 -0.006222635 -1.9746464 #> 6            2               qsec      drat 27  0.227692395  0.1968842 #> 7            2               qsec      carb 27  1.154106215  0.7179431 #> 8            2               qsec drat:carb 27 -0.477539959 -1.0825727 #>              p          sr2     CI_lower   CI_upper Interpretation #> 1 4.788652e-01 0.0021596150 0.0000000000 0.01306786     very small #> 2 2.928375e-05 0.1053130854 0.0089876445 0.20163853         medium #> 3 1.136403e-03 0.0555024045 0.0005550240 0.11934768          small #> 4 3.221753e-03 0.0437733438 0.0004377334 0.09898662          small #> 5 5.861684e-02 0.0702566891 0.0000000000 0.19796621         medium #> 6 8.453927e-01 0.0006984424 0.0000000000 0.01347203     very small #> 7 4.789590e-01 0.0092872897 0.0000000000 0.05587351     very small #> 8 2.885720e-01 0.0211165564 0.0000000000 0.09136014          small"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_contrasts.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy planned contrasts using lm models ‚Äî nice_lm_contrasts","title":"Easy planned contrasts using lm models ‚Äî nice_lm_contrasts","text":"Easily compute planned contrast analyses (pairwise comparisons similar t-tests powerful 2 groups), format publication-ready format. Supports three groups moment. particular case, confidence intervals bootstraped chosen effect size (default Cohen's d).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_contrasts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy planned contrasts using lm models ‚Äî nice_lm_contrasts","text":"","code":"nice_lm_contrasts(   model,   group,   data,   effect.type = \"cohens.d\",   bootstraps = 2000,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_contrasts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy planned contrasts using lm models ‚Äî nice_lm_contrasts","text":"model model formatted. group group comparison. data data frame. effect.type effect size type use. One \"cohens.d\" (default), \"akp.robust.d\", \"unstandardized\", \"hedges.g\", \"cohens.d.sigma\", \"r\". bootstraps number bootstraps use confidence interval ... Arguments passed bootES::bootES.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_contrasts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy planned contrasts using lm models ‚Äî nice_lm_contrasts","text":"dataframe, selected dependent variable(s), comparisons interest, degrees freedom, t-values, p-values, Cohen's d, lower upper 95% confidence intervals effect size (.e., dR).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_contrasts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easy planned contrasts using lm models ‚Äî nice_lm_contrasts","text":"Statistical power lower standard t test compared planned contrast version two reasons: ) sample size smaller t test, cases two groups selected; b) planned contrast error term smaller standard t test based cases (source). effect size confidence interval calculated via bootES::bootES. easystats equivalent, see: modelbased::estimate_contrasts().","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_contrasts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy planned contrasts using lm models ‚Äî nice_lm_contrasts","text":"","code":"# Make and format model (group need to be a factor) model <- lm(mpg ~ as.factor(cyl) + wt * hp, mtcars) nice_lm_contrasts(model, group = \"cyl\", data = mtcars, bootstraps = 500) #>   Dependent Variable Comparison df         t         p        d  CI_lower #> 1                mpg      4 - 8 26 0.7047256 0.4872464 3.587739 2.6270922 #> 2                mpg      6 - 8 26 0.1302365 0.8973817 1.440495 0.9234568 #> 3                mpg      4 - 6 26 0.8452452 0.4056854 2.147244 1.2970165 #>   CI_upper #> 1 4.471703 #> 2 1.945994 #> 3 3.094918  model2 <- lm(qsec ~ as.factor(cyl), data = mtcars) my.models <- list(model, model2)  nice_lm_contrasts(my.models, group = \"cyl\", data = mtcars, bootstraps = 500) #>   Dependent Variable Comparison df         t            p         d   CI_lower #> 1                mpg      4 - 8 26 0.7047256 0.4872463657 3.5877388  2.6456661 #> 2                mpg      6 - 8 26 0.1302365 0.8973817161 1.4404949  0.7058424 #> 3                mpg      4 - 6 26 0.8452452 0.4056854062 2.1472439  1.2985051 #> 4               qsec      4 - 8 29 3.9396785 0.0004711519 1.5873417  0.7551101 #> 5               qsec      6 - 8 29 1.7470521 0.0912125385 0.8087280 -0.2006894 #> 6               qsec      4 - 6 29 1.6103903 0.1181454384 0.7786137 -0.4328835 #>   CI_upper #> 1 4.440905 #> 2 1.898974 #> 3 3.116337 #> 4 2.248382 #> 5 1.769801 #> 6 1.803363"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_slopes.html","id":null,"dir":"Reference","previous_headings":"","what":"Nice formatting of simple slopes for lm models ‚Äî nice_lm_slopes","title":"Nice formatting of simple slopes for lm models ‚Äî nice_lm_slopes","text":"Extracts simple slopes lm() model object format publication-ready format.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_slopes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nice formatting of simple slopes for lm models ‚Äî nice_lm_slopes","text":"","code":"nice_lm_slopes(   model,   predictor,   moderator,   b.label = \"b\",   standardize = FALSE,   mod.id = TRUE,   ci.alternative = \"two.sided\",   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_slopes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nice formatting of simple slopes for lm models ‚Äî nice_lm_slopes","text":"model model formatted. predictor independent variable. moderator moderating variable. b.label rename default \"b\" column (e.g., capital B using standardized data converted Greek beta symbol nice_table() function). Now attempts automatically detect whether variables standardized, , sets b.label = \"B\" automatically. Factor variables dummy variables (two numeric values) ignored checking standardization. argument now deprecated, please use argument standardize directly instead. standardize Logical, whether standardize data refitting model. TRUE, automatically sets b.label = \"B\". Defaults FALSE. Note factor variables, pseudo-betas, coefficients interpreted like Cohen's d. mod.id Logical. Whether display model number, one model. ci.alternative Alternative confidence interval sr2. can either \"two.sided (default package), \"greater\", \"less\". ... arguments passed lm() function models.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_slopes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Nice formatting of simple slopes for lm models ‚Äî nice_lm_slopes","text":"formatted dataframe simple slopes specified lm model, DV, levels IV, degrees freedom, regression coefficient, t-value, p-value, effect size, semi-partial correlation squared, confidence interval.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_slopes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Nice formatting of simple slopes for lm models ‚Äî nice_lm_slopes","text":"effect size, sr2 (semi-partial correlation squared, also known delta R2), computed effectsize::r2_semipartial. Please read documentation function, especially regarding interpretation confidence interval. rempsyc, instead using default one-sided alternative (\"greater\"), use two-sided alternative. interpret sr2, use effectsize::interpret_r2_semipartial(). easystats equivalent, use report::report() lm() model object.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_lm_slopes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nice formatting of simple slopes for lm models ‚Äî nice_lm_slopes","text":"","code":"# Make and format model model <- lm(mpg ~ gear * wt, mtcars) nice_lm_slopes(model, predictor = \"gear\", moderator = \"wt\") #>   Dependent Variable Predictor (+/-1 SD) df        b        t          p #> 1                mpg       gear (LOW-wt) 28 7.540509 2.010656 0.05408136 #> 2                mpg      gear (MEAN-wt) 28 5.615951 1.943711 0.06204275 #> 3                mpg      gear (HIGH-wt) 28 3.691393 1.795568 0.08336403 #>          sr2 CI_lower   CI_upper #> 1 0.03048448        0 0.08823243 #> 2 0.02848830        0 0.08418650 #> 3 0.02431123        0 0.07551496  # Make and format multiple models model2 <- lm(qsec ~ gear * wt, mtcars) my.models <- list(model, model2) x <- nice_lm_slopes(my.models, predictor = \"gear\", moderator = \"wt\") x #>   Model Number Dependent Variable Predictor (+/-1 SD) df         b          t #> 1            1                mpg       gear (LOW-wt) 28  7.540509  2.0106560 #> 2            1                mpg      gear (MEAN-wt) 28  5.615951  1.9437108 #> 3            1                mpg      gear (HIGH-wt) 28  3.691393  1.7955678 #> 4            2               qsec       gear (LOW-wt) 28 -1.933515 -0.8847558 #> 5            2               qsec      gear (MEAN-wt) 28 -1.742853 -1.0351610 #> 6            2               qsec      gear (HIGH-wt) 28 -1.552191 -1.2956736 #>            p        sr2 CI_lower   CI_upper #> 1 0.05408136 0.03048448        0 0.08823243 #> 2 0.06204275 0.02848830        0 0.08418650 #> 3 0.08336403 0.02431123        0 0.07551496 #> 4 0.38382325 0.02280057        0 0.11642689 #> 5 0.30945179 0.03121151        0 0.14035904 #> 6 0.20566798 0.04889790        0 0.18442862 # Get interpretations cbind(x, Interpretation = effectsize::interpret_r2_semipartial(x$sr2)) #>   Model Number Dependent Variable Predictor (+/-1 SD) df         b          t #> 1            1                mpg       gear (LOW-wt) 28  7.540509  2.0106560 #> 2            1                mpg      gear (MEAN-wt) 28  5.615951  1.9437108 #> 3            1                mpg      gear (HIGH-wt) 28  3.691393  1.7955678 #> 4            2               qsec       gear (LOW-wt) 28 -1.933515 -0.8847558 #> 5            2               qsec      gear (MEAN-wt) 28 -1.742853 -1.0351610 #> 6            2               qsec      gear (HIGH-wt) 28 -1.552191 -1.2956736 #>            p        sr2 CI_lower   CI_upper Interpretation #> 1 0.05408136 0.03048448        0 0.08823243          small #> 2 0.06204275 0.02848830        0 0.08418650          small #> 3 0.08336403 0.02431123        0 0.07551496          small #> 4 0.38382325 0.02280057        0 0.11642689          small #> 5 0.30945179 0.03121151        0 0.14035904          small #> 6 0.20566798 0.04889790        0 0.18442862          small"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_mod.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy moderations ‚Äî nice_mod","title":"Easy moderations ‚Äî nice_mod","text":"Easily compute moderation analyses, effect sizes, format publication-ready format.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_mod.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy moderations ‚Äî nice_mod","text":"","code":"nice_mod(   data,   response,   predictor,   moderator,   moderator2 = NULL,   covariates = NULL,   b.label = \"b\",   standardize = TRUE,   mod.id = TRUE,   ci.alternative = \"two.sided\",   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_mod.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy moderations ‚Äî nice_mod","text":"data data frame response dependent variable. predictor independent variable. moderator moderating variable. moderator2 second moderating variable, applicable. covariates desired covariates model. b.label rename default \"b\" column (e.g., capital B using standardized data converted Greek beta symbol nice_table() function). Now attempts automatically detect whether variables standardized, , sets b.label = \"B\" automatically. Factor variables dummy variables (two numeric values) ignored checking standardization. argument now deprecated, please use argument standardize directly instead. standardize Logical, whether standardize data fitting model. TRUE, automatically sets b.label = \"B\". Defaults TRUE. mod.id Logical. Whether display model number, one model. ci.alternative Alternative confidence interval sr2. can either \"two.sided (default package), \"greater\", \"less\". ... arguments passed lm() function models.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_mod.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy moderations ‚Äî nice_mod","text":"formatted dataframe specified lm model, DV, IV, degrees freedom, regression coefficient, t-value, p-value, effect size, semi-partial correlation squared, confidence interval.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_mod.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easy moderations ‚Äî nice_mod","text":"effect size, sr2 (semi-partial correlation squared, also known delta R2), computed effectsize::r2_semipartial. Please read documentation function, especially regarding interpretation confidence interval. rempsyc, instead using default one-sided alternative (\"greater\"), use two-sided alternative. interpret sr2, use effectsize::interpret_r2_semipartial(). easystats equivalent, use report::report() lm() model object.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_mod.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy moderations ‚Äî nice_mod","text":"","code":"# Make the basic table nice_mod(   data = mtcars,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\" ) #>   Dependent Variable Predictor df           B          t            p #> 1                mpg      gear 28 -0.08718042 -0.7982999 4.314156e-01 #> 2                mpg        wt 28 -0.94959988 -8.6037724 2.383144e-09 #> 3                mpg   gear:wt 28 -0.23559962 -2.1551077 3.989970e-02 #>           sr2     CI_lower   CI_upper #> 1 0.004805465 0.0000000000 0.02702141 #> 2 0.558188818 0.3142326391 0.80214500 #> 3 0.035022025 0.0003502202 0.09723370  # Multiple dependent variables at once nice_mod(   data = mtcars,   response = c(\"mpg\", \"disp\", \"hp\"),   predictor = \"gear\",   moderator = \"wt\" ) #>   Model Number Dependent Variable Predictor df           B          t #> 1            1                mpg      gear 28 -0.08718042 -0.7982999 #> 2            1                mpg        wt 28 -0.94959988 -8.6037724 #> 3            1                mpg   gear:wt 28 -0.23559962 -2.1551077 #> 4            2               disp      gear 28 -0.07488985 -0.6967831 #> 5            2               disp        wt 28  0.83273987  7.6662883 #> 6            2               disp   gear:wt 28 -0.08758665 -0.8140664 #> 7            3                 hp      gear 28  0.42308208  2.6537930 #> 8            3                 hp        wt 28  0.92572761  5.7454866 #> 9            3                 hp   gear:wt 28  0.15308972  0.9592587 #>              p         sr2     CI_lower   CI_upper #> 1 4.314156e-01 0.004805465 0.0000000000 0.02702141 #> 2 2.383144e-09 0.558188818 0.3142326391 0.80214500 #> 3 3.989970e-02 0.035022025 0.0003502202 0.09723370 #> 4 4.916834e-01 0.003546038 0.0000000000 0.02230154 #> 5 2.373171e-08 0.429258143 0.1916386492 0.66687764 #> 6 4.224765e-01 0.004840251 0.0000000000 0.02679265 #> 7 1.297126e-02 0.113174016 0.0011317402 0.26928944 #> 8 3.637782e-06 0.530476631 0.2928664478 0.76808681 #> 9 3.456390e-01 0.014787139 0.0000000000 0.07139000  # Add covariates nice_mod(   data = mtcars,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\",   covariates = c(\"am\", \"vs\") ) #>   Dependent Variable Predictor df          B          t            p #> 1                mpg      gear 26 -0.1106937 -0.8787865 3.875666e-01 #> 2                mpg        wt 26 -0.6977072 -5.0686874 2.803684e-05 #> 3                mpg        am 26  0.1306864  0.8569286 3.993141e-01 #> 4                mpg        vs 26  0.3192472  3.2441426 3.228614e-03 #> 5                mpg   gear:wt 26 -0.2511143 -2.5615471 1.656773e-02 #>           sr2     CI_lower   CI_upper #> 1 0.004459982 0.0000000000 0.02257663 #> 2 0.148373834 0.0198201790 0.27692749 #> 3 0.004240876 0.0000000000 0.02189819 #> 4 0.060780767 0.0006078077 0.13504910 #> 5 0.037894048 0.0003789405 0.09436130  # Three-way interaction x <- nice_mod(   data = mtcars,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\",   moderator2 = \"am\" ) x #>   Dependent Variable  Predictor df          B         t           p         sr2 #> 1                mpg       gear 24  0.3013096  1.791291 0.085867454 0.015880099 #> 2                mpg         wt 24 -1.9824141 -3.296782 0.003035645 0.053790002 #> 3                mpg         am 24 -0.3381137 -1.431537 0.165170887 0.010142070 #> 4                mpg    gear:wt 24 -0.9906361 -1.567980 0.129977525 0.012167517 #> 5                mpg    gear:am 24 -0.2934245 -1.649909 0.111990122 0.013472278 #> 6                mpg      wt:am 24  0.2636573  0.499489 0.621983258 0.001234733 #> 7                mpg gear:wt:am 24  1.0037369  1.854357 0.076016767 0.017017980 #>    CI_lower    CI_upper #> 1 0.0000000 0.047441438 #> 2 0.0005379 0.117448925 #> 3 0.0000000 0.034953502 #> 4 0.0000000 0.039504439 #> 5 0.0000000 0.042345492 #> 6 0.0000000 0.009659682 #> 7 0.0000000 0.049794162 # Get interpretations cbind(x, Interpretation = effectsize::interpret_r2_semipartial(x$sr2)) #>   Dependent Variable  Predictor df          B         t           p         sr2 #> 1                mpg       gear 24  0.3013096  1.791291 0.085867454 0.015880099 #> 2                mpg         wt 24 -1.9824141 -3.296782 0.003035645 0.053790002 #> 3                mpg         am 24 -0.3381137 -1.431537 0.165170887 0.010142070 #> 4                mpg    gear:wt 24 -0.9906361 -1.567980 0.129977525 0.012167517 #> 5                mpg    gear:am 24 -0.2934245 -1.649909 0.111990122 0.013472278 #> 6                mpg      wt:am 24  0.2636573  0.499489 0.621983258 0.001234733 #> 7                mpg gear:wt:am 24  1.0037369  1.854357 0.076016767 0.017017980 #>    CI_lower    CI_upper Interpretation #> 1 0.0000000 0.047441438          small #> 2 0.0005379 0.117448925          small #> 3 0.0000000 0.034953502          small #> 4 0.0000000 0.039504439          small #> 5 0.0000000 0.042345492          small #> 6 0.0000000 0.009659682     very small #> 7 0.0000000 0.049794162          small"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Report missing values according to guidelines ‚Äî nice_na","title":"Report missing values according to guidelines ‚Äî nice_na","text":"Nicely reports NA values according existing guidelines. function reports absolute percentage values specified column lists. authors recommend reporting item-level missing item per scale, well participant‚Äôs maximum number missing items scale. example, Parent (2013) writes: recommend authors () state tolerance level missing data scale subscale (e.g., ‚Äúcalculated means subscales participants gave least 75% complete data‚Äù) (b) report individual missingness rates scale per data point (.e., number missing values data points scale participants) maximum participant (e.g., ‚ÄúAttachment Anxiety, total 4 missing data points 100 observed, participant missing single data point‚Äù).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Report missing values according to guidelines ‚Äî nice_na","text":"","code":"nice_na(data, vars = NULL, scales = NULL)"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Report missing values according to guidelines ‚Äî nice_na","text":"data data frame. vars Variable (lists variables) check NAs. scales scale names check NAs (single character string).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_na.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Report missing values according to guidelines ‚Äî nice_na","text":"dataframe, : var: variables selected items: number items selected variables na: number missing cell values variables (e.g., 2 missing values first participant + 2 missing values second participant = total 4 missing values) cells: total number cells (.e., number participants multiplied number variables, items) na_percent: percentage missing values (number missing cells, na, divided total number cells, cells) na_max: amount missing values participant missing values selected variables na_max_percent: amount missing values participant missing values selected variables, percentage (.e., na_max divided number selected variables, items) all_na: number participants missing 100% items scale (selected variables)","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_na.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Report missing values according to guidelines ‚Äî nice_na","text":"Parent, M. C. (2013). Handling item-level missing data: Simpler just good. Counseling Psychologist, 41(4), 568-600. https://doi.org/10.1177%2F0011000012445176","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_na.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Report missing values according to guidelines ‚Äî nice_na","text":"","code":"# Use whole data frame nice_na(airquality) #>         var items na cells na_percent na_max na_max_percent all_na #> 1 Ozone:Day     6 44   918       4.79      2          33.33      0  # Use selected columns explicitly nice_na(airquality,   vars = list(     c(\"Ozone\", \"Solar.R\", \"Wind\"),     c(\"Temp\", \"Month\", \"Day\")   ) ) #>          var items na cells na_percent na_max na_max_percent all_na #> 1 Ozone:Wind     3 44   459       9.59      2          66.67      0 #> 2   Temp:Day     3  0   459       0.00      0           0.00      0 #> 3      Total     6 44   918       4.79      2          33.33      0  # If the questionnaire items start with the same name, e.g., set.seed(15) fun <- function() {   c(sample(c(NA, 1:10), replace = TRUE), NA, NA, NA) } df <- data.frame(   ID = c(\"idz\", NA),   scale1_Q1 = fun(), scale1_Q2 = fun(), scale1_Q3 = fun(),   scale2_Q1 = fun(), scale2_Q2 = fun(), scale2_Q3 = fun(),   scale3_Q1 = fun(), scale3_Q2 = fun(), scale3_Q3 = fun() )  # One can list the scale names directly: nice_na(df, scales = c(\"ID\", \"scale1\", \"scale2\", \"scale3\")) #>                   var items na cells na_percent na_max na_max_percent all_na #> 1               ID:ID     1  7    14      50.00      1            100      7 #> 2 scale1_Q1:scale1_Q3     3 11    42      26.19      3            100      3 #> 3 scale2_Q1:scale2_Q3     3 17    42      40.48      3            100      3 #> 4 scale3_Q1:scale3_Q3     3 10    42      23.81      3            100      3 #> 5               Total    10 45   140      32.14     10            100      2"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_normality.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy normality check per group ‚Äî nice_normality","title":"Easy normality check per group ‚Äî nice_normality","text":"Easily make nice per-group density QQ plots wrapper around ggplot2 qqplotr packages.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_normality.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy normality check per group ‚Äî nice_normality","text":"","code":"nice_normality(   data,   variable,   group,   colours,   groups.labels,   grid = TRUE,   shapiro = FALSE,   title = NULL,   histogram = FALSE,   breaks.auto = FALSE,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_normality.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy normality check per group ‚Äî nice_normality","text":"data data frame. variable dependent variable plotted. group group plot variable. colours Desired colours plot, desired. groups.labels label groups. grid Logical, whether keep default background grid . APA style suggests using grid background, though case may find useful easily estimate slopes different groups. shapiro Logical, whether include p-value Shapiro-Wilk test plot. title optional title, desired. histogram Logical, whether add histogram top density plot. breaks.auto histogram = TRUE, option set bins/breaks automatically, mimicking default behaviour base R hist() (Sturges method). Defaults FALSE. ... arguments nice_qq() nice_density() passed nice_normality()","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_normality.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy normality check per group ‚Äî nice_normality","text":"plot classes patchwork ggplot, containing two plots, resulting nice_density nice_qq.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_normality.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy normality check per group ‚Äî nice_normality","text":"","code":"# Make the basic plot nice_normality(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\" )   # Further customization nice_normality(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\",   colours = c(     \"#00BA38\",     \"#619CFF\",     \"#F8766D\"   ),   groups.labels = c(     \"(a) Setosa\",     \"(b) Versicolor\",     \"(c) Virginica\"   ),   grid = FALSE,   shapiro = TRUE )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_qq.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy QQ plots per group ‚Äî nice_qq","title":"Easy QQ plots per group ‚Äî nice_qq","text":"Easily make nice per-group QQ plots wrapper around ggplot2 qqplotr packages.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_qq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy QQ plots per group ‚Äî nice_qq","text":"","code":"nice_qq(   data,   variable,   group,   colours,   groups.labels = NULL,   grid = TRUE,   shapiro = FALSE,   title = variable )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_qq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy QQ plots per group ‚Äî nice_qq","text":"data data frame. variable dependent variable plotted. group group plot variable. colours Desired colours plot, desired. groups.labels label groups. grid Logical, whether keep default background grid . APA style suggests using grid background, though case may find useful easily estimate slopes different groups. shapiro Logical, whether include p-value Shapiro-Wilk test plot. title optional title, desired.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_qq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy QQ plots per group ‚Äî nice_qq","text":"qq plot class ggplot, group (provided), along reference interpretation helper, 95% confidence band.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_qq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy QQ plots per group ‚Äî nice_qq","text":"","code":"# Make the basic plot nice_qq(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\" )   # Further customization nice_qq(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\",   colours = c(\"#00BA38\", \"#619CFF\", \"#F8766D\"),   groups.labels = c(\"(a) Setosa\", \"(b) Versicolor\", \"(c) Virginica\"),   grid = FALSE,   shapiro = TRUE,   title = NULL )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_randomize.html","id":null,"dir":"Reference","previous_headings":"","what":"Easily randomization ‚Äî nice_randomize","title":"Easily randomization ‚Äî nice_randomize","text":"Randomize easily different designs.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_randomize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easily randomization ‚Äî nice_randomize","text":"","code":"nice_randomize(   design = \"between\",   Ncondition = 3,   n = 9,   condition.names = c(\"a\", \"b\", \"c\"),   col.names = c(\"id\", \"Condition\") )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_randomize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easily randomization ‚Äî nice_randomize","text":"design design: either -subject (different groups) within-subject (repeated-measures people). Ncondition number conditions want randomize. n desired sample size. Note needs multiple number groups using . condition.names names randomized conditions. col.names desired additional column names runsheet.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_randomize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easily randomization ‚Äî nice_randomize","text":"dataframe, participant ID randomized condition, based selected design.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_randomize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easily randomization ‚Äî nice_randomize","text":"","code":"# Specify design, number of conditions, number of # participants, and names of conditions: nice_randomize(   design = \"between\", Ncondition = 4, n = 8,   condition.names = c(\"BP\", \"CX\", \"PZ\", \"ZL\") ) #>   id Condition #> 1  1        ZL #> 2  2        BP #> 3  3        PZ #> 4  4        CX #> 5  5        PZ #> 6  6        ZL #> 7  7        CX #> 8  8        BP  # Within-Group Design nice_randomize(   design = \"within\", Ncondition = 4, n = 6,   condition.names = c(\"SV\", \"AV\", \"ST\", \"AT\") ) #>   id         Condition #> 1  1 AT - ST - SV - AV #> 2  2 SV - AV - AT - ST #> 3  3 AV - AT - SV - ST #> 4  4 ST - AV - AT - SV #> 5  5 SV - AT - AV - ST #> 6  6 SV - AT - ST - AV  # Make a quick runsheet randomized <- nice_randomize(   design = \"within\", Ncondition = 4, n = 128,   condition.names = c(\"SV\", \"AV\", \"ST\", \"AT\"),   col.names = c(     \"id\", \"Condition\", \"Date/Time\",     \"SONA ID\", \"Age/Gd.\", \"Handedness\",     \"Tester\", \"Notes\"   ) ) head(randomized) #>   id         Condition Date/Time SONA ID Age/Gd. Handedness Tester Notes #> 1  1 AV - AT - ST - SV        NA      NA      NA         NA     NA    NA #> 2  2 SV - ST - AV - AT        NA      NA      NA         NA     NA    NA #> 3  3 ST - SV - AV - AT        NA      NA      NA         NA     NA    NA #> 4  4 ST - SV - AV - AT        NA      NA      NA         NA     NA    NA #> 5  5 SV - ST - AV - AT        NA      NA      NA         NA     NA    NA #> 6  6 AT - ST - SV - AV        NA      NA      NA         NA     NA    NA"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_reverse.html","id":null,"dir":"Reference","previous_headings":"","what":"Easily recode scores ‚Äî nice_reverse","title":"Easily recode scores ‚Äî nice_reverse","text":"Easily recode scores (reverse-score), typically questionnaire answers. easystats equivalent, see: datawizard::reverse().","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_reverse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easily recode scores ‚Äî nice_reverse","text":"","code":"nice_reverse(x, max, min = 1)"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_reverse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easily recode scores ‚Äî nice_reverse","text":"x score reverse. max maximum score scale. min minimum score scale (optional unless 1).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_reverse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easily recode scores ‚Äî nice_reverse","text":"numeric vector, reversed scores.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_reverse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easily recode scores ‚Äî nice_reverse","text":"","code":"# Reverse score of 5 with a maximum score of 5 nice_reverse(5, 5) #> [1] 1  # Reverse several scores at once nice_reverse(1:5, 5) #> [1] 5 4 3 2 1  # Reverse scores with maximum = 4 and minimum = 0 nice_reverse(1:4, 4, min = 0) #> [1] 3 2 1 0  # Reverse scores with maximum = 3 and minimum = -3 nice_reverse(-3:3, 3, min = -3) #> [1]  3  2  1  0 -1 -2 -3"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_scatter.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy scatter plots ‚Äî nice_scatter","title":"Easy scatter plots ‚Äî nice_scatter","text":"Make nice scatter plots easily.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_scatter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy scatter plots ‚Äî nice_scatter","text":"","code":"nice_scatter(   data,   predictor,   response,   xtitle = predictor,   ytitle = response,   has.points = TRUE,   has.jitter = FALSE,   alpha = 0.7,   has.line = TRUE,   has.confband = FALSE,   has.fullrange = FALSE,   has.linetype = FALSE,   has.shape = FALSE,   xmin,   xmax,   xby = 1,   ymin,   ymax,   yby = 1,   has.legend = FALSE,   legend.title = \"\",   group = NULL,   colours = \"#619CFF\",   groups.order = NULL,   groups.labels = NULL,   groups.alpha = NULL,   has.r = FALSE,   r.x = Inf,   r.y = -Inf,   has.p = FALSE,   p.x = Inf,   p.y = -Inf )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_scatter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy scatter plots ‚Äî nice_scatter","text":"data data frame. predictor independent variable plotted. response dependent variable plotted. xtitle optional y-axis label, desired. ytitle optional x-axis label, desired. .points Whether plot individual observations . .jitter Alternative .points. \"Jitters\" observations avoid overlap (overplotting). Use one , . alpha desired level transparency. .line Whether plot regression line(s). .confband Logical. Whether display confidence band around slope. .fullrange Logical. Whether extend slope beyond range observations. .linetype Logical. Whether change line types function group. .shape Logical. Whether change shape observations function group. xmin minimum score x-axis scale. xmax maximum score x-axis scale. xby much increase \"tick\" x-axis scale. ymin minimum score y-axis scale. ymax maximum score y-axis scale. yby much increase \"tick\" y-axis scale. .legend Logical. Whether display legend . legend.title desired legend title. group group plot variable colours Desired colours plot, desired. groups.order Specifies desired display order groups. groups.labels Changes groups names (labels). Note: applies changing order level. groups.alpha manually specified transparency desired groups slopes. Use plotting groups separately. .r Whether display correlation coefficient, r-value. r.x x-axis coordinates r-value. r.y y-axis coordinates r-value. .p Whether display p-value. p.x x-axis coordinates p-value. p.y y-axis coordinates p-value.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_scatter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy scatter plots ‚Äî nice_scatter","text":"scatter plot class ggplot.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_scatter.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy scatter plots ‚Äî nice_scatter","text":"","code":"# Make the basic plot nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\" )  # \\donttest{ .old_wd <- setwd(tempdir()) # Save a high-resolution image file to specified directory ggplot2::ggsave(\"nicescatterplothere.pdf\", width = 7,   height = 7, unit = \"in\", dpi = 300 ) # change for your own desired path setwd(.old_wd) # Change x- and y- axis labels nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   ytitle = \"Miles/(US) gallon\",   xtitle = \"Weight (1000 lbs)\" )   # Have points \"jittered\" nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   has.jitter = TRUE )   # Change the transparency of the points nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   alpha = 1 )   # Remove points nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   has.points = FALSE,   has.jitter = FALSE )   # Add confidence band nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   has.confband = TRUE )   # Set x- and y- scales manually nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   xmin = 1,   xmax = 6,   xby = 1,   ymin = 10,   ymax = 35,   yby = 5 ) #> Warning: Removed 7 rows containing missing values (`geom_line()`).   # Change plot colour nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   colours = \"blueviolet\" )   # Add correlation coefficient to plot and p-value nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   has.r = TRUE,   has.p = TRUE )   # Change location of correlation coefficient or p-value nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   has.r = TRUE,   r.x = 4,   r.y = 25,   has.p = TRUE,   p.x = 5,   p.y = 20 )   # Plot by group nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\" )   # Use full range on the slope/confidence band nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   has.fullrange = TRUE )   # Remove lines nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   has.line = FALSE )   # Add a legend nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   has.legend = TRUE )   # Change order of labels on the legend nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   has.legend = TRUE,   groups.order = c(8, 4, 6) )   # Change legend labels nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   has.legend = TRUE,   groups.labels = c(\"Weak\", \"Average\", \"Powerful\") )  # Warning: This applies after changing order of level  # Add a title to legend nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   has.legend = TRUE,   legend.title = \"cylinders\" )   # Plot by group + manually specify colours nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   colours = c(\"burlywood\", \"darkgoldenrod\", \"chocolate\") )   # Plot by group + use different line types for each group nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   has.linetype = TRUE )   # Plot by group + use different point shapes for each group nice_scatter(   data = mtcars,   predictor = \"wt\",   response = \"mpg\",   group = \"cyl\",   has.shape = TRUE )  # }"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_slopes.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy simple slopes ‚Äî nice_slopes","title":"Easy simple slopes ‚Äî nice_slopes","text":"Easily compute simple slopes moderation analysis, effect sizes, format publication-ready format.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_slopes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy simple slopes ‚Äî nice_slopes","text":"","code":"nice_slopes(   data,   response,   predictor,   moderator,   moderator2 = NULL,   covariates = NULL,   b.label = \"b\",   standardize = TRUE,   mod.id = TRUE,   ci.alternative = \"two.sided\",   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_slopes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy simple slopes ‚Äî nice_slopes","text":"data data frame response dependent variable. predictor independent variable moderator moderating variable. moderator2 second moderating variable, applicable. time, second moderator variable can binary variable form c(0, 1). covariates desired covariates model. b.label rename default \"b\" column (e.g., capital B using standardized data converted Greek beta symbol nice_table() function). Now attempts automatically detect whether variables standardized, , sets b.label = \"B\" automatically. Factor variables dummy variables (two numeric values) ignored checking standardization. argument now deprecated, please use argument standardize directly instead. standardize Logical, whether standardize data fitting model. TRUE, automatically sets b.label = \"B\". Defaults TRUE. mod.id Logical. Whether display model number, one model. ci.alternative Alternative confidence interval sr2. can either \"two.sided (default package), \"greater\", \"less\". ... arguments passed lm() function models.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_slopes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy simple slopes ‚Äî nice_slopes","text":"formatted dataframe simple slopes specified lm model, DV, levels IV, degrees freedom, regression coefficient, t-value, p-value, effect size, semi-partial correlation squared, confidence interval.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_slopes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easy simple slopes ‚Äî nice_slopes","text":"effect size, sr2 (semi-partial correlation squared, also known delta R2), computed effectsize::r2_semipartial. Please read documentation function, especially regarding interpretation confidence interval. rempsyc, instead using default one-sided alternative (\"greater\"), use two-sided alternative. interpret sr2, use effectsize::interpret_r2_semipartial(). easystats equivalent, use report::report() lm() model object.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_slopes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy simple slopes ‚Äî nice_slopes","text":"","code":"# Make the basic table nice_slopes(   data = mtcars,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\" ) #>   Dependent Variable Predictor (+/-1 SD) df           B          t          p #> 1                mpg       gear (LOW-wt) 28  0.14841920  1.0767040 0.29080233 #> 2                mpg      gear (MEAN-wt) 28 -0.08718042 -0.7982999 0.43141565 #> 3                mpg      gear (HIGH-wt) 28 -0.32278004 -1.9035367 0.06729622 #>           sr2 CI_lower   CI_upper #> 1 0.008741702        0 0.03886052 #> 2 0.004805465        0 0.02702141 #> 3 0.027322839        0 0.08179662  # Multiple dependent variables at once nice_slopes(   data = mtcars,   response = c(\"mpg\", \"disp\", \"hp\"),   predictor = \"gear\",   moderator = \"wt\" ) #>   Model Number Dependent Variable Predictor (+/-1 SD) df           B          t #> 1            1                mpg       gear (LOW-wt) 28  0.14841920  1.0767040 #> 2            1                mpg      gear (MEAN-wt) 28 -0.08718042 -0.7982999 #> 3            1                mpg      gear (HIGH-wt) 28 -0.32278004 -1.9035367 #> 4            2               disp       gear (LOW-wt) 28  0.01269680  0.0935897 #> 5            2               disp      gear (MEAN-wt) 28 -0.07488985 -0.6967831 #> 6            2               disp      gear (HIGH-wt) 28 -0.16247650 -0.9735823 #> 7            3                 hp       gear (LOW-wt) 28  0.26999235  1.3416927 #> 8            3                 hp      gear (MEAN-wt) 28  0.42308208  2.6537930 #> 9            3                 hp      gear (HIGH-wt) 28  0.57617180  2.3275656 #>            p          sr2     CI_lower    CI_upper #> 1 0.29080233 8.741702e-03 0.0000000000 0.038860523 #> 2 0.43141565 4.805465e-03 0.0000000000 0.027021406 #> 3 0.06729622 2.732284e-02 0.0000000000 0.081796622 #> 4 0.92610159 6.397412e-05 0.0000000000 0.002570652 #> 5 0.49168336 3.546038e-03 0.0000000000 0.022301536 #> 6 0.33860037 6.922988e-03 0.0000000000 0.033253212 #> 7 0.19047626 2.892802e-02 0.0000000000 0.108167016 #> 8 0.01297126 1.131740e-01 0.0011317402 0.269289442 #> 9 0.02738736 8.705956e-02 0.0008705956 0.224382568  # Add covariates nice_slopes(   data = mtcars,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\",   covariates = c(\"am\", \"vs\") ) #>   Dependent Variable Predictor (+/-1 SD) df          B          t          p #> 1                mpg       gear (LOW-wt) 26  0.1404206  0.8866848 0.38337713 #> 2                mpg      gear (MEAN-wt) 26 -0.1106937 -0.8787865 0.38756663 #> 3                mpg      gear (HIGH-wt) 26 -0.3618080 -2.2493043 0.03318541 #>           sr2     CI_lower   CI_upper #> 1 0.004540512 0.0000000000 0.02282331 #> 2 0.004459982 0.0000000000 0.02257663 #> 3 0.029218824 0.0002921882 0.07802035  # Three-way interaction (continuous moderator and binary # second moderator required) x <- nice_slopes(   data = mtcars,   response = \"mpg\",   predictor = \"gear\",   moderator = \"wt\",   moderator2 = \"am\" ) x #>   Dependent Variable am Predictor (+/-1 SD) df           B          t #> 1                mpg  0       gear (LOW-wt) 24  2.34802068  2.0297802 #> 2                mpg  0      gear (MEAN-wt) 24  0.54019914  2.7321453 #> 3                mpg  0      gear (HIGH-wt) 24 -1.26762239 -1.3171195 #> 4                mpg  1       gear (LOW-wt) 24 -0.25154857 -1.4054434 #> 5                mpg  1      gear (MEAN-wt) 24 -0.04783665 -0.1613202 #> 6                mpg  1      gear (HIGH-wt) 24  0.15587527  0.2795012 #>            p          sr2     CI_lower    CI_upper #> 1 0.05360579 0.0203900917 0.0000000000 0.056598989 #> 2 0.01161625 0.0369427073 0.0003694271 0.087760631 #> 3 0.20023635 0.0085856163 0.0000000000 0.031309188 #> 4 0.17270299 0.0097757007 0.0000000000 0.034108645 #> 5 0.87319157 0.0001287948 0.0000000000 0.002840222 #> 6 0.78225488 0.0003866236 0.0000000000 0.005088286 # Get interpretations cbind(x, Interpretation = effectsize::interpret_r2_semipartial(x$sr2)) #>   Dependent Variable am Predictor (+/-1 SD) df           B          t #> 1                mpg  0       gear (LOW-wt) 24  2.34802068  2.0297802 #> 2                mpg  0      gear (MEAN-wt) 24  0.54019914  2.7321453 #> 3                mpg  0      gear (HIGH-wt) 24 -1.26762239 -1.3171195 #> 4                mpg  1       gear (LOW-wt) 24 -0.25154857 -1.4054434 #> 5                mpg  1      gear (MEAN-wt) 24 -0.04783665 -0.1613202 #> 6                mpg  1      gear (HIGH-wt) 24  0.15587527  0.2795012 #>            p          sr2     CI_lower    CI_upper Interpretation #> 1 0.05360579 0.0203900917 0.0000000000 0.056598989          small #> 2 0.01161625 0.0369427073 0.0003694271 0.087760631          small #> 3 0.20023635 0.0085856163 0.0000000000 0.031309188     very small #> 4 0.17270299 0.0097757007 0.0000000000 0.034108645     very small #> 5 0.87319157 0.0001287948 0.0000000000 0.002840222     very small #> 6 0.78225488 0.0003866236 0.0000000000 0.005088286     very small"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Easily make nice APA tables ‚Äî nice_table","title":"Easily make nice APA tables ‚Äî nice_table","text":"Make nice APA tables easily wrapper around flextable package sensical defaults automatic formatting features.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easily make nice APA tables ‚Äî nice_table","text":"","code":"nice_table(   data,   highlight = FALSE,   stars = TRUE,   italics,   col.format.p,   col.format.r,   col.format.ci,   format.custom,   col.format.custom,   width = NULL,   broom = NULL,   report = NULL,   short = FALSE,   title,   note,   separate.header )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easily make nice APA tables ‚Äî nice_table","text":"data data frame, converted flextable. data frame duplicate column names. highlight Highlight rows statistically significant results? Requires column named \"p\" containing p-values. Can either accept logical (TRUE/FALSE) numeric value custom critical p-value threshold (e.g., 0.10 0.001). stars Logical. Whether add asterisks significant p values. italics columns headers italic? Useful column names italic picked automatically function. Select numerical range, e.g., 1:3. col.format.p Applies p-value formatting columns named \"p\" (example data frame full p-values, also possible one column named \"p\"). Select numerical range, e.g., 1:3. col.format.r Applies r-value formatting columns named \"r\" (example data frame full r-values, also possible one column named \"r\"). Select numerical range, e.g., 1:3. col.format.ci Applies 95% confidence interval formatting selected columns (e.g., reporting one interval). format.custom Applies custom formatting columns selected via col.format.custom argument. useful one wants custom formatting p- r-values. can also used transform (e.g., multiply) certain values print specific symbol along values instance. col.format.custom columns apply custom function . Select numerical range, e.g., 1:3. width Width table, percentage total width, exported e.g., Word. full width, use width = 1. broom providing tidy table produced broom package, model type use one wants automatic formatting (options \"t.test\", \"lm\", \"cor.test\", \"wilcox.test\"). report providing object produced report package, model type use one wants automatic formatting (options \"t.test\", \"lm\", \"cor.test\"). short Logical. Whether return abbreviated version tables made report package. title Optional, add table header, desired. note Optional, add one table footnote (APA note), desired. separate.header Logical, whether separate headers based name delimiters (.e., periods \".\").","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easily make nice APA tables ‚Äî nice_table","text":"APA-formatted table class \"flextable\" (\"nice_table\").","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easily make nice APA tables ‚Äî nice_table","text":"Table 1 Motor Trend Car Road Tests mpg cyl disp hp drat wt qsec vs gear carb 21.00 6.00 160.00 110.00 3.90 2.62 16.46 0.00 1.00 4.00 4.00 21.00 6.00 160.00 110.00 3.90 2.88 17.02 0.00 1.00 4.00 4.00 22.80 4.00 108.00 93.00 3.85 2.32 18.61 1.00 1.00 4.00 1.00 Note. data extracted 1974 Motor Trend US magazine. * p < .05, ** p < .01, *** p < .001 Term Œ≤ SE t p 95% CI (Intercept) -0.18 0.09 -2.15 .041* [-0.36, -0.01] cyl -0.11 0.15 -0.72 .479 [-0.42, 0.20] wt -0.62 0.11 -5.70 < .001*** [-0.85, -0.40] hp -0.29 0.12 -2.40 .023* [-0.53, -0.04] wt √ó hp 0.29 0.09 3.23 .003** [0.11, 0.47] dR N M SD b Œ∑p2 Œ∑G2 p r R2 sr2 21.00 6 160.00 110.00 3.90 2.62 16.46 < .001*** 1.0 .40 .40 21.00 6 160.00 110.00 3.90 2.88 17.02 < .001*** 1.0 .40 .40 22.80 4 108.00 93.00 3.85 2.32 18.61 1.00 1.0 .40 .10 21.40 6 258.00 110.00 3.08 3.21 19.44 1.00 .00 .30 .10 18.70 8 360.00 175.00 3.15 3.44 17.02 < .001*** .00 .30 .20 18.10 6 225.00 105.00 2.76 3.46 20.22 1.00 .00 .30 .10 p r R2 sr2 < .001*** 1.00 .400 .400 < .001*** 1.00 .400 .400 1.00 1.00 .400 .100 1.00 < .001*** .300 .100 < .001*** < .001*** .300 .200 1.00 < .001*** .300 .100 p r R2 sr2 .00 1.0 .40 .40 .00 1.0 .40 .40 1.0 1.0 .40 .10 1.0 .00 .30 .10 .00 .00 .30 .20 1.0 .00 .30 .10 Variable setosa versicolor M SD M SD Sepal.Length 5.01 0.35 5.94 0.52 Sepal.Width 3.43 0.38 2.77 0.31 Petal.Length 1.46 0.17 4.26 0.47","code":"# Make the basic table my_table <- nice_table(   mtcars[1:3, ],   title = c(\"Table 1\", \"Motor Trend Car Road Tests\"),   note = c(\"The data was extracted from the 1974 Motor Trend US magazine.\",            \"* p < .05, ** p < .01, *** p < .001\") ) my_table .cl-dffffb82{table-layout:auto;}.cl-dfc66a48{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-dfc66a49{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-dfc66a4a{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-dfecb0d6{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-dfecb0d7{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-dfecb0d8{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 1;background-color:transparent;}.cl-dfecd7e6{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(102, 102, 102, 1.00);border-top: 0 solid rgba(102, 102, 102, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-dfecd7e7{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(102, 102, 102, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-dfecd7e8{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-dfecd7e9{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-dfecd7ea{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-dfecd7eb{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-dfecd7ec{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-dfecd7ed{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(255, 255, 255, 0.00);border-top: 0 solid rgba(255, 255, 255, 0.00);border-left: 0 solid rgba(255, 255, 255, 0.00);border-right: 0 solid rgba(255, 255, 255, 0.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}Table 1Motor Trend Car Road Testsmpgcyldisphpdratwtqsecvsamgearcarb21.006.00160.00110.003.902.6216.460.001.004.004.0021.006.00160.00110.003.902.8817.020.001.004.004.0022.804.00108.0093.003.852.3218.611.001.004.001.00Note. The data was extracted from the 1974 Motor Trend US magazine.* p < .05, ** p < .01, *** p < .001 # \\donttest{ # Save table to word mypath <- tempfile(fileext = \".docx\") flextable::save_as_docx(my_table, path = mypath) # }  # Publication-ready tables mtcars.std <- lapply(mtcars, scale) model <- lm(mpg ~ cyl + wt * hp, mtcars.std) stats.table <- as.data.frame(summary(model)$coefficients) CI <- confint(model) stats.table <- cbind(   row.names(stats.table),   stats.table, CI ) names(stats.table) <- c(   \"Term\", \"B\", \"SE\", \"t\", \"p\",   \"CI_lower\", \"CI_upper\" ) nice_table(stats.table, highlight = TRUE) .cl-e0cf4fe0{table-layout:auto;}.cl-e0b2a4b2{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e0b2a4b3{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e0b2a4b4{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e0bf25de{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e0bf25df{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e0bf4cda{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e0bf4cdb{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e0bf4cdc{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e0bf4cdd{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e0bf4cde{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e0bf4cdf{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e0bf4ce0{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}TermŒ≤SEtp95% CI(Intercept)-0.180.09-2.15.041*[-0.36, -0.01]cyl-0.110.15-0.72.479[-0.42, 0.20]wt-0.620.11-5.70< .001***[-0.85, -0.40]hp-0.290.12-2.40.023*[-0.53, -0.04]wt √ó hp0.290.093.23.003**[0.11, 0.47] # Test different column names test <- head(mtcars) names(test) <- c(   \"dR\", \"N\", \"M\", \"SD\", \"b\", \"np2\",   \"ges\", \"p\", \"r\", \"R2\", \"sr2\" ) test[, 10:11] <- test[, 10:11] / 10 nice_table(test) .cl-e14f5a46{table-layout:auto;}.cl-e1340e6c{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e1340e6d{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;top:3.6pt;}.cl-e1340e6e{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e1340e6f{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-e13fcc66{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e13fcc67{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e13ff36c{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e13ff36d{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e13ff36e{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e13ff36f{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e13ff370{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}dRNMSDbŒ∑p2Œ∑G2prR2sr221.006160.00110.003.902.6216.46< .001***1.0.40.4021.006160.00110.003.902.8817.02< .001***1.0.40.4022.804108.0093.003.852.3218.611.001.0.40.1021.406258.00110.003.083.2119.441.00.00.30.1018.708360.00175.003.153.4417.02< .001***.00.30.2018.106225.00105.002.763.4620.221.00.00.30.10 # Custom cell formatting (such as p or r) nice_table(test[8:11], col.format.p = 2:4, highlight = .001) .cl-e190517c{table-layout:auto;}.cl-e17aaa02{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e17aaa03{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-e17aaa04{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e17aaa05{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e1849382{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e1849383{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e184ba92{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e184ba93{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e184ba94{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e184ba95{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e184ba96{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e184ba97{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e184ba98{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}prR2sr2< .001***1.00.400.400< .001***1.00.400.4001.001.00.400.1001.00< .001***.300.100< .001***< .001***.300.2001.00< .001***.300.100 nice_table(test[8:11], col.format.r = 1:4) .cl-e1d983d8{table-layout:auto;}.cl-e1bc6398{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e1bc6399{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-e1bc639a{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e1c90bd4{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e1c90bd5{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e1c959cc{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e1c959cd{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e1c959ce{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e1c959cf{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e1c959d0{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}prR2sr2.001.0.40.40.001.0.40.401.01.0.40.101.0.00.30.10.00.00.30.201.0.00.30.10 # Apply custom functions to cells fun <- function(x) {   x + 11.1 } nice_table(test[8:11], col.format.custom = 2:4, format.custom = \"fun\") #> Error in flextable::set_formatter(., r = fun): object 'fun' not found  fun <- function(x) {   paste(\"x\", x) } nice_table(test[8:11], col.format.custom = 2:4, format.custom = \"fun\") #> Error in flextable::set_formatter(., r = fun): object 'fun' not found  # Separate headers based on periods header.data <- structure(list(   Variable = c(     \"Sepal.Length\",     \"Sepal.Width\", \"Petal.Length\"   ), setosa.M = c(     5.01, 3.43,     1.46   ), setosa.SD = c(0.35, 0.38, 0.17), versicolor.M =     c(5.94, 2.77, 4.26), versicolor.SD = c(0.52, 0.31, 0.47) ), row.names = c(NA, -3L), class = \"data.frame\" ) nice_table(header.data,   separate.header = TRUE,   italics = 2:4 ) .cl-e257197e{table-layout:auto;}.cl-e23e8c56{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e23e8c57{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-e2471682{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e2471683{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-e24764a2{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e24764a3{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e24764a4{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e24764a5{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-e24764a6{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}VariablesetosaversicolorMSDMSDSepal.Length5.010.355.940.52Sepal.Width3.430.382.770.31Petal.Length1.460.174.260.47"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_t_test.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy t-tests ‚Äî nice_t_test","title":"Easy t-tests ‚Äî nice_t_test","text":"Easily compute t-test analyses, effect sizes, format publication-ready format. 95% confidence interval effect size, Cohen's d, provided effectsize package.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_t_test.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy t-tests ‚Äî nice_t_test","text":"","code":"nice_t_test(   data,   response,   group = NULL,   correction = \"none\",   warning = TRUE,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_t_test.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy t-tests ‚Äî nice_t_test","text":"data data frame. response dependent variable. group group comparison. correction correction multiple comparison apply, . Default \"none\" option (now) \"bonferroni\". warning Whether display Welch test warning . ... arguments passed t.test() function (e.g., use Student instead Welch test, change two-tail one-tail, paired-sample t-test instead independent samples).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_t_test.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy t-tests ‚Äî nice_t_test","text":"formatted dataframe specified model, DV, degrees freedom, t-value, p-value, effect size, Cohen's d, 95% confidence interval lower upper bounds.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_t_test.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easy t-tests ‚Äî nice_t_test","text":"function relies base R t.test() function, uses Welch t-test per default (see : https://daniellakens.blogspot.com/2015/01/always-use-welchs-t-test-instead-.html). use Student t-test, simply add following argument: var.equal = TRUE. Note paired t tests, need use paired = TRUE, also need data \"long\" format rather wide format (like ToothGrowth data set). case, group argument refers participant ID example, group/participant measured several times, thus several rows. easystats equivalent, use: report::report() t.test() object.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_t_test.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy t-tests ‚Äî nice_t_test","text":"","code":"# Make the basic table nice_t_test(   data = mtcars,   response = \"mpg\",   group = \"am\" ) #> Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82). #> For the Student t-test, use `var.equal = TRUE`.  #>   #>   Dependent Variable         t       df           p         d  CI_lower #> 1                mpg -3.767123 18.33225 0.001373638 -1.477947 -2.265973 #>     CI_upper #> 1 -0.6705686  # Multiple dependent variables at once nice_t_test(   data = mtcars,   response = names(mtcars)[1:7],   group = \"am\" ) #> Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82). #> For the Student t-test, use `var.equal = TRUE`.  #>   #>   Dependent Variable         t       df            p          d   CI_lower #> 1                mpg -3.767123 18.33225 1.373638e-03 -1.4779471 -2.2659731 #> 2                cyl  3.354114 25.85363 2.464713e-03  1.2084550  0.4315896 #> 3               disp  4.197727 29.25845 2.300413e-04  1.4452210  0.6417834 #> 4                 hp  1.266189 18.71541 2.209796e-01  0.4943081 -0.2260466 #> 5               drat -5.646088 27.19780 5.266742e-06 -2.0030843 -2.8592770 #> 6                 wt  5.493905 29.23352 6.272020e-06  1.8924060  1.0300224 #> 7               qsec  1.287845 25.53421 2.093498e-01  0.4656285 -0.2532864 #>     CI_upper #> 1 -0.6705686 #> 2  1.9683146 #> 3  2.2295592 #> 4  1.2066992 #> 5 -1.1245498 #> 6  2.7329218 #> 7  1.1770176  # Can be passed some of the regular arguments # of base [t.test()]  # Student t-test (instead of Welch) nice_t_test(   data = mtcars,   response = \"mpg\",   group = \"am\",   var.equal = TRUE ) #> Using Student t-test.  #>   #>   Dependent Variable         t df            p         d  CI_lower   CI_upper #> 1                mpg -4.106127 30 0.0002850207 -1.477947 -2.265973 -0.6705686  # One-sided instead of two-sided nice_t_test(   data = mtcars,   response = \"mpg\",   group = \"am\",   alternative = \"less\" ) #> Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82). #> For the Student t-test, use `var.equal = TRUE`.  #>   #>   Dependent Variable         t       df            p         d  CI_lower #> 1                mpg -3.767123 18.33225 0.0006868192 -1.477947 -2.265973 #>     CI_upper #> 1 -0.6705686  # One-sample t-test nice_t_test(   data = mtcars,   response = \"mpg\",   mu = 10 ) #> Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82). #> For the Student t-test, use `var.equal = TRUE`.  #>   #> Using one-sample t-test.  #>   #>   Dependent Variable        t df            p        d CI_lower CI_upper #> 1                mpg 9.470995 31 1.154598e-10 1.674251  1.12797 2.208995  # Paired t-test instead of independent samples # Requires data in \"long\" format nice_t_test(   data = ToothGrowth,   response = \"len\",   group = \"supp\",   paired = TRUE ) #> Using paired t-test.  #>   #>   Dependent Variable        t df           p         d  CI_lower  CI_upper #> 1                len 3.302585 29 0.002549842 0.6029668 0.2088153 0.9883436 # Make sure cases appear in the same order for # both levels of the grouping factor"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_var.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain variance per group ‚Äî nice_var","title":"Obtain variance per group ‚Äî nice_var","text":"Obtain variance per group well check rule thumb one group variance four times bigger groups. Variance ratio calculated Max / Min.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain variance per group ‚Äî nice_var","text":"","code":"nice_var(data, variable, group, criteria = 4)"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain variance per group ‚Äî nice_var","text":"data data frame variable dependent variable plotted. group group plot variable. criteria Desired threshold one wants something different four times variance.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain variance per group ‚Äî nice_var","text":"dataframe, values selected variables group, max variance ratio (maximum variance divided minimum variance), selected decision criterion, whether data considered heteroscedastic according decision criterion.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_var.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Obtain variance per group ‚Äî nice_var","text":"","code":"# Make the basic table nice_var(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\" ) #>        Species Setosa Versicolor Virginica Variance.ratio Criteria #> 1 Sepal.Length  0.124      0.266     0.404            3.3        4 #>   Heteroscedastic #> 1           FALSE  # Try on multiple variables nice_var(   data = iris,   variable = names(iris[1:4]),   group = \"Species\" ) #>        Species Setosa Versicolor Virginica Variance.ratio Criteria #> 1 Sepal.Length  0.124      0.266     0.404            3.3        4 #> 2  Sepal.Width  0.144      0.098     0.104            1.5        4 #> 3 Petal.Length  0.030      0.221     0.305           10.2        4 #> 4  Petal.Width  0.011      0.039     0.075            6.8        4 #>   Heteroscedastic #> 1           FALSE #> 2           FALSE #> 3            TRUE #> 4            TRUE"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_varplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Attempt to visualize variance per group ‚Äî nice_varplot","title":"Attempt to visualize variance per group ‚Äî nice_varplot","text":"Attempt visualize variance per group.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_varplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Attempt to visualize variance per group ‚Äî nice_varplot","text":"","code":"nice_varplot(   data,   variable,   group,   colours,   groups.labels,   grid = TRUE,   shapiro = FALSE,   ytitle = variable )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_varplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Attempt to visualize variance per group ‚Äî nice_varplot","text":"data data frame variable dependent variable plotted. group group plot variable. colours Desired colours plot, desired. groups.labels label groups. grid Logical, whether keep default background grid . APA style suggests using grid background, though case may find useful easily estimate slopes different groups. shapiro Logical, whether include p-value Shapiro-Wilk test plot. ytitle optional y-axis label, desired.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_varplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Attempt to visualize variance per group ‚Äî nice_varplot","text":"scatter plot class ggplot attempting display group variances. Also includes max variance ratio (maximum variance divided minimum variance).","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_varplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Attempt to visualize variance per group ‚Äî nice_varplot","text":"","code":"# Make the basic plot nice_varplot(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\" )   # Further customization nice_varplot(   data = iris,   variable = \"Sepal.Length\",   group = \"Species\",   colours = c(     \"#00BA38\",     \"#619CFF\",     \"#F8766D\"   ),   ytitle = \"Sepal Length\",   groups.labels = c(     \"(a) Setosa\",     \"(b) Versicolor\",     \"(c) Virginica\"   ) )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_violin.html","id":null,"dir":"Reference","previous_headings":"","what":"Easy violin plots ‚Äî nice_violin","title":"Easy violin plots ‚Äî nice_violin","text":"Make nice violin plots easily 95% (possibly bootstrapped) confidence intervals.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_violin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Easy violin plots ‚Äî nice_violin","text":"","code":"nice_violin(   data,   group,   response,   boot = FALSE,   bootstraps = 2000,   colours,   xlabels = NULL,   ytitle = response,   xtitle = NULL,   has.ylabels = TRUE,   has.xlabels = TRUE,   comp1 = 1,   comp2 = 2,   signif_annotation = NULL,   signif_yposition = NULL,   signif_xmin = NULL,   signif_xmax = NULL,   ymin,   ymax,   yby = 1,   CIcap.width = 0.1,   obs = FALSE,   alpha = 1,   border.colour = \"black\",   border.size = 2,   has.d = FALSE,   d.x = mean(c(comp1, comp2)) * 1.1,   d.y = mean(data[[response]]) * 1.3 )"},{"path":"https://rempsyc.remi-theriault.com/reference/nice_violin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Easy violin plots ‚Äî nice_violin","text":"data data frame. group group plot variable. response dependent variable plotted. boot Logical, whether use bootstrapping confidence interval . bootstraps many bootstraps use. colours Desired colours plot, desired. xlabels individual group labels x-axis. ytitle optional y-axis label, desired. xtitle optional x-axis label, desired. .ylabels Logical, whether x-axis labels . .xlabels Logical, whether y-axis labels . comp1 first unit pairwise comparison, goal compare two groups. Automatically displays *, **, *** depending significance difference. Can take either numeric value (based group number) name group directly. Must provided along argument comp2. comp2 second unit pairwise comparison, goal compare two groups. Automatically displays \"\", \"\", \"\" depending significance difference. Can take either numeric value (based group number) name group directly. Must provided along argument comp1. signif_annotation Manually provide required annotations/numbers stars (character strings). Useful automatic pairwise comparison annotation work expected, yet one wants one pairwise comparison. Must provided along arguments signif_yposition, signif_xmin, signif_xmax. signif_yposition Manually provide vertical position annotations/stars, based y-scale. signif_xmin Manually provide first part horizontal position annotations/stars (start left-sided bracket), based x-scale. signif_xmax Manually provide second part horizontal position annotations/stars (end right-sided bracket), based x-scale. ymin minimum score y-axis scale. ymax maximum score y-axis scale. yby much increase \"tick\" y-axis scale. CIcap.width width confidence interval cap. obs Logical, whether plot individual observations . alpha transparency plot. border.colour colour violins border. border.size size violins border. .d Whether display d-value. d.x x-axis coordinates d-value. d.y y-axis coordinates d-value.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_violin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Easy violin plots ‚Äî nice_violin","text":"violin plot class ggplot, group.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/nice_violin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Easy violin plots ‚Äî nice_violin","text":"Using boot = TRUE uses bootstrapping (confidence intervals ) BCa method, using rcompanion_groupwiseMean function. easystats equivalent, see: see::geom_violindot().","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/nice_violin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Easy violin plots ‚Äî nice_violin","text":"","code":"# Make the basic plot nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\" )  # \\donttest{ .old_wd <- setwd(tempdir()) # Save a high-resolution image file to specified directory ggplot2::ggsave(\"niceviolinplothere.pdf\", width = 7,   height = 7, unit = \"in\", dpi = 300 ) # change for your own desired path setwd(.old_wd) # Change x- and y- axes labels nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   ytitle = \"Length of Tooth\",   xtitle = \"Vitamin C Dosage\" )   # See difference between two groups nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   comp1 = \"0.5\",   comp2 = \"2\" )   nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   comp1 = 2,   comp2 = 3 )   # Compare all three groups nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   signif_annotation = c(\"*\", \"**\", \"***\"),   # manually enter the number of stars   signif_yposition = c(30, 35, 40),   # What height (y) should the stars appear   signif_xmin = c(1, 2, 1),   # Where should the left-sided brackets start (x)   signif_xmax = c(2, 3, 3) )  # Where should the right-sided brackets end (x)  # Set the colours manually nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   colours = c(\"darkseagreen\", \"cadetblue\", \"darkslateblue\") )   # Changing the names of the x-axis labels nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   xlabels = c(\"Low\", \"Medium\", \"High\") )   # Removing the x-axis or y-axis titles nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   ytitle = NULL,   xtitle = NULL )   # Removing the x-axis or y-axis labels (for whatever purpose) nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   has.ylabels = FALSE,   has.xlabels = FALSE )   # Set y-scale manually nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   ymin = 5,   ymax = 35,   yby = 5 ) #> Warning: Removed 1 rows containing non-finite values (`stat_ydensity()`).   # Plotting individual observations nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   obs = TRUE ) #> Bin width defaults to 1/30 of the range of the data. Pick better value with #> `binwidth`.   # Micro-customizations nice_violin(   data = ToothGrowth,   group = \"dose\",   response = \"len\",   CIcap.width = 0,   alpha = .70,   border.size = 1,   border.colour = \"white\",   comp1 = 1,   comp2 = 2,   has.d = TRUE )  # }"},{"path":"https://rempsyc.remi-theriault.com/reference/overlap_circle.html","id":null,"dir":"Reference","previous_headings":"","what":"Interpolate the Inclusion of the Other in the Self Scale ‚Äî overlap_circle","title":"Interpolate the Inclusion of the Other in the Self Scale ‚Äî overlap_circle","text":"Interpolating Inclusion Self Scale (self-merging) easily.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/overlap_circle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interpolate the Inclusion of the Other in the Self Scale ‚Äî overlap_circle","text":"","code":"overlap_circle(response, categories = c(\"Self\", \"Other\"))"},{"path":"https://rempsyc.remi-theriault.com/reference/overlap_circle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interpolate the Inclusion of the Other in the Self Scale ‚Äî overlap_circle","text":"response variable plot. categories desired categories two overlapping circles.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/overlap_circle.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interpolate the Inclusion of the Other in the Self Scale ‚Äî overlap_circle","text":"plot class gList, displaying overlapping circles relative selected score.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/overlap_circle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interpolate the Inclusion of the Other in the Self Scale ‚Äî overlap_circle","text":"","code":"# Score of 1 (0% overlap) overlap_circle(1)   # Score of 3.5 (25% overlap) overlap_circle(3.5)   # Score of 6.84 (81.8% overlap) overlap_circle(6.84)   # Changing labels overlap_circle(3.12, categories = c(\"Humans\", \"Animals\"))   # \\donttest{ # Saving to file (PDF or PNG) mypath <- tempfile(fileext = \".pdf\") plot <- overlap_circle(3.5)  ggplot2::ggsave(plot, file = mypath, width = 7,   height = 7, unit = 'in', dpi = 300) # Change for your own desired path # }"},{"path":"https://rempsyc.remi-theriault.com/reference/plot_outliers.html","id":null,"dir":"Reference","previous_headings":"","what":"Visually check outliers (dot plot) ‚Äî plot_outliers","title":"Visually check outliers (dot plot) ‚Äî plot_outliers","text":"Easily visually check outliers dot plot accompanying reference lines +/- 3 MAD SD. providing group, data group-mean centered standardized (based MAD SD); group provided, data simply standardized.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/plot_outliers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visually check outliers (dot plot) ‚Äî plot_outliers","text":"","code":"plot_outliers(   data,   group = NULL,   response,   method = \"mad\",   criteria = 3,   colours,   xlabels = NULL,   ytitle = NULL,   xtitle = NULL,   has.ylabels = TRUE,   has.xlabels = TRUE,   ymin,   ymax,   yby = 1,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/plot_outliers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visually check outliers (dot plot) ‚Äî plot_outliers","text":"data data frame. group group plot variable. response dependent variable plotted. method Method identify outliers, either (e.g., 3) median absolute deviations (\"mad\", default) standard deviations (\"sd\"). criteria many MADs (standard deviations) use threshold (default 3). colours Desired colours plot, desired. xlabels individual group labels x-axis. ytitle optional y-axis label, desired. xtitle optional x-axis label, desired. .ylabels Logical, whether x-axis labels . .xlabels Logical, whether y-axis labels . ymin minimum score y-axis scale. ymax maximum score y-axis scale. yby much increase \"tick\" y-axis scale. ... arguments passed ggplot2::geom_dotplot.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/plot_outliers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visually check outliers (dot plot) ‚Äî plot_outliers","text":"dot plot class ggplot, group.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/plot_outliers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Visually check outliers (dot plot) ‚Äî plot_outliers","text":"","code":"# Make the basic plot plot_outliers(   airquality,   group = \"Month\",   response = \"Ozone\") #> Bin width defaults to 1/30 of the range of the data. Pick better value with #> `binwidth`. #> Warning: Removed 37 rows containing missing values (`stat_bindot()`).   plot_outliers(   airquality,   response = \"Ozone\",   method = \"sd\") #> Bin width defaults to 1/30 of the range of the data. Pick better value with #> `binwidth`. #> Warning: Removed 37 rows containing missing values (`stat_bindot()`)."},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":null,"dir":"Reference","previous_headings":"","what":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"Get group means bootstrapped effect sizes rcompanion::groupwiseMean function. function taken separately package dependency failing upon install current package. original documentation: \"Calculates means confidence intervals groups.\" : https://rcompanion.org/handbook/C_03.html \"routine use, recommend using bootstrapped confidence intervals, particularly BCa percentile methods (...) default, function reports confidence intervals traditional method.\"","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"","code":"rcompanion_groupwiseMean(   formula = NULL,   data = NULL,   var = NULL,   group = NULL,   trim = 0,   na.rm = FALSE,   conf = 0.95,   R = 5000,   boot = FALSE,   traditional = TRUE,   normal = FALSE,   basic = FALSE,   percentile = FALSE,   bca = FALSE,   digits = 3,   ... )"},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"formula formula indicating measurement variable grouping variables. e.g. y ~ x1 + x2. data data frame use. var measurement variable use. name double quotes. group grouping variable use. name double quotes. Multiple names listed vector. (See example.) trim proportion observations trimmed end values mean calculated. (mean()) na.rm TRUE, NA values removed calculations. (mean()) conf confidence interval use. R number bootstrap replicates use bootstrapped statistics. boot TRUE, includes mean bootstrapped means. can used estimate mean group. traditional TRUE, includes traditional confidence intervals group means, using t-distribution. trim 0, traditional confidence interval produce NA. Likewise, NA values removed, traditional confidence interval produce NA. normal TRUE, includes normal confidence intervals group means bootstrap. See {boot::boot.ci}. basic TRUE, includes basic confidence intervals group means bootstrap. See {boot::boot.ci}. percentile TRUE, includes percentile confidence intervals group means bootstrap. See {boot::boot.ci}. bca TRUE, includes BCa confidence intervals group means bootstrap. See {boot::boot.ci}. digits number significant figures use output. ... arguments passed boot function.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"data frame requested statistics group.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"input include either formula data; data, var, group. (See examples).","code":"Results for ungrouped (one-sample) data can be obtained by either       setting the right side of the formula to 1, e.g.  y ~ 1, or by       setting \\code{group=NULL} when using \\code{var}."},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"parsing formula simplistic. first variable left side used measurement variable.  variables right side used grouping variables.","code":"In general, it is advisable to handle \\code{NA} values before       using this function.       With some options, the function may not handle missing values well,       or in the manner desired by the user.       In particular, if \\code{bca=TRUE} and there are \\code{NA} values,       the function may fail.         For a traditional method to calculate confidence intervals       on trimmed means,       see Rand Wilcox, Introduction to Robust Estimation and       Hypothesis Testing."},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"http://rcompanion.org/handbook/C_03.html","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"Salvatore Mangiafico, mangiafico@njaes.rutgers.edu","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/rcompanion_groupwiseMean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get group means and CIs (rcompanion::groupwiseMean) ‚Äî rcompanion_groupwiseMean","text":"","code":"# \\donttest{ ### Example with formula notation data(mtcars) rcompanion_groupwiseMean(mpg ~ factor(cyl),   data         = mtcars,   traditional  = FALSE,   percentile   = TRUE ) #>   cyl  n Mean Conf.level Percentile.lower Percentile.upper #> 1   4 11 26.7       0.95             24.1             29.1 #> 2   6  7 19.7       0.95             18.7             20.7 #> 3   8 14 15.1       0.95             13.7             16.4  # Example with variable notation data(mtcars) rcompanion_groupwiseMean(   data = mtcars,   var = \"mpg\",   group = c(\"cyl\", \"am\"),   traditional = FALSE,   percentile = TRUE ) #>   cyl am  n Mean Conf.level Percentile.lower Percentile.upper #> 1   4  0  3 22.9       0.95             21.5             24.4 #> 2   4  1  8 28.1       0.95             25.0             30.9 #> 3   6  0  4 19.1       0.95             18.0             20.6 #> 4   6  1  3 20.6       0.95             19.7             21.0 #> 5   8  0 12 15.0       0.95             13.5             16.5 #> 6   8  1  2 15.4       0.95             15.0             15.8 # }"},{"path":"https://rempsyc.remi-theriault.com/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages ‚Äî reexports","title":"Objects exported from other packages ‚Äî reexports","text":"objects imported packages. Follow links see documentation. flextable save_as_docx, save_as_html, save_as_image, save_as_pptx","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/rempsyc-package.html","id":null,"dir":"Reference","previous_headings":"","what":"rempsyc: Convenience Functions for Psychology ‚Äî rempsyc-package","title":"rempsyc: Convenience Functions for Psychology ‚Äî rempsyc-package","text":"Make workflow faster easier. Easily customizable plots (via 'ggplot2'), nice APA tables (following style *American Psychological Association*) exportable Word (via 'flextable'), easily run statistical tests check assumptions, automatize various tasks.","code":""},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/rempsyc-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"rempsyc: Convenience Functions for Psychology ‚Äî rempsyc-package","text":"Maintainer: R√©mi Th√©riault remi.theriault@mail.mcgill.ca (ORCID)","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/scale_mad.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize based on the absolute median deviation ‚Äî scale_mad","title":"Standardize based on the absolute median deviation ‚Äî scale_mad","text":"Scale center (\"standardize\") data based median absolute deviation (MAD).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/scale_mad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize based on the absolute median deviation ‚Äî scale_mad","text":"","code":"scale_mad(x)"},{"path":"https://rempsyc.remi-theriault.com/reference/scale_mad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize based on the absolute median deviation ‚Äî scale_mad","text":"x vector scaled.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/scale_mad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize based on the absolute median deviation ‚Äî scale_mad","text":"numeric vector standardized data.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/scale_mad.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize based on the absolute median deviation ‚Äî scale_mad","text":"function subtracts median observation, divides outcome MAD. analoguous regular standardization subtracts mean observaion, divides outcome standard deviation. easystats equivalent, use: datawizard::standardize(x, robust = TRUE).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/scale_mad.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Standardize based on the absolute median deviation ‚Äî scale_mad","text":"Leys, C., Ley, C., Klein, O., Bernard, P., & Licata, L. (2013). Detecting outliers: use standard deviation around mean, use absolute deviation around median. Journal Experimental Social Psychology, 49(4), 764‚Äì766. https://doi.org/10.1016/j.jesp.2013.03.013","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/scale_mad.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardize based on the absolute median deviation ‚Äî scale_mad","text":"","code":"scale_mad(mtcars$mpg) #>  [1]  0.33262558  0.33262558  0.66525116  0.40654238 -0.09239599 -0.20327119 #>  [7] -0.90548075  0.96091834  0.66525116  0.00000000 -0.25870878 -0.51741757 #> [13] -0.35110478 -0.73916796 -1.62616950 -1.62616950 -0.83156395  2.43925425 #> [19]  2.06967028  2.71644224  0.42502157 -0.68373036 -0.73916796 -1.09027273 #> [25]  0.00000000  1.49681511  1.25658552  2.06967028 -0.62829276  0.09239599 #> [31] -0.77612635  0.40654238"},{"path":[]},{"path":"https://rempsyc.remi-theriault.com/reference/sr2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Semi-Partial Correlation Squared (Delta R2) Deprecated ‚Äî sr2","text":"","code":"sr2(model, ...)"},{"path":"https://rempsyc.remi-theriault.com/reference/sr2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Semi-Partial Correlation Squared (Delta R2) Deprecated ‚Äî sr2","text":"model lm model. ... Arguments passed lm. can subset na.action.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/sr2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Semi-Partial Correlation Squared (Delta R2) Deprecated ‚Äî sr2","text":"data frame effect size.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/sr2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Semi-Partial Correlation Squared (Delta R2) Deprecated ‚Äî sr2","text":"Compute semi-partial correlation squared (also known delta R2), lm model.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/sr2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Semi-Partial Correlation Squared (Delta R2) Deprecated ‚Äî sr2","text":"","code":"if (FALSE) { m <- lm(mpg ~ cyl + disp + hp * drat, data = mtcars) sr2(m) }"},{"path":"https://rempsyc.remi-theriault.com/reference/winsorize_mad.html","id":null,"dir":"Reference","previous_headings":"","what":"Winsorize based on the absolute median deviation ‚Äî winsorize_mad","title":"Winsorize based on the absolute median deviation ‚Äî winsorize_mad","text":"Winsorize (bring extreme observations usually +/- 3 standard deviations) data based median absolute deviations instead standard deviations.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/winsorize_mad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Winsorize based on the absolute median deviation ‚Äî winsorize_mad","text":"","code":"winsorize_mad(x, criteria = 3)"},{"path":"https://rempsyc.remi-theriault.com/reference/winsorize_mad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Winsorize based on the absolute median deviation ‚Äî winsorize_mad","text":"x vector winsorized based MAD. criteria many MAD use threshold (similar standard deviations)","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/winsorize_mad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Winsorize based on the absolute median deviation ‚Äî winsorize_mad","text":"numeric vector winsorized data.","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/winsorize_mad.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Winsorize based on the absolute median deviation ‚Äî winsorize_mad","text":"easystats equivalent, use: datawizard::winsorize(x, method = \"zscore\", threshold = 3, robust = TRUE).","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/winsorize_mad.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Winsorize based on the absolute median deviation ‚Äî winsorize_mad","text":"Leys, C., Ley, C., Klein, O., Bernard, P., & Licata, L. (2013). Detecting outliers: use standard deviation around mean, use absolute deviation around median. Journal Experimental Social Psychology, 49(4), 764‚Äì766. https://doi.org/10.1016/j.jesp.2013.03.013","code":""},{"path":"https://rempsyc.remi-theriault.com/reference/winsorize_mad.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Winsorize based on the absolute median deviation ‚Äî winsorize_mad","text":"","code":"winsorize_mad(mtcars$qsec, criteria = 2) #>  [1] 16.46000 17.02000 18.61000 19.44000 17.02000 20.22000 15.84000 20.00000 #>  [9] 20.54177 18.30000 18.90000 17.40000 17.60000 18.00000 17.98000 17.82000 #> [17] 17.42000 19.47000 18.52000 19.90000 20.01000 16.87000 17.30000 15.41000 #> [25] 17.05000 18.90000 16.70000 16.90000 14.87823 15.50000 14.87823 18.60000"},{"path":"https://rempsyc.remi-theriault.com/TODOS.html","id":null,"dir":"","previous_headings":"","what":"Development objectives (to-do list)","title":"Development objectives (to-do list)","text":"nice_lm_contrasts: improve function add contrasts vignette! Rewrite boot package dplyr::group_by? Add optional corrections argument (Bonferroni) Add option specify robust.d robust version Cohen‚Äôs d Add option bootstrapped.CI use bootstrapped version 95% CI Add option display group means(?) Add option standardize Also add option annotate Levene test plot Use violin points, group-mean centered (standardized) Add possible alternative names p values family! Integration: add meaningful error messages using lm t.test wrong model type. Remove unwanted italic formatting headers using separate.header = TRUE. Change shapiro = T/F test = Shapiro/KS/auto(Shapiro n<=50, KS ) Fix error dv variation one groups. Add option add SEs, skewness, kurtosis Need accommodate: interactions/moderations models Also add option specify contrasts manually Add option use bootstrapping (waiting bootES CRAN version 1.2.2) Correct bug factors lm models (use data matrix easystats?) Support second moderator Add support multiple moderators (like nice_mod) Check packages see ‚Äôs typically used Triple check support missing values Finish writing function tests Suggest collaboration easystats","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-01x","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.x","title":"rempsyc 0.1.x","text":"Incoming!","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.1.3","title":"rempsyc 0.1.x","text":"nice_table format_p: Now support logical stars argument add significance stars (defaults TRUE nice_table FALSE format_p).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.1.2","title":"rempsyc 0.1.x","text":"nice_table: pointed , order align APA rules regarding tables, first column centered, left-aligned. corrected. nice_lm nice_lm_slopes: Now attempt automatically detect whether variables standardized, , sets b.label = \"B\" automatically. nice_lm, nice_lm_slopes, nice_mod nice_slopes: argument b.label becomes deprecated favour new standardize argument, defaults FALSE first two (likely desired result) TRUE last two (models probably already specified desired, want refit unless required).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.1.1","title":"rempsyc 0.1.x","text":"Now produces clearer error messages specifying columns don‚Äôt exist, across functions. sr2 function now removed.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-011","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.1","title":"rempsyc 0.1.1","text":"CRAN release: 2023-02-06 CRAN resubmission!","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.9","title":"rempsyc 0.1.1","text":"nice_assumptions: now supports list objects, print interpretation message anymore since available documentation. nice_var: now supports list objects.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.8","title":"rempsyc 0.1.1","text":"nice_violin nice_contrasts: Now correctly handle missing values. New function! nice_lm_contrasts, handle complex contrast models involving e.g., interactions variables (similar nice_contrasts).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.7","title":"rempsyc 0.1.1","text":"footnote argument renamed simply note since called APA table language. Fixed bug whereas note/footnote added extra empty invisible row end. Reduced cyclomatic complexity internally (swapped statements functions) dramatically (85 2). Default effect size changed regular Cohen‚Äôs d, robust Cohen‚Äôs d (effects) can now specified effect.type argument.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.6","title":"rempsyc 0.1.1","text":"Following easystats‚Äôs policy minimal reliance external dependencies, attempt change packages hard soft dependencies: flextable, effectsize, performance, insight, methods. left basic blocks coding: dplyr rlang. flextable, breaking change saving tables, since now need specify flextable::save_as_docx. However, change makes sense (1) used flextable one function, (2) users rely rempsyc plots don‚Äôt use tables, (3) consistent saving ggplot2 plots already, (4) also gives credit flextable package, powerhouse produces tables hood. nice_violin now provides informative error messages response group variables misspelled.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.5","title":"rempsyc 0.1.1","text":"nice_lm, nice_mod, nice_lm_slopes, nice_slopes now use ‚Äútwo.sided‚Äù alternative sr2 effect size confidence interval, facilitate interpretation accordance current norms psychology.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.4","title":"rempsyc 0.1.1","text":"Since easystats added new function calculate sr2, effectsize::r2_semipartial, rempsyc now relies function. First, advantage also providing confidence interval sr2. Second, also fixes bug using factors lm models introduced switching car::Anova manual calculation via formula interface. Accordingly, rempsyc::sr2 becomes deprecated removed completely next major version, please use effectsize::r2_semipartial. nice_mod nice_lm_slopes now use nice_lm internally reduce code redundancy shorten code base (nice_slopes uses nice_lm_slopes internally). align package dependencies, rempsyc now requires R >= 3.6 nice_reverse loses warning parameter, warning seems unnecessary (annoying ), given relevant information available documentation.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1-6","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.3","title":"rempsyc 0.1.1","text":"nice_table now keeps first occurrence repeated (duplicated) dependent variables, merges (centers). works column called ‚ÄúDependent Variables‚Äù. columns named ‚ÄúPredictor‚Äù ‚ÄúTerm‚Äù, now also converts colons ‚Äú:‚Äù multiplication symbol, ‚Äú√ó‚Äù. outliers_plot changes name plot_outliers, consistent verb naming approach.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1-7","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.2","title":"rempsyc 0.1.1","text":"nice_varplot nice_var: Now ignores missing values calculating variance.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-1-8","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0.1","title":"rempsyc 0.1.1","text":"New function visualize outliers: outliers_plot, generates violin scatter plot (dot plot) adds lines +/- 3 MAD (SD, based selected method). Importantly, supports plotting group. nice_violin: point time, supported single group (group), feature lost point. now back.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-010","dir":"Changelog","previous_headings":"","what":"rempsyc 0.1.0","title":"rempsyc 0.1.0","text":"CRAN release: 2022-11-01 CRAN resubmission!","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.9","title":"rempsyc 0.1.0","text":"nice_contrasts: corrects bug whereas effect sizes appeared wrong order.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.8","title":"rempsyc 0.1.0","text":"nice_violin gets love receiving first citation (Jensen & Westergaard, 2022; https://doi.org/10.1111/lang.12525; yeah!!). now defaults using bootstrapping per default, now needs requested explicitly. bootstrapping method (BCa) now specified documentation, also clarified bootstrapping applies confidence interval (e.g., mean). Underlying code also simplified. Finally, bug fixed whereas function used bootstrapping even boot set FALSE.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.7","title":"rempsyc 0.1.0","text":"move ggplot2 hard (imported) dependency soft (suggested) one, since many people seem using nice_table plotting features. given recent isoband CRAN dependency events.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.6","title":"rempsyc 0.1.0","text":"get rid car_Anova lmsupport_modeleffectsizes now compute sr2 ! help friends insight performance.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.5","title":"rempsyc 0.1.0","text":"rempsyc gets lighter, get rid rather large car package dependency (incorporating single function using, Anova), move packages (boot, lmtest, ggrepel, ggsignif, qqplotr) required suggested packages.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.4","title":"rempsyc 0.1.0","text":"nice_table: automatic formatting (p-values, confidence intervals, etc.) now supports two levels headers (separate.header argument).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0-6","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.3","title":"rempsyc 0.1.0","text":"Now openxlsx2 CRAN, cormatrix_excel2 replaces cormatrix_excel (rempsyc package rely external GitHub dependency anymore, yeah!).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0-7","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.2","title":"rempsyc 0.1.0","text":"nice_table: Multilevel headings, separate.header argument, now supports automatic formatting (p-values, confidence intervals, etc.).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-1-0-8","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9.1","title":"rempsyc 0.1.0","text":"fixed sr2 incorrectly showing leading zero. new argument: col.format.ci, format confidence intervals (accepts lists lower upper thresholds) find_mad nice_assumptions: fixed printing method","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-009","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.9","title":"rempsyc 0.0.9","text":"CRAN release: 2022-09-26 CRAN resubmission!","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-9","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.8.2","title":"rempsyc 0.0.9","text":"nice_var: now returns dataframe instead tibble Updated docs: functions now value/return fields describing function‚Äôs output. cormatrix_excel cormatrix_excel2: now require explicit file name, per CRAN policies.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-9-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.8.1","title":"rempsyc 0.0.9","text":"New function: extract_duplicates, extract duplicates (including first one) closer inspection New function: best_duplicate, keep best duplicate based number missing values nice_na: all_na output column now also counts non-numeric variables","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-008","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.8","title":"rempsyc 0.0.8","text":"CRAN resubmission!","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-007","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.7","title":"rempsyc 0.0.7","text":"First CRAN submission! requires bumping package version 2 decimals .","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-7","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.6.6","title":"rempsyc 0.0.7","text":"Preparing CRAN submission.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-7-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.6.5","title":"rempsyc 0.0.7","text":"nice_normality: breaks.auto argument now uses na.rm = TRUE support missing values","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-7-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.6.4","title":"rempsyc 0.0.7","text":"nice_normality: breaks.auto argument added allow control density plot aspect.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-7-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.6.3","title":"rempsyc 0.0.7","text":"nice_density: Switch back using Sturges method per default. nice_table: Internal change stay compatible new flextable version","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-7-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.6.2","title":"rempsyc 0.0.7","text":"nice_density: Now uses na.rm = TRUE internally support data missing values.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-7-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.6.1","title":"rempsyc 0.0.7","text":"find_mad: New argument mad.scores return robust zscore (MAD) scores instead raw scores (now default TRUE).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-006","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.6","title":"rempsyc 0.0.6","text":"nice_density: Now uses Sturges method define optimal number bins automatically. Also adds two new arguments: breaks.auto = TRUE, one want use Sturges method, bins = 30, define bins manually, needed.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.9","title":"rempsyc 0.0.6","text":"cormatrix_excel2: Added third (sixth) colour one star significances (* = p < .05), add argument printing correlation matrix console (), print.mat.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.8","title":"rempsyc 0.0.6","text":"nice_table: Added chi2 automatic formatting (+ chi2.df formatting)","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.7","title":"rempsyc 0.0.6","text":"nice_na: integrated feature request include number rows NAs.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.6","title":"rempsyc 0.0.6","text":"New function: cormatrix_excel2: new version cormatrix_excel relying openxlsx2 package allows incorporating significance stars along correlation matrix, well second sheet containing matrix p-values. Experimental openxlsx2 reaches CRAN.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.5","title":"rempsyc 0.0.6","text":"Fixed nice_randomize outputting wrong output format within-subject designs moving plyr dplyr (+ updated runsheet tutorial). nice_table: changed back layout = \"fixed\" layout = \"autofit\" now flextable fixed unnecessary line breaks confidence intervals","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.4","title":"rempsyc 0.0.6","text":"cormatrix_excel: corrected values small, medium, large correlations (0.0-0.3: small; 0.3-0.6: medium; 0.6-1.0: large 0.0-0.2: small; 0.2-0.4: medium; 0.4-1.0: large).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6-6","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.3","title":"rempsyc 0.0.6","text":"Corrected spelling code devtools::spell_check() Restyled code according tidyverse guidelines styler::style_pkg() nice_table: greatly improved APA title feature thanks @Buedenbender (shout-package datscience function flex_table1 improvement based!)","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6-7","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.2","title":"rempsyc 0.0.6","text":"nice_table: added new argument, separate.header, logical (simplified) form flextable::separate_header argument.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-6-8","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5.1","title":"rempsyc 0.0.6","text":"New package site, hooray! Changed default method base cor function ‚Äúna..complete‚Äù liberal one match SPSS: ‚Äúpairwise.complete.obs‚Äù. Added use argument specify one use case user wants different option. Automatized integration report package don‚Äôt specify e.g.¬†report = \"lm\" argument manually. Added optional arguments table title footnote. Changed sapply lapply since sapply recommended using vapply list outputs complicated. Shortened line codes < 80 characters. Replaced 1:length(‚Ä¶) 1:nrow(‚Ä¶) seq_along(‚Ä¶).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-005","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.5","title":"rempsyc 0.0.5","text":"nice_na: added scales argument specify specific scales","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.9","title":"rempsyc 0.0.5","text":"New function: nice_NA; nicely reports NA values according existing guidelines. function reports absolute percentage values specified column lists.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.8","title":"rempsyc 0.0.5","text":"nice_density nice_normality: added possibility provide group argument plot data.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.7","title":"rempsyc 0.0.5","text":"nice_violin: made default contour lines thicker, also added argument border.size allow customization.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.6","title":"rempsyc 0.0.5","text":"nice_violin: Corrected bug whereas Cohen‚Äôs d wasn‚Äôt added plot manual annotation (opposed automatic) comparisons made. Also, default test used geom_signif::geom_signif() Wilcox test. changed t-test avoid confusion results mismatch. Finally, contour lines made thicker since high resolution appeared thin. New function: format_d format d values e.g., 0.30 instead 0.3 e.g., violin plots.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.5","title":"rempsyc 0.0.5","text":"nice_violin: Added ability add Cohen‚Äôs d plot","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.4","title":"rempsyc 0.0.5","text":"find_mad: improved reporting ID row number","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5-6","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.3","title":"rempsyc 0.0.5","text":"nice_table: changed default table width ()","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5-7","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.2","title":"rempsyc 0.0.5","text":"nice_table: changed default table width","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-5-8","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4.1","title":"rempsyc 0.0.5","text":"find_mad: corrected bug whereas dataframe outliers certain situations generated error","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-004","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.4","title":"rempsyc 0.0.4","text":"nice_density nice_normality: added histogram option add histogram density plot.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.9","title":"rempsyc 0.0.4","text":"Created internal ggplot2 APA ‚Äútheme‚Äù avoid code redundancy across plots","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.8","title":"rempsyc 0.0.4","text":"nice_table: greatly improved underlying code: clarity (dplyr) less repetition (added internal functions)","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.7","title":"rempsyc 0.0.4","text":"nice_violin: reverted theme original default (alpha = 1 black border) modified theme time ago (alpha = .70, white border). Users wishing keep original style can simply specify options script.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.6","title":"rempsyc 0.0.4","text":"New function: nice_contrasts planned contrasts (multiple group pairwise comparisons)","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.5","title":"rempsyc 0.0.4","text":"nice_t_test: Fixed mu value one-sample t-test","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.4","title":"rempsyc 0.0.4","text":"Added ggplot2::waiver reexports Added table content readme","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4-6","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.3","title":"rempsyc 0.0.4","text":"find_mad: Now prints individual variables outliers. However, now lists variables checked top avoid possible confusion. Also reformatted arguments vertically instead horizontally within functions clarity (doesn‚Äôt affect users documentation proper).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4-7","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.2","title":"rempsyc 0.0.4","text":"nice_t_test: Added support one-sample t-test.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-4-8","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3.1","title":"rempsyc 0.0.4","text":"new functions median absolute deviation (MAD): find_mad find outliers based MAD, scale_mad scale (standardize) data based MAD, winsorize_mad winsorize (bring outliers +/3 SD) based MAD.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-003","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.3","title":"rempsyc 0.0.3","text":"nice_table: brought correction automatic 95% CI numbers rounded 0, zeros still show (e.g., 0.20 instead 0.2).","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.9","title":"rempsyc 0.0.3","text":"nice_normality: improved implementation title argument nice_table: added N italic header","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.8","title":"rempsyc 0.0.3","text":"integration broom package: moved columns Method Alternative beginning consistency treatment report package. Fixed appropriate decimals display degrees freedom actual decimals (e.g., Welch t-test). nice_t_test: Added optional Bonferroni correction argument (corrections possible). corrections implemented future.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.7","title":"rempsyc 0.0.3","text":"nice_t_test: changed package effsize effectsize effect size Cohen‚Äôs d value paired samples wasn‚Äôt consistent packages.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.6","title":"rempsyc 0.0.3","text":"Integration report package: combined CI_low CI_high method t.test (just like method lm) Added optional short argument get concise table output report package integration","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.5","title":"rempsyc 0.0.3","text":"Fixed slight model number mix-nice_slopes.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.4","title":"rempsyc 0.0.3","text":"Added support paired t-tests (adaptation Cohen‚Äôs d necessary) updated documentation give multiple examples t-test customization.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3-6","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.3","title":"rempsyc 0.0.3","text":"Added warning nice_t_test informing users Welch t-test used per default (base R t.test‚Äôs default) change . Also added option turn warning.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3-7","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.2","title":"rempsyc 0.0.3","text":"new function: nice_lm format existing lm model object proper format nice_table, including sr2 new function: nice_lm_slopes format simple slopes existing lm model object proper format nice_table, including sr2 Added model number one model. Also added optional mod.id = TRUE argument, display model number, one model. Also reordered default order rows second moderator present makes sense group models completely together different levels second moderator. combining row names within list object rather combined dataframe, also don‚Äôt worry changing names, etc. anymore. Thus now cleaner missing variable names.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-3-8","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2.1","title":"rempsyc 0.0.3","text":"nice_mod nice_slopes: Added argument b.label rename b, e.g., capital B using standardized data converted Greek beta symbol automatically nice_table function.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-002","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.2","title":"rempsyc 0.0.2","text":"nice_mod nice_slopes: Corrected bug whereas column names periods cut variable names dots automatic correction interaction term row names contain periods well.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.9","title":"rempsyc 0.0.2","text":"Added NEWS.md file track changes package. Improved report package integration nice_table","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2-1","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.8","title":"rempsyc 0.0.2","text":"Moved packages suggest rlang::check_installed. Make package lighter. Added compatibility nice_table report package","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2-2","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.7","title":"rempsyc 0.0.2","text":"nice_table: changed argument name dataframe data consistency.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2-3","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.6","title":"rempsyc 0.0.2","text":"Added compatibility nice_table broom package nice_randomize: sorted ‚Äòwithin‚Äô group id (always ) Realized trying tidy selection quote arguments creates problems vectorization. back quoted arguments nice_scatter nice_varplot. Integrated format_p internally functions nice_scatter nice_varplot: now allow directly provide group argument without convert factor manually. Also allow remove line just keep points. Added jitter varplot function","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2-4","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.5","title":"rempsyc 0.0.2","text":"Added criteria argument nice_var specify desired threshold. Also moved data argument first pipe compatibility. Significant overhaul functions, changes argument names order.","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2-5","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.4","title":"rempsyc 0.0.2","text":"new function: nice_normality","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2-6","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.3","title":"rempsyc 0.0.2","text":"added new function: format_values Added new function: cormatrix_excel Fixed geom_smooth() using formula 'y ~ x'\" warning nice_scatter() error removed row names nice_t_test added width argument nice_table","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2-7","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.2","title":"rempsyc 0.0.2","text":"removed dependency plyr","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-0-0-2-8","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1.1","title":"rempsyc 0.0.2","text":"added new function: nice_reverse()","code":""},{"path":"https://rempsyc.remi-theriault.com/news/index.html","id":"rempsyc-001","dir":"Changelog","previous_headings":"","what":"rempsyc 0.0.1","title":"rempsyc 0.0.1","text":"integrated rcompanion::groupwiseMean internally documentation removed lmSupport_modelEffectSizes exports use internal function removed crayon package dependency","code":""}]
