Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN release 0.2.1 #18

Merged
merged 4 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: bennu
Title: Bayesian Estimation of Naloxone Kit Number Under-Reporting
Version: 0.1.0
Version: 0.2.1.9000
Authors@R: c(
person(given = "Mike",
family = "Irvine",
Expand All @@ -12,7 +12,7 @@ Authors@R: c(
Description: Bayesian model and associated tools for generating estimates of
total naloxone kit numbers distributed and used from naloxone kit orders
data. Provides functions for generating simulated data of naloxone kit use
and functions for generating samples from the posterior
and functions for generating samples from the posterior.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Expand Down
23 changes: 2 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,2 @@
MIT License

Copyright (c) 2022 bennu authors

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.
YEAR: 2023
COPYRIGHT HOLDER: Michael Irvine
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2022 bennu authors
Copyright (c) 2023 Michael Irvine

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# bennu (development version)

# bennu 0.2.1

# bennu 0.2.0

# bennu 0.1.0

* `est_naloxone` can accept `psi_vector` of variable length and additionally
Expand Down
4 changes: 4 additions & 0 deletions R/est_naloxone.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#' @param adapt_delta (double, between 0 and 1, defaults to 0.8)
#' @param ... other parameters to pass to [rstan::sampling]
#' @family inference
#' @return An S4 stanfit class object containing the fitted model
#' @export
est_naloxone_vec <- function(N_region, N_t, N_distributed, regions,
times, Orders2D, Reported_Distributed,
Expand Down Expand Up @@ -126,6 +127,7 @@ est_naloxone_vec <- function(N_region, N_t, N_distributed, regions,
#' \item{region_name}{Optional label for region}
#' }
#' @examples
#' \dontrun{
#' library(rstan)
#' library(bayesplot)
#'
Expand All @@ -138,8 +140,10 @@ est_naloxone_vec <- function(N_region, N_t, N_distributed, regions,
#' pars = c("sigma", "mu0"),
#' off_diag_args = list(size = 1, alpha = 0.5)
#' )
#' }
#' @inheritParams est_naloxone_vec
#' @family inference
#' @return An S4 stanfit class object containing the fitted model
#' @export
est_naloxone <- function(d,
psi_vec = c(0.7, 0.2, 0.1),
Expand Down
11 changes: 11 additions & 0 deletions R/generate_model_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
#' @param c_region logit probability of kit use per region
#' @param reporting_freq The frequency that distribution data is provided.
#' If `NULL` distribution frequency matches orders frequency
#' @return A tibble
#' \describe{
#' \item{Orders}{Kit orders per time and region}
#' \item{regions}{Numeric index indicating region of orders and distributions}
#' \item{Reported_Used}{Number of kits reported as used}
#' \item{Reported_Distributed}{Number of kits reported as distributed}
#' \item{p_use}{Probability that a kit was used}
#' \item{p_reported}{Probability that a distributed kit was reported}
#' \item{times}{Index for time}
#' \item{region_name}{String index for the region}
#' }
#' @export
#' @importFrom stats rbinom rnorm
#' @family data generation
Expand Down
5 changes: 5 additions & 0 deletions man/est_naloxone.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/est_naloxone_vec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions man/generate_model_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.