Skip to content

Commit

Permalink
Automated build.
Browse files Browse the repository at this point in the history
Files changed:
A	.setup/build/betaDelta.pdf
A	.setup/build/betaDelta_1.0.2.9000.tar.gz
A	CITATION.cff
A	README.md
A	vignettes/example_beta_delta.Rmd
A	vignettes/example_diff_beta_delta.Rmd
  • Loading branch information
jeksterslab committed Aug 19, 2023
1 parent dd2e8ae commit 671b0f2
Show file tree
Hide file tree
Showing 6 changed files with 553 additions and 0 deletions.
Binary file added .setup/build/betaDelta.pdf
Binary file not shown.
Binary file added .setup/build/betaDelta_1.0.2.9000.tar.gz
Binary file not shown.
57 changes: 57 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v0.5.0
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------

cff-version: 1.2.0
message: 'To cite package "betaDelta" in publications use:'
type: software
license: MIT
title: 'betaDelta: Confidence Intervals for Standardized Regression Coefficients'
version: 1.0.2.9000
doi: 10.1080/00273171.2023.2201277
abstract: Generates confidence intervals for standardized regression coefficients
using delta method standard errors for models fitted by lm() as described in Yuan
and Chan (2011) <doi:10.1007/s11336-011-9224-6> and Jones and Waller (2015) <doi:10.1007/s11336-013-9380-y>.
A description of the package and code examples are presented in Pesigan, Sun, and
Cheung (2023) <doi:10.1080/00273171.2023.2201277>.
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: 'betaDelta and betaSandwich: Confidence intervals for standardized regression
coefficients in R'
authors:
- family-names: Pesigan
given-names: Ivan Jacob Agaloos
email: r.jeksterslab@gmail.com
orcid: https://orcid.org/0000-0003-4818-8420
- family-names: Sun
given-names: Rongwei
email: irissun_s@hotmail.com
orcid: https://orcid.org/0000-0003-0034-1422
- family-names: Cheung
given-names: Shu Fai
email: shufai.cheung@gmail.com
orcid: https://orcid.org/0000-0002-9871-9448
year: '2023'
doi: 10.1080/00273171.2023.2201277
journal: Multivariate Behavioral Research
notes: R package version 1.0.2.9000
repository: https://packagemanager.rstudio.com/all/__linux__/jammy/latest/
repository-code: https://github.com/jeksterslab/betaDelta
url: https://jeksterslab.github.io/betaDelta/
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
- delta-method-standard-errors
- r
- r-package
- standardized-regression-coefficients
179 changes: 179 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
betaDelta
================
Ivan Jacob Agaloos Pesigan
2023-08-19

<!-- README.md is generated from README.Rmd. Please edit that file -->
<!-- badges: start -->

