betaMC
betaMC: Generates Monte Carlo confidence intervals for standardized regression coefficients for models fitted by lm().
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 13 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.7%) to scientific vocabulary
Keywords
Repository
betaMC: Generates Monte Carlo confidence intervals for standardized regression coefficients for models fitted by lm().
Basic Info
- Host: GitHub
- Owner: jeksterslab
- License: other
- Language: TeX
- Default Branch: main
- Homepage: https://jeksterslab.github.io/betaMC/
- Size: 30.3 MB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 5
Topics
Metadata Files
README.md
betaMC
Ivan Jacob Agaloos Pesigan 2025-07-22
Description
Generates Monte Carlo confidence intervals for standardized regression
coefficients (beta) and other effect sizes, including multiple
correlation, semipartial correlations, improvement in R-squared, squared
partial correlations, and differences in standardized regression
coefficients, for models fitted by lm(). betaMC combines ideas from
Monte Carlo confidence intervals for the indirect effect (Pesigan and
Cheung, 2023: http://doi.org/10.3758/s13428-023-02114-4) and the
sampling covariance matrix of regression coefficients (Dudgeon, 2017:
http://doi.org/10.1007/s11336-017-9563-z) to generate confidence
intervals effect sizes in regression.
Installation
You can install the CRAN release of betaMC with:
r
install.packages("betaMC")
You can install the development version of betaMC from
GitHub with:
r
if (!require("remotes")) install.packages("remotes")
remotes::install_github("jeksterslab/betaMC")
Example
In this example, a multiple regression model is fitted using program
quality ratings (QUALITY) as the regressand/outcome variable and
number of published articles attributed to the program faculty members
(NARTIC), percent of faculty members holding research grants
(PCTGRT), and percentage of program graduates who received support
(PCTSUPP) as regressor/predictor variables using a data set from 1982
ratings of 46 doctoral programs in psychology in the USA (National
Research Council, 1982). Confidence intervals for the standardized
regression coefficients are generated using the BetaMC() function from
the betaMC package.
r
library(betaMC)
r
df <- betaMC::nas1982
Regression
Fit the regression model using the lm() function.
r
object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = df)
Monte Carlo Sampling Distribution of Parameters
Normal-Theory Approach
r
mvn <- MC(object, type = "mvn")
Asymptotic distribution-free Approach
r
adf <- MC(object, type = "adf")
Heteroskedasticity Consistent Approach (HC3)
r
hc3 <- MC(object, type = "hc3")
Standardized Regression Slopes
Normal-Theory Approach
``` r BetaMC(mvn, alpha = 0.05)
> Call:
> BetaMC(object = mvn, alpha = 0.05)
>
> Standardized regression slopes
> type = "mvn"
> est se R 2.5% 97.5%
> NARTIC 0.4951 0.0760 20000 0.3385 0.6366
> PCTGRT 0.3915 0.0766 20000 0.2366 0.5372
> PCTSUPP 0.2632 0.0749 20000 0.1178 0.4113
```
Asymptotic distribution-free Approach
``` r BetaMC(adf, alpha = 0.05)
> Call:
> BetaMC(object = adf, alpha = 0.05)
>
> Standardized regression slopes
> type = "adf"
> est se R 2.5% 97.5%
> NARTIC 0.4951 0.0683 20000 0.3502 0.6175
> PCTGRT 0.3915 0.0719 20000 0.2403 0.5214
> PCTSUPP 0.2632 0.0767 20000 0.1061 0.4063
```
Heteroskedasticity Consistent Approach (HC3)
``` r BetaMC(hc3, alpha = 0.05)
> Call:
> BetaMC(object = hc3, alpha = 0.05)
>
> Standardized regression slopes
> type = "hc3"
> est se R 2.5% 97.5%
> NARTIC 0.4951 0.0790 20000 0.3259 0.6338
> PCTGRT 0.3915 0.0822 20000 0.2192 0.5415
> PCTSUPP 0.2632 0.0856 20000 0.0894 0.4230
```
Other Effect Sizes
The betaMC package also has functions to generate Monte Carlo
confidence intervals for other effect sizes such as RSqMC() for
multiple correlation coefficients (R-squared and adjusted R-squared),
DeltaRSqMC() for improvement in R-squared, SCorMC() for semipartial
correlation coefficients, PCorMC() for squared partial correlation
coefficients, and DiffBetaMC() for differences of standardized
regression coefficients.
Multiple Correlation Coefficients (R-squared and adjusted R-squared)
``` r RSqMC(hc3, alpha = 0.05)
> Call:
> RSqMC(object = hc3, alpha = 0.05)
>
> R-squared and adjusted R-squared
> type = "hc3"
> est se R 2.5% 97.5%
> rsq 0.8045 0.0614 20000 0.6477 0.8873
> adj 0.7906 0.0658 20000 0.6225 0.8793
```
Improvement in R-squared
``` r DeltaRSqMC(hc3, alpha = 0.05)
> Call:
> DeltaRSqMC(object = hc3, alpha = 0.05)
>
> Improvement in R-squared
> type = "hc3"
> est se R 2.5% 97.5%
> NARTIC 0.1859 0.0683 20000 0.0503 0.3177
> PCTGRT 0.1177 0.0548 20000 0.0254 0.2386
> PCTSUPP 0.0569 0.0374 20000 0.0060 0.1490
```
Semipartial Correlation Coefficients
``` r SCorMC(hc3, alpha = 0.05)
> Call:
> SCorMC(object = hc3, alpha = 0.05)
>
> Semipartial correlations
> type = "hc3"
> est se R 2.5% 97.5%
> NARTIC 0.4312 0.0861 20000 0.2242 0.5637
> PCTGRT 0.3430 0.0832 20000 0.1592 0.4885
> PCTSUPP 0.2385 0.0783 20000 0.0774 0.3860
```
Squared Partial Correlation Coefficients
``` r PCorMC(hc3, alpha = 0.05)
> Call:
> PCorMC(object = hc3, alpha = 0.05)
>
> Squared partial correlations
> type = "hc3"
> est se R 2.5% 97.5%
> NARTIC 0.4874 0.1192 20000 0.1804 0.6503
> PCTGRT 0.3757 0.1157 20000 0.1076 0.5546
> PCTSUPP 0.2254 0.1127 20000 0.0255 0.4559
```
Differences of Standardized Regression Coefficients
``` r DiffBetaMC(hc3, alpha = 0.05)
> Call:
> DiffBetaMC(object = hc3, alpha = 0.05)
>
> Differences of standardized regression slopes
> type = "hc3"
> est se R 2.5% 97.5%
> NARTIC-PCTGRT 0.1037 0.1417 20000 -0.1752 0.3756
> NARTIC-PCTSUPP 0.2319 0.1322 20000 -0.0351 0.4816
> PCTGRT-PCTSUPP 0.1282 0.1371 20000 -0.1480 0.3915
```
Documentation
See GitHub Pages for package documentation.
Citation
To cite betaMC in publications, please cite Pesigan & Cheung (2023).
References
Owner
- Name: Ivan Jacob Agaloos Pesigan
- Login: jeksterslab
- Kind: user
- Company: University of Macau
- Repositories: 25
- Profile: https://github.com/jeksterslab
Citation (CITATION.cff)
# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
cff-version: 1.2.0
message: 'To cite package "betaMC" in publications use:'
type: software
license: MIT
title: 'betaMC: Monte Carlo for Regression Effect Sizes'
version: 1.3.3
doi: 10.3758/s13428-023-02114-4
identifiers:
- type: doi
value: 10.32614/CRAN.package.betaMC
abstract: Generates Monte Carlo confidence intervals for standardized regression coefficients
(beta) and other effect sizes, including multiple correlation, semipartial correlations,
improvement in R-squared, squared partial correlations, and differences in standardized
regression coefficients, for models fitted by lm(). 'betaMC' combines ideas from
Monte Carlo confidence intervals for the indirect effect (Pesigan and Cheung, 2023
<https://doi.org/10.3758/s13428-023-02114-4>) and the sampling covariance matrix
of regression coefficients (Dudgeon, 2017 <https://doi.org/10.1007/s11336-017-9563-z>)
to generate confidence intervals effect sizes in regression.
authors:
- family-names: Pesigan
given-names: Ivan Jacob Agaloos
email: r.jeksterslab@gmail.com
orcid: https://orcid.org/0000-0003-4818-8420
preferred-citation:
type: article
title: Monte Carlo confidence intervals for the indirect effect with missing data
authors:
- family-names: Pesigan
given-names: Ivan Jacob Agaloos
email: r.jeksterslab@gmail.com
orcid: https://orcid.org/0000-0003-4818-8420
- family-names: Cheung
given-names: Shu Fai
email: shufai.cheung@gmail.com
orcid: https://orcid.org/0000-0002-9871-9448
year: '2023'
doi: 10.3758/s13428-023-02114-4
journal: Behavior Research Methods
repository: https://CRAN.R-project.org/package=betaMC
repository-code: https://github.com/jeksterslab/betaMC
url: https://jeksterslab.github.io/betaMC/
contact:
- family-names: Pesigan
given-names: Ivan Jacob Agaloos
email: r.jeksterslab@gmail.com
orcid: https://orcid.org/0000-0003-4818-8420
keywords:
- confidence-intervals
- monte-carlo
- r
- r-package
- regression-effect-sizes
- standardized-regression-coefficients
GitHub Events
Total
- Push event: 43
Last Year
- Push event: 43
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| jeksterslab | l****b@g****m | 100 |
| jeksterslab | j****b | 53 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 319 last-month
- Total docker downloads: 2,145
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
cran.r-project.org: betaMC
Monte Carlo for Regression Effect Sizes
- Homepage: https://github.com/jeksterslab/betaMC
- Documentation: http://cran.r-project.org/web/packages/betaMC/betaMC.pdf
- License: MIT + file LICENSE
-
Latest release: 1.3.2
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.0.0 depends
- methods * imports
- stats * imports
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
- actions/checkout v4 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- ijapesigan/r2u-r-project latest build
- actions/checkout v4 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
- actions/checkout v4 composite
- s0/git-publish-subdir-action develop composite
- actions/checkout v4 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v4 composite
- actions/checkout v4 composite
- devops-infra/action-commit-push master composite
- JamesIves/github-pages-deploy-action v4 composite
- actions/checkout v4 composite
- actions/checkout v4 composite
- r-lib/actions/check-r-package v2 composite
- actions/checkout v4 composite
- ludeeus/action-shellcheck master composite
- actions/checkout v4 composite
- s0/git-publish-subdir-action develop composite