Skip to content

Commit

Permalink
Automated build.
Browse files Browse the repository at this point in the history
Files changed:
A	.Rbuildignore
A	.github/linters/.lintr
A	.setup/build/betaDelta.pdf
A	.setup/build/betaDelta_1.0.4.tar.gz
A	.setup/latex/bib/quarto.bib
A	.setup/lint/.lintr
A	CITATION.cff
M	DESCRIPTION
A	LICENSE
A	LICENSE.md
A	NAMESPACE
A	R/betaSandwich-jacobian-diff-beta-star-wrt-beta-star-dot.R
A	R/dataSets-nas1982.R
A	R/deltaMethod-acov-delta.R
A	R/deltaMethod-delta-ci-dot.R
A	R/deltaMethod-delta-generic.R
A	R/deltaMethod-delta.R
A	R/deltaMethod-methods.R
A	R/gammaADF-gamma-adf-consistent-dot.R
A	R/gammaADF-gamma-adf-unbiased-dot.R
A	R/gammaN-gamma-mvn-dot.R
A	R/linearAlgebra-d-mat-dot.R
A	R/linearAlgebra-d-of-mat-dot.R
A	R/linearAlgebra-diag-of-vech-dot.R
A	R/linearAlgebra-pinv-of-d-mat-dot.R
A	R/linearAlgebra-vec-dot.R
A	R/linearAlgebra-vech-dot.R
A	R/linearAlgebra-vech-names-dot.R
A	R/processLM-dif-dot.R
A	R/processLM-process-lm-dot.R
A	R/rhoMatrix-rho-of-sigma-dot.R
A	R/strRegression-beta-star-of-rho-dot.R
A	R/strRegression-jacobian-beta-star-wrt-vech-sigma-dot.R
A	R/strRegression-moments-index-dot.R
A	R/strRegression-p-cor-sq-dot.R
A	R/strRegression-r-sq-bar-dot.R
A	R/strRegression-r-sq-of-sigma-dot.R
A	R/strRegression-s-p-cor-dot.R
A	R/wald-ci-wald-dot.R
A	R/wald-probs-of-alpha-dot.R
A	README.md
M	data/nas1982.rda
A	man/BetaDelta.Rd
A	man/Delta.Rd
A	man/DeltaGeneric.Rd
A	man/DiffBetaDelta.Rd
A	man/betaDelta-package.Rd
A	man/coef.betadelta.Rd
A	man/coef.deltamethod.Rd
A	man/coef.diffbetadelta.Rd
A	man/confint.betadelta.Rd
A	man/confint.deltamethod.Rd
A	man/confint.diffbetadelta.Rd
A	man/nas1982.Rd
A	man/print.betadelta.Rd
A	man/print.deltamethod.Rd
A	man/print.diffbetadelta.Rd
A	man/summary.betadelta.Rd
A	man/summary.deltamethod.Rd
A	man/summary.diffbetadelta.Rd
A	man/vcov.betadelta.Rd
A	man/vcov.deltamethod.Rd
A	man/vcov.diffbetadelta.Rd
M	project.Rproj
A	vignettes/example-beta-delta.Rmd
A	vignettes/example-delta-generic.Rmd
A	vignettes/example-delta.Rmd
A	vignettes/example-diff-beta-delta.Rmd
A	vignettes/vignettes.bib
  • Loading branch information
jeksterslab committed Nov 2, 2023
1 parent 8f29e9d commit 2552c0d
Show file tree
Hide file tree
Showing 69 changed files with 6,343 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .Rbuildignore
@@ -0,0 +1,19 @@
.*\.Rcheck$
.*\.Rproj$
^CITATION\.cff$
^LICENSE\.md$
^Makefile$
^README\.Rmd$
^README\.md$
^\.Rproj\.user$
^\.devcontainer$
^\.git.*$
^\.library$
^\.setup$
^\.sim$
^detritus$
^index\.qmd$
^pkgdown$
^quarto$
^scripts$
^vignettes$
6 changes: 6 additions & 0 deletions .github/linters/.lintr
@@ -0,0 +1,6 @@
linters: lintr::linters_with_defaults(lintr::object_name_linter(styles = c("CamelCase", "snake_case", "symbols")))
exclusions: list("R/RcppExports.R")
exclude: "# Exclude Linting"
exclude_start: "# Begin Exclude Linting"
exclude_end: "# End Exclude Linting"

Binary file added .setup/build/betaDelta.pdf
Binary file not shown.
Binary file added .setup/build/betaDelta_1.0.4.tar.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions .setup/latex/bib/quarto.bib
@@ -0,0 +1,11 @@
@Article{Wright-1918,
author = {Sewall Wright},
date = {1918-07},
journaltitle = {Genetics},
title = {On the nature of size factors},
doi = {10.1093/genetics/3.4.367},
number = {4},
pages = {367--374},
volume = {3},
publisher = {Oxford University Press ({OUP})},
}
6 changes: 6 additions & 0 deletions .setup/lint/.lintr
@@ -0,0 +1,6 @@
linters: lintr::linters_with_defaults(lintr::object_name_linter(styles = c("CamelCase", "snake_case", "symbols")))
exclusions: list("R/RcppExports.R")
exclude: "# Exclude Linting"
exclude_start: "# Begin Exclude Linting"
exclude_end: "# End Exclude Linting"

