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/betaNB.pdf
A	.setup/build/betaNB_1.0.2.9000.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/dataSets-nas1982.R
A	R/linearAlgebra-d-mat-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/nBootstrap-acceleration-dot.R
A	R/nBootstrap-bc-ci-dot.R
A	R/nBootstrap-bc-probs-dot.R
A	R/nBootstrap-bca-ci-dot.R
A	R/nBootstrap-bca-probs-dot.R
A	R/nBootstrap-ci-format-dot.R
A	R/nBootstrap-pc-ci-dot.R
A	R/nBootstrap-pc-probs-dot.R
A	R/nBootstrap-z0-dot.R
A	R/nBootstrap-z1-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-beta-star-of-sigma-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	README.md
M	data/nas1982.rda
A	man/BetaNB.Rd
A	man/DeltaRSqNB.Rd
A	man/DiffBetaNB.Rd
A	man/NB.Rd
A	man/PCorNB.Rd
A	man/RSqNB.Rd
A	man/SCorNB.Rd
A	man/betaNB-package.Rd
A	man/coef.betanb.Rd
A	man/confint.betanb.Rd
A	man/nas1982.Rd
A	man/print.betanb.Rd
A	man/print.nb.Rd
A	man/summary.betanb.Rd
A	man/vcov.betanb.Rd
M	project.Rproj
A	vignettes/vignettes.bib
  • Loading branch information
jeksterslab committed Oct 10, 2023
1 parent ee14197 commit d36edd2
Show file tree
Hide file tree
Showing 54 changed files with 5,043 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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/betaNB.pdf
Binary file not shown.
Binary file added .setup/build/betaNB_1.0.2.9000.tar.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions .setup/latex/bib/quarto.bib
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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"

60 changes: 60 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# -----------------------------------------------------------
# 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 "betaNB" in publications use:'
type: software
license: MIT
title: 'betaNB: Bootstrap for Regression Effect Sizes'
version: 1.0.2.9000
abstract: 'Generates nonparametric bootstrap confidence intervals (Efron & Tibshirani,
1993: <doi:10.1201/9780429246593>) 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().'
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: thesis
title: 'Confidence intervals for standardized coefficients: Applied to regression
coefficients in primary studies and indirect effects in meta-analytic structural
equation modeling'
authors:
- family-names: Pesigan
given-names: Ivan Jacob Agaloos
email: r.jeksterslab@gmail.com
orcid: https://orcid.org/0000-0003-4818-8420
year: '2022'
institution:
name: University of Macau
thesis-type: PhD Thesis
repository: https://packagemanager.rstudio.com/all/__linux__/jammy/latest/
repository-code: https://github.com/jeksterslab/betaNB
url: https://jeksterslab.github.io/betaNB/
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
- nonparametric-bootstrap
- r
- r-package
- regression-effect-sizes
- standardized-regression-coefficients
references:
- type: manual
title: 'betaNB: Bootstrap for Regression Effect Sizes'
authors:
- family-names: Pesigan
given-names: Ivan Jacob Agaloos
email: r.jeksterslab@gmail.com
orcid: https://orcid.org/0000-0003-4818-8420
year: '2023'
notes: R package version 1.0.2.9000
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ Suggests:
knitr,
rmarkdown,
testthat
RoxygenNote: 7.2.3
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2023
COPYRIGHT HOLDER: Ivan Jacob Agaloos Pesigan
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 15 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by roxygen2: do not edit by hand