[![CRAN
Status](https://www.r-pkg.org/badges/version/betaDelta)](https://cran.r-project.org/package=betaDelta)
[![R-Universe
Status](https://jeksterslab.r-universe.dev/badges/betaDelta)](https://jeksterslab.r-universe.dev)
[![DOI](https://zenodo.org/badge/DOI/10.1080/00273171.2023.2201277.svg)](https://doi.org/10.1080/00273171.2023.2201277)
[![Make
Project](https://github.com/jeksterslab/betaDelta/actions/workflows/make.yml/badge.svg)](https://github.com/jeksterslab/betaDelta/actions/workflows/make.yml)
[![R-CMD-check](https://github.com/jeksterslab/betaDelta/actions/workflows/check-full.yml/badge.svg)](https://github.com/jeksterslab/betaDelta/actions/workflows/check-full.yml)
[![R Package Test
Coverage](https://github.com/jeksterslab/betaDelta/actions/workflows/test-coverage.yml/badge.svg)](https://github.com/jeksterslab/betaDelta/actions/workflows/test-coverage.yml)
[![Lint R
Package](https://github.com/jeksterslab/betaDelta/actions/workflows/lint.yml/badge.svg)](https://github.com/jeksterslab/betaDelta/actions/workflows/lint.yml)
[![Package Website (GitHub
Pages)](https://github.com/jeksterslab/betaDelta/actions/workflows/pkgdown-gh-pages.yml/badge.svg)](https://github.com/jeksterslab/betaDelta/actions/workflows/pkgdown-gh-pages.yml)
[![Compile
LaTeX](https://github.com/jeksterslab/betaDelta/actions/workflows/latex.yml/badge.svg)](https://github.com/jeksterslab/betaDelta/actions/workflows/latex.yml)
[![Shell
Check](https://github.com/jeksterslab/betaDelta/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/jeksterslab/betaDelta/actions/workflows/shellcheck.yml)
[![pages-build-deployment](https://github.com/jeksterslab/betaDelta/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/jeksterslab/betaDelta/actions/workflows/pages/pages-build-deployment)
[![codecov](https://codecov.io/gh/jeksterslab/betaDelta/branch/main/graph/badge.svg?token=KVLUET3DJ6)](https://codecov.io/gh/jeksterslab/betaDelta)
<!-- badges: end -->

## Description

Generates confidence intervals for standardized regression coefficients
using delta method standard errors for models fitted by `lm()` as
described in Yuan and Chan (2011:
<http://doi.org/10.1007/s11336-011-9224-6>) and Jones and Waller (2015:
<http://doi.org/10.1007/s11336-013-9380-y>). A description of the
package and code examples are presented in Pesigan, Sun, and Cheung
(2023: <https://doi.org/10.1080/00273171.2023.2201277>).

## Installation

You can install the CRAN release of `betaDelta` with:

``` r
install.packages("betaDelta")
```

You can install the development version of `betaDelta` from
[GitHub](https://github.com/jeksterslab/betaDelta) with:

``` r
if (!require("remotes")) install.packages("remotes")
remotes::install_github("jeksterslab/betaDelta")
```

## 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 `BetaDelta()` function
from the `betaDelta` package following Yuan & Chan (2011) and Jones &
Waller (2015).

``` r
library(betaDelta)
```

``` r
df <- betaDelta::nas1982
```

### Fit the regression model using the `lm()` function.

``` r
object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = df)
```

### Estimate the standardized regression slopes and the corresponding sampling covariance matrix.

#### Multivariate Normal-Theory Approach

``` r
BetaDelta(object, type = "mvn", alpha = 0.05)
#> Call:
#> BetaDelta(object = object, type = "mvn", alpha = 0.05)
#>
#> Standardized regression slopes with MVN standard errors:
#> est se t df p 2.5% 97.5%
#> NARTIC 0.4951 0.0759 6.5272 42 0.000 0.3421 0.6482
#> PCTGRT 0.3915 0.0770 5.0824 42 0.000 0.2360 0.5469
#> PCTSUPP 0.2632 0.0747 3.5224 42 0.001 0.1124 0.4141
```

#### Asymptotic Distribution-Free Approach

``` r
BetaDelta(object, type = "adf", alpha = 0.05)
#> Call:
#> BetaDelta(object = object, type = "adf", alpha = 0.05)
#>
#> Standardized regression slopes with ADF standard errors:
#> est se t df p 2.5% 97.5%
#> NARTIC 0.4951 0.0674 7.3490 42 0.0000 0.3592 0.6311
#> PCTGRT 0.3915 0.0710 5.5164 42 0.0000 0.2483 0.5347
#> PCTSUPP 0.2632 0.0769 3.4231 42 0.0014 0.1081 0.4184
```

## Other Feature

The package can also be used to generate confidence intervals for
differences of standardized regression coefficients.

## Citation

To cite `betaDelta` in publications, please use:

Pesigan, I. J. A., Sun, R. W., & Cheung, S. F. (2023). betaDelta and
betaSandwich: Confidence intervals for standardized regression
coefficients in R. *Multivariate Behavioral Research*.
<https://doi.org/10.1080/00273171.2023.2201277>

## Documentation

See [GitHub Pages](https://jeksterslab.github.io/betaDelta/index.html)
for package documentation.

## Citation

To cite `betaDelta` in publications, please cite Pesigan et al. (2023).

## References

<div id="refs" class="references csl-bib-body hanging-indent"
line-spacing="2">

<div id="ref-Jones-Waller-2015" class="csl-entry">

Jones, J. A., & Waller, N. G. (2015). The normal-theory and asymptotic
distribution-free (ADF) covariance matrix of standardized regression
coefficients: Theoretical extensions and finite sample behavior.
*Psychometrika*, *80*(2), 365–378.
<https://doi.org/10.1007/s11336-013-9380-y>

</div>

<div id="ref-NationalResearchCouncil-1982" class="csl-entry">

National Research Council. (1982). *An assessment of research-doctorate
programs in the United States: Social and behavioral sciences*. National
Academies Press. <https://doi.org/10.17226/9781>

</div>

<div id="ref-Pesigan-Sun-Cheung-2023" class="csl-entry">

Pesigan, I. J. A., Sun, R. W., & Cheung, S. F. (2023).
<span class="nocase">betaDelta</span> and
<span class="nocase">betaSandwich</span>: Confidence intervals for
standardized regression coefficients in R. *Multivariate Behavioral
Research*, 1–4. <https://doi.org/10.1080/00273171.2023.2201277>

</div>

<div id="ref-Yuan-Chan-2011" class="csl-entry">

Yuan, K.-H., & Chan, W. (2011). Biases and standard errors of
standardized regression coefficients. *Psychometrika*, *76*(4), 670–690.
<https://doi.org/10.1007/s11336-011-9224-6>

</div>

</div>
Loading

0 comments on commit 671b0f2

Please sign in to comment.