stdmod

Functions related to standardized moderation effect

https://github.com/sfcheung/stdmod

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary

Keywords

bootstrapping confidence-interval effect-sizes moderation r r-package regression standardization standardized-moderation
Last synced: 6 months ago · JSON representation

Repository

Functions related to standardized moderation effect

Basic Info
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 11
Topics
bootstrapping confidence-interval effect-sizes moderation r r-package regression standardization standardized-moderation
Created almost 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

Lifecycle: stable Project Status: Active - The project has reached a stable, usable state and is being actively developed. CRAN status CRAN: Release Date CRAN RStudio mirror downloads Code size Last Commit at Master R-CMD-check DOI <!-- badges: end -->

stdmod: Standardized Moderation

(Version 0.2.11, updated on 2024-09-22, release history)

(Important changes since 0.2.0.0: Bootstrap confidence intervals and variance-covariance matrix of estimates are the defaults of confint() and vcov() for the output of std_selected_boot().)

This package includes functions for computing a standardized moderation effect and forming its confidence interval by nonparametric bootstrapping correctly. It was described briefly in the following publication (OSF project page). It supports moderated regression conducted by stats::lm() and path analysis with product term conducted by lavaan::lavaan().

  • Cheung, S. F., Cheung, S.-H., Lau, E. Y. Y., Hui, C. H., & Vong, W. N. (2022) Improving an old way to measure moderation effect in standardized units. Health Psychology, 41(7), 502-505. https://doi.org/10.1037/hea0001188.

More information on this package:

https://sfcheung.github.io/stdmod/

Quick Links:

  • stdmod: A quick start on how to use std_selected() and std_selected_boot(), the two main functions, to standardize selected variables in a regression model and refit the model.

  • moderation: How to use std_selected() and std_selected_boot() to compute standardized moderation effect and form its nonparametric bootstrap confidence interval.

  • std_selected: How to use std_selected() to mean center or standardize selected variables in any regression models, and use std_selected_boot() to form nonparametric bootstrap confidence intervals for standardized regression coefficients (betas in psychology literature).

  • plotmod: How to generate a typical plot of moderation effect using plotmod().

  • cond_effect: How to compute conditional effects of the predictor for selected levels of the moderator, and form nonparametric bootstrap confidence intervals these effects.

Installation

The stable CRAN version can be installed by install.packages():

install.packages("stdmod")

The latest version of this package at GitHub can be installed by remotes::install_github():

remotes::install_github("sfcheung/stdmod")

Implementation

The main function, std_selected(), accepts an lm() output, standardizes variables by users, and update the results. If interaction terms are present, they will be formed after the standardization. If bootstrap confidence intervals are requested using std_selected_boot(), both standardization and regression will be repeated in each bootstrap sample, ensuring that the sampling variability of the standardizers (e.g., the standard deviations of the selected variables), are also taken into account.

Issues

If you have any suggestions and found any bugs, please feel feel to open a GitHub issue. Thanks.

Owner

  • Name: Shu Fai Cheung
  • Login: sfcheung
  • Kind: user
  • Location: Macao
  • Company: University of Macau

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 322
  • Total Committers: 2
  • Avg Commits per committer: 161.0
  • Development Distribution Score (DDS): 0.019
Top Committers
Name Email Commits
Shu Fai Cheung s****g@g****m 316
Ckwvong 7****g@u****m 6

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 35
  • Total pull requests: 83
  • Average time to close issues: 6 months
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.49
  • Average comments per pull request: 0.0
  • Merged pull requests: 82
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 24 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sfcheung (35)
Pull Request Authors
  • sfcheung (86)
  • Ckwvong (2)
Top Labels
Issue Labels
documentation (16) enhancement (12) top priority (5) project management (4) bug (2) low priority (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 382 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 10
  • Total maintainers: 1
cran.r-project.org: stdmod

Standardized Moderation Effect and Its Confidence Interval

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 382 Last month
Rankings
Downloads: 24.4%
Forks count: 28.8%
Dependent packages count: 29.8%
Average: 30.7%
Stargazers count: 35.2%
Dependent repos count: 35.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.0.0 depends
  • boot * imports
  • ggplot2 * imports
  • stats * imports
  • dplyr * suggests
  • knitr * suggests
  • lavaan * suggests
  • lm.beta * suggests
  • rmarkdown * suggests
  • testthat * suggests
  • visreg * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
  • r-lib/actions/setup-r-dependencies v1 composite