Ivan Jacob Agaloos Pesigan 2026-11-21
Description
Generates nonparametric bootstrap confidence intervals (Efron & Tibshirani, 1993: https://doi.org/10.1201/9780429246593) for standardized regression coefficients (beta) and other effect sizes, including multiple correlation, semipartial correlations, squared semipartial correlations, improvement in R-squared, squared partial correlations, Cohen’s f-squared, and differences in standardized regression coefficients, for models fitted by lm(). The pairs bootstrap and the wild bootstrap are available, with percentile, bias-corrected, bias-corrected and accelerated, and modified percentile intervals.
Installation
You can install the CRAN release of betaNB with:
install.packages("betaNB")You can install the development version of betaNB from GitHub with:
if (!require("pak")) install.packages("pak")
pak::pkg_install("jeksterslab/betaNB")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 BetaNB() function from the betaNB package.
df <- betaNB::nas1982Regression
Fit the regression model using the lm() function.
object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = df)Nonparametric Bootstrap
nb <- NB(object)Standardized Regression Slopes
BetaNB(nb, alpha = 0.05)
#> Call:
#> BetaNB(object = nb, alpha = 0.05)
#>
#> Standardized regression slopes
#> type = "pc"
#> est se R 2.5% 97.5%
#> NARTIC 0.4951 0.0718 5000 0.3554 0.6380
#> PCTGRT 0.3915 0.0776 5000 0.2372 0.5400
#> PCTSUPP 0.2632 0.0806 5000 0.1075 0.4188Other Features
The package provides the following functions.
| Function | Purpose |
|---|---|
NB() |
Nonparametric bootstrap (pairs or wild) of a fitted lm model |
BetaNB() |
Standardized regression coefficients |
RSqNB() |
R-squared and adjusted R-squared |
DiffBetaNB() |
Differences of standardized regression coefficients |
SCorNB() |
Semipartial correlations |
SCorSqNB() |
Squared semipartial correlations (squared signed interval) |
PCorNB() |
Squared partial correlations |
DeltaRSqNB() |
Improvement in R-squared (adjusted differences and modified percentile intervals available) |
FSqNB() |
Cohen’s f-squared and local f-squared |
The coef(), vcov(), confint(), summary(), and print() methods are available for the returned objects. Examples for each function are in the package vignettes.
Effect Sizes
The definitions, formulas, and notes on the intervals are in the help pages of the functions and in the vignette betaNB: Example Using the SCorSqNB and FSqNB Functions.
Documentation
See GitHub Pages for package documentation.