57 changes: 57 additions & 0 deletions CITATION.cff
@@ -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.4
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.4
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
1 change: 1 addition & 0 deletions DESCRIPTION
Expand Up @@ -27,3 +27,4 @@ Suggests:
rmarkdown,
testthat,
betaSandwich
RoxygenNote: 7.2.3
2 changes: 2 additions & 0 deletions LICENSE
@@ -0,0 +1,2 @@
YEAR: 2023
COPYRIGHT HOLDER: Ivan Jacob Agaloos Pesigan
21 changes: 21 additions & 0 deletions LICENSE.md
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2023 Ivan Jacob Agaloos Pesigan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions NAMESPACE
@@ -0,0 +1,21 @@
# Generated by roxygen2: do not edit by hand

S3method(coef,betadelta)
S3method(coef,deltamethod)
S3method(coef,diffbetadelta)
S3method(confint,betadelta)
S3method(confint,deltamethod)
S3method(confint,diffbetadelta)
S3method(print,betadelta)
S3method(print,deltamethod)
S3method(print,diffbetadelta)
S3method(summary,betadelta)
S3method(summary,deltamethod)
S3method(summary,diffbetadelta)
S3method(vcov,betadelta)
S3method(vcov,deltamethod)
S3method(vcov,diffbetadelta)
export(BetaDelta)
export(Delta)
export(DeltaGeneric)
export(DiffBetaDelta)
26 changes: 26 additions & 0 deletions R/betaSandwich-jacobian-diff-beta-star-wrt-beta-star-dot.R
@@ -0,0 +1,26 @@
#' Jacobian Matrix of Differences of Standardized Regression Slopes
#' with Respect to the Standardized Regression Slopes
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @param p positive integer.
#' Number of regressors.
#'
#' @family Beta Sandwich Functions
#' @keywords betaSandwich derivatives internal
#' @noRd
.JacobianDiffBetaStar <- function(p) {
idx <- utils::combn(seq_len(p), 2)
q <- dim(idx)[2]
out <- matrix(
data = 0,
nrow = q,
ncol = p
)
for (i in seq_len(q)) {
j <- idx[, i]
out[i, j[1]] <- 1
out[i, j[2]] <- -1
}
return(out)
}
23 changes: 23 additions & 0 deletions R/dataSets-nas1982.R
@@ -0,0 +1,23 @@
#' 1982 National Academy of Sciences Doctoral Programs Data
#'
#' @format Ratings of 46 doctoral programs in psychology in the USA
#' with the following variables:
#' \describe{
#' \item{QUALITY}{Program quality ratings.}
#' \item{NFACUL}{Number of faculty members in the program.}
#' \item{NGRADS}{Number of program graduates.}
#' \item{PCTSUPP}{Percentage of program graduates who received support.}
#' \item{PCTGRT}{Percent of faculty members holding research grants.}
#' \item{NARTIC}{Number of published articles
#' attributed to program faculty member.}
#' \item{PCTPUB}{Percent of faculty with one or more published article.}
#' }
#' @references
#' National Research Council. (1982).
#' *An assessment of research-doctorate programs in the United States:
#' Social and behavioral sciences*.
#' \doi{10.17226/9781}.
#' Reproduced with permission from the National Academy of Sciences,
#' Courtesy of the National Academies Press, Washington, D.C.
#' @keywords data
"nas1982"
20 changes: 20 additions & 0 deletions R/deltaMethod-acov-delta.R
@@ -0,0 +1,20 @@
#' Delta Method Asymptotic Covariance Matrix
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @param jcap Numeric matrix.
#' Jacobian matrix.
#' @param acov Numeric matrix.
#' Asymptotic covariance matrix.
#' @family Delta Method Functions
#' @keywords deltaMethod acov internal
#' @noRd
.ACovDelta <- function(jcap,
acov) {
return(
jcap %*% tcrossprod(
acov,
jcap
)
)
}
45 changes: 45 additions & 0 deletions R/deltaMethod-delta-ci-dot.R
@@ -0,0 +1,45 @@
#' Confidence Intervals for
#' Deltma Method
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @return Returns a matrix of
#' estimates,
#' standard errors,
#' test statistics,
#' p-values,
#' and
#' confidence intervals.
#'
#' @param object Object of class `deltamethod`.
#' @param alpha Numeric vector.
#' Significance level \eqn{\alpha}.
#'
#' @family Delta Method Functions
#' @keywords deltaMethod ci internal
#' @noRd
.DeltaCI <- function(object,
alpha) {
stopifnot(
inherits(
object,
"deltamethod"
)
)
if (is.null(alpha)) {
alpha <- object$args$alpha
}
stopifnot(
all(alpha > 0 & alpha < 1)
)
return(
.CIWald(
est = object$est,
se = sqrt(diag(object$vcov)),
theta = object$args$theta,
alpha = alpha,
z = object$args$z,
df = object$args$df
)
)
}

0 comments on commit 2552c0d

Please sign in to comment.