
(Version 0.2.11, updated on 2024-09-22,releasehistory)
(Important changes since 0.2.0.0: Bootstrap confidence intervals andvariance-covariance matrix of estimates are the defaults ofconfint() andvcov() for the output ofstd_selected_boot().)
This package includes functions for computing a standardizedmoderation effect and forming its confidence interval by nonparametricbootstrapping correctly. It was described briefly in the followingpublication (OSF project page). Itsupports moderated regression conducted bystats::lm() andpath analysis with product term conducted bylavaan::lavaan().
More information on this package:
https://sfcheung.github.io/stdmod/
stdmod:A quick start on how to usestd_selected() andstd_selected_boot(), the two main functions, to standardizeselected variables in a regression model and refit the model.
moderation:How to usestd_selected() andstd_selected_boot() to compute standardized moderationeffect and form its nonparametric bootstrap confidenceinterval.
std_selected:How to usestd_selected() to mean center or standardizeselected variables in any regression models, and usestd_selected_boot() to form nonparametric bootstrapconfidence intervals for standardized regression coefficients(betas in psychology literature).
plotmod:How to generate a typical plot of moderation effect usingplotmod().
cond_effect:How to compute conditional effects of the predictor for selected levelsof the moderator, and form nonparametric bootstrap confidence intervalsthese effects.
The stable CRAN version can be installed byinstall.packages():
install.packages("stdmod")The latest version of this package at GitHub can be installed byremotes::install_github():
remotes::install_github("sfcheung/stdmod")The main function,std_selected(), accepts anlm() output, standardizes variables by users, and updatethe results. If interaction terms are present, they will be formed afterthe standardization. If bootstrap confidence intervals are requestedusingstd_selected_boot(), both standardization andregression will be repeated in each bootstrap sample, ensuring that thesampling variability of the standardizers (e.g., the standard deviationsof the selected variables), are also taken into account.
If you have any suggestions and found any bugs, please feel feel toopen a GitHub issue. Thanks.