{"id":16178347,"url":"https://github.com/sfcheung/stdmod","last_synced_at":"2026-01-16T00:39:46.448Z","repository":{"id":40350002,"uuid":"263007445","full_name":"sfcheung/stdmod","owner":"sfcheung","description":"Functions related to standardized moderation effect","archived":false,"fork":false,"pushed_at":"2024-09-22T12:18:17.000Z","size":27358,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T00:47:42.919Z","etag":null,"topics":["bootstrapping","confidence-interval","effect-sizes","moderation","r","r-package","regression","standardization","standardized-moderation"],"latest_commit_sha":null,"homepage":"https://sfcheung.github.io/stdmod/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sfcheung.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-11T10:12:35.000Z","updated_at":"2024-11-03T06:54:47.000Z","dependencies_parsed_at":"2024-03-14T12:28:41.886Z","dependency_job_id":"af229853-1846-4156-a524-711f04c0888f","html_url":"https://github.com/sfcheung/stdmod","commit_stats":{"total_commits":322,"total_committers":2,"mean_commits":161.0,"dds":"0.018633540372670843","last_synced_commit":"9cbb2073241b8834bc325c596b5941a8efae7d99"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfcheung%2Fstdmod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfcheung%2Fstdmod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfcheung%2Fstdmod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfcheung%2Fstdmod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sfcheung","download_url":"https://codeload.github.com/sfcheung/stdmod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244336112,"owners_count":20436770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrapping","confidence-interval","effect-sizes","moderation","r","r-package","regression","standardization","standardized-moderation"],"created_at":"2024-10-10T05:13:33.953Z","updated_at":"2026-01-16T00:39:46.434Z","avatar_url":"https://github.com/sfcheung.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- badges: start --\u003e\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![CRAN status](https://www.r-pkg.org/badges/version/stdmod?color=blue)](https://CRAN.R-project.org/package=stdmod)\n[![CRAN: Release Date](https://www.r-pkg.org/badges/last-release/stdmod?color=blue)](https://cran.r-project.org/package=stdmod)\n[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/grand-total/stdmod?color=blue)](https://r-pkg.org/pkg/stdmod)\n[![Code size](https://img.shields.io/github/languages/code-size/sfcheung/stdmod.svg)](https://github.com/sfcheung/stdmod)\n[![Last Commit at Master](https://img.shields.io/github/last-commit/sfcheung/stdmod.svg)](https://github.com/sfcheung/stdmod/commits/master)\n[![R-CMD-check](https://github.com/sfcheung/stdmod/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/sfcheung/stdmod/actions/workflows/R-CMD-check.yaml)\n[![DOI](https://img.shields.io/badge/doi-10.1037/hea0001188-blue.svg)](https://doi.org/10.1037/hea0001188)\n\u003c!-- badges: end --\u003e\n\n\n# stdmod: Standardized Moderation \u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"150\" /\u003e\n\n(Version 0.2.12, updated on 2026-01-07, [release history](https://sfcheung.github.io/stdmod/news/index.html))\n\n(Important changes since 0.2.0.0: Bootstrap confidence intervals and\nvariance-covariance matrix of estimates are the defaults of `confint()`\nand `vcov()` for the output of `std_selected_boot()`.)\n\nThis package includes functions for computing a standardized\nmoderation effect and forming its confidence interval by\nnonparametric bootstrapping correctly. It was described briefly\nin the following publication ([OSF project page](https://osf.io/ac8de/)).\nIt supports moderated regression conducted by `stats::lm()` and path\nanalysis with product term conducted by `lavaan::lavaan()`.\n\n- Cheung, S. F., Cheung, S.-H., Lau, E. Y. Y., Hui, C. H., \u0026 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.\n\nMore information on this package:\n\nhttps://sfcheung.github.io/stdmod/\n\n## Quick Links:\n\n- [stdmod](https://sfcheung.github.io/stdmod/articles/stdmod.html): A quick start on how to use\n  `std_selected()` and `std_selected_boot()`, the\n  two main functions, to standardize selected variables\n  in a regression model and refit the model.\n\n- [moderation](https://sfcheung.github.io/stdmod/articles/moderation.html): How\n  to use `std_selected()` and `std_selected_boot()` to compute standardized\n  moderation effect and form its nonparametric bootstrap confidence interval.\n\n- [std_selected](https://sfcheung.github.io/stdmod/articles/std_selected.html): How to use\n  `std_selected()` to mean center or standardize selected\n  variables in any regression models, and use\n  `std_selected_boot()` to form nonparametric\n  bootstrap confidence intervals\n  for standardized regression coefficients (*betas* in\n  psychology literature).\n\n- [plotmod](https://sfcheung.github.io/stdmod/articles/plotmod.html): How to generate a typical plot of\n  moderation effect using `plotmod()`.\n\n- [cond_effect](https://sfcheung.github.io/stdmod/articles/cond_effect.html): How to compute conditional\n  effects of the predictor for selected\n  levels of the moderator, and form nonparametric bootstrap\n  confidence intervals these effects.\n\n# Installation\n\nThe stable CRAN version can be installed by `install.packages()`:\n\n```\ninstall.packages(\"stdmod\")\n```\n\nThe latest version of this package at GitHub can be\ninstalled by `remotes::install_github()`:\n\n```\nremotes::install_github(\"sfcheung/stdmod\")\n```\n\n# Implementation\n\nThe main function, `std_selected()`, accepts an `lm()`\noutput, standardizes variables by users, and update the\nresults. If interaction terms are present, they will be\nformed after the standardization. If bootstrap\nconfidence intervals are requested using\n`std_selected_boot()`, both standardization\nand regression will be repeated in each bootstrap sample,\nensuring that the sampling variability of the standardizers\n(e.g., the standard deviations of the selected variables),\nare also taken into account.\n\n# Issues\n\nIf you have any suggestions and found any bugs, please feel\nfeel to open a GitHub issue. Thanks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfcheung%2Fstdmod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfcheung%2Fstdmod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfcheung%2Fstdmod/lists"}