S3method(coef,betanb)
S3method(confint,betanb)
S3method(print,betanb)
S3method(print,nb)
S3method(summary,betanb)
S3method(vcov,betanb)
export(BetaNB)
export(DeltaRSqNB)
export(DiffBetaNB)
export(NB)
export(PCorNB)
export(RSqNB)
export(SCorNB)
23 changes: 23 additions & 0 deletions R/dataSets-nas1982.R
Original file line number Diff line number Diff line change
@@ -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"
37 changes: 37 additions & 0 deletions R/linearAlgebra-d-mat-dot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#' The Duplication Matrix
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @param k Positive integer.
#' Dimension of the `k` by `k` matrix.
#'
#' @return Returns a matrix.
#'
#' @family Symmetric Functions
#' @keywords linearAlgebra symmetric internal
#' @noRd
.DMat <- function(k) {
sym <- matrix(
0,
nrow = k,
ncol = k
)
q <- seq_len(
0.5 * k * (k + 1)
)
sym[lower.tri(sym, diag = TRUE)] <- q
sym[upper.tri(sym)] <- t(sym)[upper.tri(sym)]
return(
outer(
X = .Vec(sym),
Y = q,
FUN = function(x, y) {
ifelse(
test = x == y,
yes = 1,
no = 0
)
}
)
)
}
24 changes: 24 additions & 0 deletions R/linearAlgebra-pinv-of-d-mat-dot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#' The Moore-Penrose Inverse of the Duplication Matrix
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @param d Numeric matrix.
#' Duplication matrix.
#'
#' @return Returns a matrix.
#'
#' @family Symmetric Functions
#' @keywords linearAlgebra symmetric internal
#' @noRd
.PInvDmat <- function(d) {
return(
tcrossprod(
chol2inv(
chol(
crossprod(d)
)
),
d
)
)
}
15 changes: 15 additions & 0 deletions R/linearAlgebra-vec-dot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#' Vectorize a Matrix
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @return Returns a vector.
#'
#' @param x Matrix.
#'
#' @family Vectorization Functions
#' @keywords linearAlgebra vectorization internal
#' @noRd
.Vec <- function(x) {
dim(x) <- NULL
return(x)
}
21 changes: 21 additions & 0 deletions R/linearAlgebra-vech-dot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#' Half-Vectorize a Matrix
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @param x Matrix.
#'
#' @return Returns a vector.
#'
#' @family Vectorization Functions
#' @keywords linearAlgebra vectorization internal
#' @noRd
.Vech <- function(x) {
return(
x[
lower.tri(
x = x,
diag = TRUE
)
]
)
}
20 changes: 20 additions & 0 deletions R/nBootstrap-acceleration-dot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#' Acceleration
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @param jackknife Numeric vector.
#' Jackknife estimates.
#'
#' @return Returns a numeric vector of length one.
#'
#' @family Confidence Intervals Functions
#' @keywords nBootstrap ci internal
#' @noRd
.Acceleration <- function(jackknife) {
parenthesis <- mean(jackknife) - jackknife
numerator <- sum(parenthesis^3)
denominator <- 6 * ((sum(parenthesis^2))^(3 / 2))
return(
numerator / denominator
)
}
43 changes: 43 additions & 0 deletions R/nBootstrap-bc-ci-dot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#' Bias Corrected Confidence Intervals
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @param thetahatstar Numeric vector.
#' Sampling distribution.
#' @param thetahat Numeric.
#' Parameter estimate.
#' @param probs Numeric vector.
#' Vector of probabilities.
#' @param z0 Numeric.
#' @param z1 Numeric vector
#' with length equal to two times the length of alpha.
#' @return Returns a matrix of estimates, standard errors,
#' number of replications, and confidence intervals.
#'
#' @family Confidence Intervals Functions
#' @keywords nBootstrap ci internal
#' @noRd
.BCCI <- function(thetahatstar,
thetahat,
probs,
z0,
z1) {
thetahatstar <- as.vector(thetahatstar)
thetahatstar <- thetahatstar[stats::complete.cases(thetahatstar)]
ci <- stats::quantile(
x = thetahatstar,
probs = .BCProbs(
z0 = z0,
z1 = z1
),
names = FALSE
)
return(
.CIFormat(
thetahatstar = thetahatstar,
thetahat = thetahat,
probs = probs,
ci = ci
)
)
}
20 changes: 20 additions & 0 deletions R/nBootstrap-bc-probs-dot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#' Bias Corrected Probablities
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @param z0 Numeric.
#' @param z1 Numeric vector
#' with length equal to two times the length of alpha.
#' @return Returns a vector of prababilities.
#'
#' @family Confidence Intervals Functions
#' @keywords nBootstrap ci internal
#' @noRd
.BCProbs <- function(z0,
z1) {
return(
stats::pnorm(
q = 2 * z0 + z1
)
)
}
Loading

0 comments on commit d36edd2

Please sign in to comment.