Skip to content

Commit

Permalink
add copyright to all R files
Browse files Browse the repository at this point in the history
  • Loading branch information
merliseclyde committed Oct 23, 2024
1 parent 6db209e commit 73c4ffd
Show file tree
Hide file tree
Showing 29 changed files with 112 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ cran-comments.md
^CRAN-RELEASE$
^codecov\.yml$
CONTRIBUTING.md
.htaccess
R/copyright.txt
src/copyright.txt

^cran-comments\.md$
^doc$
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ docs
tests/testthat/Rplots.pdf
R/gordy.R
inst/doc
R/copyright.txt
src/copyright.txt

6 changes: 6 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Extra Security Headers
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
Header always append X-Frame-Options SAMEORIGIN
Header set X-Content-Type-Options nosniff
</IfModule>
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# BAS 1.7.4

* added hexagon sticker
* add copyright to source files to satistfy OpenSSF Best Practices


# BAS 1.7.3

Expand Down
3 changes: 3 additions & 0 deletions R/BAS-package.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#' _PACKAGE
#' @name BAS
#'
Expand Down
4 changes: 4 additions & 0 deletions R/EB_global.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Find the global Empirical Bayes estimates for BMA
#'
#' Finds the global Empirical Bayes estimates of g in Zellner's g-prior and
Expand Down
3 changes: 3 additions & 0 deletions R/as_matrix.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#' Coerce a BAS list object into a matrix.
#'
#' Models, coefficients, and standard errors in objects of class 'bas' are
Expand Down
4 changes: 4 additions & 0 deletions R/bas_glm.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Bayesian Adaptive Sampling Without Replacement for Variable Selection in
#' Generalized Linear Models
#'
Expand Down
4 changes: 4 additions & 0 deletions R/bas_lm.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
normalize.initprobs.lm <- function(initprobs, p) {
if (length(initprobs) != p) {
stop(paste(
Expand Down
4 changes: 4 additions & 0 deletions R/beta_priors.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Empirical Bayes Prior Distribution for Coefficients in BMA Model
#'
#' Creates an object representing the EB prior for BAS GLM.
Expand Down
4 changes: 4 additions & 0 deletions R/cch.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Compound Confluent hypergeometric function of two variables
#'
#' Compute the Confluent Hypergeometric function of two variables, also know as
Expand Down
4 changes: 4 additions & 0 deletions R/coefficients.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Coefficients of a Bayesian Model Average object
#'
#' Extract conditional posterior means and standard deviations, marginal
Expand Down
4 changes: 4 additions & 0 deletions R/confint.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Compute Credible Intervals for BAS regression coefficients from BAS objects
#'
#' Uses Monte Carlo simulations using posterior means and standard deviations
Expand Down
4 changes: 4 additions & 0 deletions R/cv_summary.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Summaries for Out of Sample Prediction
#'
#' Compute average prediction error from out of sample predictions
Expand Down
4 changes: 4 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Bodyfat Data
#'
#' Lists estimates of the percentage of body fat determined by underwater
Expand Down
4 changes: 4 additions & 0 deletions R/diagnostics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' BAS MCMC diagnostic plot
#'
#' Function to help assess convergence of MCMC sampling for bas objects.
Expand Down
4 changes: 4 additions & 0 deletions R/eplogprob.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' eplogprob - Compute approximate marginal inclusion probabilities from
#' pvalues
#'
Expand Down
4 changes: 4 additions & 0 deletions R/glm_fit.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Fitting Generalized Linear Models and Bayesian marginal likelihood
#' evaluation
#'
Expand Down
4 changes: 4 additions & 0 deletions R/hypergeometric1F1.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Confluent hypergeometric1F1 function
#'
#' Compute the Confluent Hypergeometric function: 1F1(a,b,c,t) =
Expand Down
4 changes: 4 additions & 0 deletions R/hypergeometric2F1.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Gaussian hypergeometric2F1 function
#'
#' Compute the Gaussian Hypergeometric2F1 function: 2F1(a,b,c,z) = Gamma(b-c)
Expand Down
4 changes: 4 additions & 0 deletions R/image.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Images of models used in Bayesian model averaging
#'
#' Creates an image of the models selected using \code{\link{bas}}.
Expand Down
5 changes: 4 additions & 1 deletion R/interactions.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#

make.parents.of.interactions <-
function(mf, data) {
Expand Down
4 changes: 4 additions & 0 deletions R/model_priors.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Uniform Prior Distribution for Models
#'
#' Creates an object representing the prior distribution on models for BAS.
Expand Down
4 changes: 4 additions & 0 deletions R/outliers.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
########## Functions for Chaloner and Brant ###############
#' Bayesian Outlier Detection
#'
Expand Down
4 changes: 4 additions & 0 deletions R/plot.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Plot Diagnostics for an BAS Object
#'
#' Four plots (selectable by 'which') are currently available: a plot of
Expand Down
4 changes: 4 additions & 0 deletions R/plot_coef.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Plots the posterior distributions of coefficients derived from Bayesian
#' model averaging
#'
Expand Down
4 changes: 4 additions & 0 deletions R/predict.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Prediction Method for an Object of Class basglm
#' @description Predictions under model averaging from a BMA (BAS) object for GLMs
#' under different loss functions.
Expand Down
4 changes: 4 additions & 0 deletions R/summary.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Print a Summary of Bayesian Model Averaging objects from BAS
#'
#' \code{summary} and \code{print} methods for Bayesian model averaging objects
Expand Down
4 changes: 4 additions & 0 deletions R/update.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024 Merlise Clyde and contributors to BAS. All rights reserved.
# This work is licensed under a GNU GENERAL PUBLIC LICENSE Version 3.0
# License text is available at https://www.gnu.org/licenses/gpl-3.0.html
#
#' Update BAS object using a new prior
#'
#' Update a BMA object using a new prior distribution on the coefficients.
Expand Down

0 comments on commit 73c4ffd

Please sign in to comment.