If you are viewing this file on CRAN, please check latest news on GitHub where the formatting is also better.
digits
parameter as the equivalent to the nsmall
parameter for all relevant functions.mediation
, interactions
, MuMIn
, and texreg
are now SUGGESTS rather than IMPORTS.PROCESS()
.Corr()
.PROCESS()
: PROCESS for mediation, moderation, and conditional process (moderated mediation) analyses! This function supports a total of 24 kinds of SPSS PROCESS models (Hayes, 2018) and also supports multilevel mediation/moderation analyses. Overall, it supports the most frequently used types of mediation, moderation, moderated moderation (3-way interaction), and moderated mediation (conditional indirect effect) analyses for (generalized) linear or linear mixed models. Regression model summary and effect estimates (simple slopes and/or indirect effects) are printed in an elegant way.lavaan_summary()
: Tidy report of lavaan model.RANDBETWEEN()
function.print_table()
and other functions using print_table()
inside: Describe()
, Freq()
, Corr()
, MANOVA()
, med_summary()
, granger_causality()
.EMMEANS()
: There is considerable disagreement on how to compute Cohen’s d. Users should not take the default output as the only right results and are completely responsible for setting the “sd.pooled”.model_summary()
: (1) Model names with NULL
; (2) Multicollinearity check results with NULL
or other problems; (3) UTF-8 encoding problem in WPS software (no such problem in Microsoft Word).granger_causality()
: Granger causality test (multivariate) based on vector autoregression (VAR) model. This function is an advanced and more general version of the function granger_test()
(bivariate).set.wd()
: Now it uses rstudioapi::getSourceEditorContext()
to extract file path (even effective when running in R console), which only requires RStudio version >= 0.99.1111 and no longer has encoding problems (see release note in 0.6.1).theme_bruce()
: Now it uses ggtext::element_markdown()
to render Markdown/HTML rich text format, which can be used in plot text (e.g., titles).EMMEANS()
: Now its results are always identical to those in SPSS (by setting model="multivariate"
in emmeans::joint_tests()
and emmeans::emmeans()
, which use the lm
or mlm
objects rather than the aov
object to perform tests). For a few cases with singular error matrix (i.e., some variables are linearly dependent), the results of simple-effect F tests will not be reported, but estimated marginal means and pairwise comparisons are not affected and so are still reported. Note that the EMMEANS
results in old versions of bruceR
(version < 0.6.0) were identical to SPSS, but version 0.6.0 deprecated the parameter repair
and no longer set model$aov=NULL
, which made the results not identical to SPSS (particularly for ANOVAs with repeated measures). In response to a user’s feedback, now 0.6.2 has improved this function and makes its results accurate again.\code{\link[package:function]{package::function()}}
.CFA()
(for lavaan-style output).HLM_ICC_rWG()
: Tidy report of HLM indices “ICC(1)” (non-independence of data), “ICC(2)” (reliability of group means), and “rWG”/“rWG(J)” (within-group agreement for single-item/multi-item measures).Run()
: Run code parsed from text.show_colors()
: Show multiple colors (or a palette) in a plot.%^%
: Paste strings together (a wrapper of paste0()
).set.wd()
: Now it converts the extracted path string from “UTF-8” to “GBK” on Windows system to support paths including Chinese characters (otherwise, the path would become messy code and cause an error). Note that this problem does not exist on Mac OS. In addition, warning messages will be printed into the console if the user’s RStudio version is lower than required (RStudio version >= 1.4.843 is required for a complete implementation of this function).Alpha()
: Now it adds a parameter varrange
(to keep the same as SUM()
, MEAN()
, …) and reports both Cronbach’s α and McDonald’s ω, with more detailed documentation.Three ways to specify the variable list (implemented in the functions such as
SUM()
,MEAN()
,Alpha()
):1.
var + items
: use the common and unique parts of variable names. (e.g.,var="RSES", items=1:10, rev=c(3, 5, 8, 9, 10)
)2.
vars
: directly define the variable list. (e.g.,vars=c("E1", "E2", "E3", "E4", "E5"), rev=c("E1", "E2")
)3.
varrange
: use the start and end positions of the variable list. (e.g.,varrange="E1:E5", rev=c("E1", "E2")
)
Corr()
(relevant to the changes in psych::corr.test()
in a forthcoming release of the psych
package).0 errors √ | 0 warnings √ | 0 notes √
model_summary()
: Tidy report of (single/multiple) regression models (into console or to a Word/HTML file; supporting most types of models; based on the texreg
package).med_summary()
: Tidy report of (simple/moderated) mediation analyses (based on the mediation
package).ccf_plot
: Cross-correlation analysis (plotting with ggplot2
).granger_test
: Granger test of predictive causality (based on the lmtest::grangertest()
function).set.wd()
, Describe()
, Corr()
, MANOVA()
, and EMMEANS()
.library(bruceR)
.pkg_install_suggested()
function).bruceR
: BRoadly Useful Convenient and Efficient R functions that BRing Users Concise and Elegant R data analyses.MANOVA()
and EMMEANS()
: ANOVA, simple-effect analyses, and multiple comparisons (based on the afex
and emmeans
packages).