diff --git a/.Rbuildignore b/.Rbuildignore index a3871e1..0249ad7 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -22,3 +22,4 @@ ^CODE_OF_CONDUCT\.md$ ^doc$ ^Meta$ +^CITATION\.cff$ diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index b14952b..324aa7a 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -6,7 +6,7 @@ In the interest of fostering an open and welcoming environment, we as contributo ## Our Standards -Examples of behavior that contributes to creating a positive environment include: +Examples of behaviour that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences @@ -14,7 +14,7 @@ Examples of behavior that contributes to creating a positive environment include * Focusing on what is best for the community * Showing empathy towards other community members -Examples of unacceptable behavior by participants include: +Examples of unacceptable behaviour by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 079bf1f..44570b4 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -8,16 +8,16 @@ * Fork this repository to your Github account -* Clone your version on your account down to your machine from your account +* Clone your forked version to your machine with -``` +```bash git clone https://github.com//bbw.git ``` * Make sure to track progress upstream i.e., on our version of `bbw` at `rapidsurveys/bbw`, by doing -``` +```bash git remote add upstream https://github.com/rapidsurveys/bbw.git ``` diff --git a/.github/workflows/mirror-codeberg.yaml b/.github/workflows/mirror-codeberg.yaml new file mode 100644 index 0000000..ee76c89 --- /dev/null +++ b/.github/workflows/mirror-codeberg.yaml @@ -0,0 +1,19 @@ +name: Mirror to other git server +on: + push: + branches: + - main + tags: + - "*" +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: yesolutions/mirror-action@master + with: + REMOTE: https://codeberg.org/rapidsurveys/bbw + GIT_USERNAME: ${{ secrets.CODEBERG_USERNAME }} + GIT_PASSWORD: ${{ secrets.CODEBERG_TOKEN }} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index e050312..0ab748d 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -34,15 +34,16 @@ jobs: clean = FALSE, install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") ) + print(cov) covr::to_cobertura(cov) shell: Rscript {0} - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: # Fail if error if not on PR, or if on PR and token is given fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }} - file: ./cobertura.xml - plugin: noop + files: ./cobertura.xml + plugins: noop disable_search: true token: ${{ secrets.CODECOV_TOKEN }} diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..c968ca9 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,301 @@ +# -------------------------------------------- +# CITATION file created with {cffr} R package +# See also: https://docs.ropensci.org/cffr/ +# -------------------------------------------- + +cff-version: 1.2.0 +message: 'To cite package "bbw" in publications use:' +type: software +license: GPL-3.0-only +title: 'bbw: Blocked Weighted Bootstrap' +version: 0.3.1 +doi: 10.5281/zenodo.6594797 +identifiers: +- type: doi + value: 10.32614/CRAN.package.bbw +abstract: The blocked weighted bootstrap (BBW) is an estimation technique for use + with data from two-stage cluster sampled surveys in which either prior weighting + (e.g. population-proportional sampling or PPS as used in Standardized Monitoring + and Assessment of Relief and Transitions or SMART surveys) or posterior weighting + (e.g. as used in rapid assessment method or RAM and simple spatial sampling method + or S3M surveys) is implemented. See Cameron et al (2008) + for application of bootstrap to cluster samples. See Aaron et al (2016) + and Aaron et al (2016) for application + of the blocked weighted bootstrap to estimate indicators from two-stage cluster + sampled surveys. +authors: +- family-names: Myatt + given-names: Mark + email: mark@brixtonhealth.com +- family-names: Guevarra + given-names: Ernest + email: ernestgmd@gmail.com + orcid: https://orcid.org/0000-0002-4887-4415 +preferred-citation: + type: manual + title: 'bbw: Blocked Weighted Bootstrap' + authors: + - name: Mark Myatt + - name: Ernest Guevarra + year: '2026' + notes: R package version 0.3.1 + url: https://rapidsurveys.io/bbw/ + doi: 10.5281/zenodo.6594797 +repository: https://CRAN.R-project.org/package=bbw +repository-code: https://github.com/rapidsurveys/bbw +url: https://rapidsurveys.io/bbw/ +contact: +- family-names: Guevarra + given-names: Ernest + email: ernestgmd@gmail.com + orcid: https://orcid.org/0000-0002-4887-4415 +keywords: +- bootstrapping-statistics +- r +- ram +- surveys +references: +- type: software + title: 'R: A Language and Environment for Statistical Computing' + notes: Depends + url: https://www.R-project.org/ + authors: + - name: R Core Team + institution: + name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2026' + version: '>= 4.2.0' +- type: software + title: car + abstract: 'car: Companion to Applied Regression' + notes: Imports + url: https://CRAN.R-project.org/package=car + repository: https://CRAN.R-project.org/package=car + authors: + - family-names: Fox + given-names: John + email: jfox@mcmaster.ca + - family-names: Weisberg + given-names: Sanford + email: sandy@umn.edu + - family-names: Price + given-names: Brad + email: brad.price@mail.wvu.edu + year: '2026' + doi: 10.32614/CRAN.package.car +- type: software + title: cli + abstract: 'cli: Helpers for Developing Command Line Interfaces' + notes: Imports + url: https://cli.r-lib.org + repository: https://CRAN.R-project.org/package=cli + authors: + - family-names: Csárdi + given-names: Gábor + email: gabor@posit.co + year: '2026' + doi: 10.32614/CRAN.package.cli +- type: software + title: doParallel + abstract: 'doParallel: Foreach Parallel Adaptor for the ''parallel'' Package' + notes: Imports + url: https://github.com/RevolutionAnalytics/doparallel + repository: https://CRAN.R-project.org/package=doParallel + authors: + - family-names: Corporation + given-names: Microsoft + - family-names: Weston + given-names: Steve + year: '2026' + doi: 10.32614/CRAN.package.doParallel +- type: software + title: foreach + abstract: 'foreach: Provides Foreach Looping Construct' + notes: Imports + url: https://github.com/RevolutionAnalytics/foreach + repository: https://CRAN.R-project.org/package=foreach + authors: + - name: Microsoft + - family-names: Weston + given-names: Steve + year: '2026' + doi: 10.32614/CRAN.package.foreach +- type: software + title: methods + abstract: 'R: A Language and Environment for Statistical Computing' + notes: Imports + authors: + - name: R Core Team + institution: + name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2026' +- type: software + title: parallel + abstract: 'R: A Language and Environment for Statistical Computing' + notes: Imports + authors: + - name: R Core Team + institution: + name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2026' +- type: software + title: parallelly + abstract: 'parallelly: Enhancing the ''parallel'' Package' + notes: Imports + url: https://parallelly.futureverse.org + repository: https://CRAN.R-project.org/package=parallelly + authors: + - family-names: Bengtsson + given-names: Henrik + email: henrikb@braju.com + orcid: https://orcid.org/0000-0002-7579-5165 + year: '2026' + doi: 10.32614/CRAN.package.parallelly +- type: software + title: stats + abstract: 'R: A Language and Environment for Statistical Computing' + notes: Imports + authors: + - name: R Core Team + institution: + name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2026' +- type: software + title: stringr + abstract: 'stringr: Simple, Consistent Wrappers for Common String Operations' + notes: Imports + url: https://stringr.tidyverse.org + repository: https://CRAN.R-project.org/package=stringr + authors: + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + year: '2026' + doi: 10.32614/CRAN.package.stringr +- type: software + title: withr + abstract: 'withr: Run Code ''With'' Temporarily Modified Global State' + notes: Imports + url: https://withr.r-lib.org + repository: https://CRAN.R-project.org/package=withr + authors: + - family-names: Hester + given-names: Jim + - family-names: Henry + given-names: Lionel + email: lionel@posit.co + - family-names: Müller + given-names: Kirill + email: krlmlr+r@mailbox.org + - family-names: Ushey + given-names: Kevin + email: kevinushey@gmail.com + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + - family-names: Chang + given-names: Winston + year: '2026' + doi: 10.32614/CRAN.package.withr +- type: software + title: knitr + abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R' + notes: Suggests + url: https://yihui.org/knitr/ + repository: https://CRAN.R-project.org/package=knitr + authors: + - family-names: Xie + given-names: Yihui + email: xie@yihui.name + orcid: https://orcid.org/0000-0003-0645-5666 + year: '2026' + doi: 10.32614/CRAN.package.knitr +- type: software + title: rmarkdown + abstract: 'rmarkdown: Dynamic Documents for R' + notes: Suggests + url: https://pkgs.rstudio.com/rmarkdown/ + repository: https://CRAN.R-project.org/package=rmarkdown + authors: + - family-names: Allaire + given-names: JJ + email: jj@posit.co + - family-names: Xie + given-names: Yihui + email: xie@yihui.name + orcid: https://orcid.org/0000-0003-0645-5666 + - family-names: Dervieux + given-names: Christophe + email: cderv@posit.co + orcid: https://orcid.org/0000-0003-4474-2498 + - family-names: McPherson + given-names: Jonathan + email: jonathan@posit.co + - family-names: Luraschi + given-names: Javier + - family-names: Ushey + given-names: Kevin + email: kevin@posit.co + - family-names: Atkins + given-names: Aron + email: aron@posit.co + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + - family-names: Cheng + given-names: Joe + email: joe@posit.co + - family-names: Chang + given-names: Winston + email: winston@posit.co + - family-names: Iannone + given-names: Richard + email: rich@posit.co + orcid: https://orcid.org/0000-0003-3925-190X + year: '2026' + doi: 10.32614/CRAN.package.rmarkdown +- type: software + title: testthat + abstract: 'testthat: Unit Testing for R' + notes: Suggests + url: https://testthat.r-lib.org + repository: https://CRAN.R-project.org/package=testthat + authors: + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + year: '2026' + doi: 10.32614/CRAN.package.testthat +- type: software + title: spelling + abstract: 'spelling: Tools for Spell Checking in R' + notes: Suggests + url: https://ropensci.r-universe.dev/spelling + repository: https://CRAN.R-project.org/package=spelling + authors: + - family-names: Ooms + given-names: Jeroen + email: jeroenooms@gmail.com + orcid: https://orcid.org/0000-0002-4035-0289 + - family-names: Hester + given-names: Jim + email: james.hester@rstudio.com + year: '2026' + doi: 10.32614/CRAN.package.spelling +- type: software + title: covr + abstract: 'covr: Test Coverage for Packages' + notes: Suggests + url: https://covr.r-lib.org + repository: https://CRAN.R-project.org/package=covr + authors: + - family-names: Hester + given-names: Jim + email: james.f.hester@gmail.com + year: '2026' + doi: 10.32614/CRAN.package.covr + diff --git a/DESCRIPTION b/DESCRIPTION index 4b6a21b..e1bd4fd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: bbw Type: Package Title: Blocked Weighted Bootstrap -Version: 0.3.0.9000 +Version: 0.3.1 Authors@R: c( person("Mark", "Myatt", email = "mark@brixtonhealth.com", role = c("aut", "cph")), @@ -19,7 +19,7 @@ Description: The blocked weighted bootstrap (BBW) is an estimation technique for application of the blocked weighted bootstrap to estimate indicators from two-stage cluster sampled surveys. License: GPL-3 -Depends: R (>= 4.1.0) +Depends: R (>= 4.2.0) Imports: car, cli, @@ -41,7 +41,7 @@ Encoding: UTF-8 Language: en-GB LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 URL: https://github.com/rapidsurveys/bbw, https://rapidsurveys.io/bbw/ BugReports: https://github.com/rapidsurveys/bbw/issues VignetteBuilder: knitr diff --git a/NEWS.md b/NEWS.md index 4107d6c..15ff2f2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,7 @@ -# bbw 0.3.0.9000 (development version) +# bbw 0.3.1 + +This is the fourth CRAN release of `bbw`. This is a patch release which contains general upkeep and maintenance updates and changes. + # bbw 0.3.0 diff --git a/README.Rmd b/README.Rmd index 96e367a..ee1ffe0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -17,40 +17,52 @@ knitr::opts_chunk$set( [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) -[![CRAN](https://img.shields.io/cran/v/bbw.svg)](https://cran.r-project.org/package=bbw) +[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/bbw)](https://cran.r-project.org/package=bbw){.pkgdown-release} +[![cran checks](https://badges.cranchecks.info/worst/bbw.svg)](https://cran.r-project.org/web/checks/check_results_bbw.html) [![CRAN](https://img.shields.io/cran/l/bbw.svg)](https://CRAN.R-project.org/package=bbw) [![CRAN](http://cranlogs.r-pkg.org/badges/bbw)](https://CRAN.R-project.org/package=bbw) [![CRAN](http://cranlogs.r-pkg.org/badges/grand-total/bbw)](https://CRAN.R-project.org/package=bbw) [![R-CMD-check](https://github.com/rapidsurveys/bbw/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rapidsurveys/bbw/actions/workflows/R-CMD-check.yaml) [![test-coverage](https://github.com/rapidsurveys/bbw/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/rapidsurveys/bbw/actions/workflows/test-coverage.yaml) -[![codecov](https://codecov.io/gh/rapidsurveys/bbw/graph/badge.svg?token=edgQexvxhi)](https://app.codecov.io/gh/rapidsurveys/bbw) +[![Codecov test coverage](https://codecov.io/gh/rapidsurveys/bbw/graph/badge.svg)](https://app.codecov.io/gh/rapidsurveys/bbw) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/bbw/badge)](https://www.codefactor.io/repository/github/rapidsurveys/bbw) -[![DOI](https://zenodo.org/badge/117305174.svg)](https://doi.org/10.5281/zenodo.6594797) +[![DOI](https://zenodo.org/badge/117305174.svg)](https://doi.org/10.5281/zenodo.6594797){.pkgdown-release} +[![DOI](https://img.shields.io/badge/DOI-10.32614/CRAN.package.bbw-blue)](https://doi.org/10.32614/CRAN.package.bbw){.pkgdown-release} ## Overview -The **blocked weighted bootstrap** is an estimation technique for use with data from two-stage cluster sampled surveys in which either prior weighting (e.g. *population-proportional sampling* or *PPS* as used in [Standardized Monitoring and Assessment of Relief and Transitions (SMART)](https://smartmethodology.org/) surveys) or *posterior weighting* (e.g. as used in [Rapid Assessment Method (RAM)](https://rapidsurveys.io/ramOPmanual/) and [Simple Spatial Sampling Method (S3M)](https://researchonline.lshtm.ac.uk/id/eprint/2572543) surveys) is implemented. +The **blocked weighted bootstrap** is an estimation technique for use with data from two-stage cluster sampled surveys in which either prior weighting (e.g. *population-proportional sampling* or *PPS* as used in Standardized Monitoring and Assessment of Relief and Transitions or SMART surveys) or *posterior weighting* (e.g. as used in [Rapid Assessment Method (RAM)](https://rapidsurveys.io/ramOPmanual/) and [Simple Spatial Sampling Method (S3M)](https://researchonline.lshtm.ac.uk/id/eprint/2572543) surveys) is implemented. ## Installation -You can install `{bbw}` from CRAN with: +::: {.pkgdown-release} +You can install `{bbw}` from [CRAN](https://cran.r-project.org) with: -```{r install_cran, eval = FALSE} +```R install.packages("bbw") ``` +::: -You can install the current development version of `{bbw}` from the [RapidSurveys R Universe](https://rapidsurveys.r-universe.dev) with: +::: {.pkgdown-devel} +You can install the latest development version of `{bbw}` through GitHub via the `{pak}` package with: -```{r install_universe, eval = FALSE} -install.packages("bbw", repos = "https://rapidsurveys.r-universe.dev") +```R +if (!require(pak)) install.packages("pak") +pak::pak("rapidsurveys/bbw") ``` -or through GitHub via the `{pak}` package with: +You can also install `{bbw}` from the [RapidSurveys R Universe](https://rapidsurveys.r-universe.dev) with: -```{r install_github, eval = FALSE} -if(!require(pak)) install.packages("pak") -pak::pak("rapidsurveys/bbw") +```R +install.packages( + "bbw", + repos = c( + "https://rapidsurveys.r-universe.dev", "https://cloud.r-project.org" + ) +) ``` +::: + ## Usage `{bbw}` as used in RAM and S3M is a modification to the *percentile bootstrap* to include *blocking* and *weighting* to account for a *complex sample design*. @@ -80,7 +92,7 @@ The main reason to use `{bbw}` is that the bootstrap allows a wider range statis ## Citation -If you use the {bbw} package in your work, please cite using the suggested citation provided by a call to the `citation()` function as follows: +If you use the `{bbw}` package in your work, please cite using the suggested citation provided by a call to the `citation()` function as follows: ```{r cite} citation("bbw") diff --git a/README.md b/README.md index 70f64e9..b672573 100644 --- a/README.md +++ b/README.md @@ -10,52 +10,75 @@ state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) -[![CRAN](https://img.shields.io/cran/v/bbw.svg)](https://cran.r-project.org/package=bbw) + [![cran +checks](https://badges.cranchecks.info/worst/bbw.svg)](https://cran.r-project.org/web/checks/check_results_bbw.html) [![CRAN](https://img.shields.io/cran/l/bbw.svg)](https://CRAN.R-project.org/package=bbw) [![CRAN](http://cranlogs.r-pkg.org/badges/bbw)](https://CRAN.R-project.org/package=bbw) [![CRAN](http://cranlogs.r-pkg.org/badges/grand-total/bbw)](https://CRAN.R-project.org/package=bbw) [![R-CMD-check](https://github.com/rapidsurveys/bbw/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rapidsurveys/bbw/actions/workflows/R-CMD-check.yaml) [![test-coverage](https://github.com/rapidsurveys/bbw/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/rapidsurveys/bbw/actions/workflows/test-coverage.yaml) -[![codecov](https://codecov.io/gh/rapidsurveys/bbw/graph/badge.svg?token=edgQexvxhi)](https://app.codecov.io/gh/rapidsurveys/bbw) +[![Codecov test +coverage](https://codecov.io/gh/rapidsurveys/bbw/graph/badge.svg)](https://app.codecov.io/gh/rapidsurveys/bbw) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/bbw/badge)](https://www.codefactor.io/repository/github/rapidsurveys/bbw) -[![DOI](https://zenodo.org/badge/117305174.svg)](https://doi.org/10.5281/zenodo.6594797) - +DOI + ## Overview The **blocked weighted bootstrap** is an estimation technique for use with data from two-stage cluster sampled surveys in which either prior weighting (e.g. *population-proportional sampling* or *PPS* as used in -[Standardized Monitoring and Assessment of Relief and Transitions -(SMART)](https://smartmethodology.org/) surveys) or *posterior -weighting* (e.g. as used in [Rapid Assessment Method -(RAM)](https://rapidsurveys.io/ramOPmanual/) and [Simple Spatial -Sampling Method +Standardized Monitoring and Assessment of Relief and Transitions or +SMART surveys) or *posterior weighting* (e.g. as used in [Rapid +Assessment Method (RAM)](https://rapidsurveys.io/ramOPmanual/) and +[Simple Spatial Sampling Method (S3M)](https://researchonline.lshtm.ac.uk/id/eprint/2572543) surveys) is implemented. ## Installation -You can install `{bbw}` from CRAN with: +
+ +You can install `{bbw}` from [CRAN](https://cran.r-project.org) with: ``` r install.packages("bbw") ``` -You can install the current development version of `{bbw}` from the -[RapidSurveys R Universe](https://rapidsurveys.r-universe.dev) with: +
+ +
+ +You can install the latest development version of `{bbw}` through GitHub +via the `{pak}` package with: ``` r -install.packages("bbw", repos = "https://rapidsurveys.r-universe.dev") +if (!require(pak)) install.packages("pak") +pak::pak("rapidsurveys/bbw") ``` -or through GitHub via the `{pak}` package with: +You can also install `{bbw}` from the [RapidSurveys R +Universe](https://rapidsurveys.r-universe.dev) with: ``` r -if(!require(pak)) install.packages("pak") -pak::pak("rapidsurveys/bbw") +install.packages( + "bbw", + repos = c( + "https://rapidsurveys.r-universe.dev", "https://cloud.r-project.org" + ) +) ``` +
+ ## Usage `{bbw}` as used in RAM and S3M is a modification to the *percentile @@ -68,24 +91,21 @@ for the sample design. A blocked weighted bootstrap can be used:
- - **Blocked**: The block corresponds to the primary sampling unit - (*PSU = cluster*). PSUs are resampled with replacement. Observations - within the resampled PSUs are also sampled with replacement. +- **Blocked**: The block corresponds to the primary sampling unit (*PSU + = cluster*). PSUs are resampled with replacement. Observations within + the resampled PSUs are also sampled with replacement. - - **Weighted**: RAM and S3M samples do not use population proportional - sampling (PPS) to weight the sample prior to data collection - (e.g. as is done with SMART surveys). This means that a posterior - weighting procedure is required. `{bbw}` uses a *“roulette wheel”* - algorithm (see [illustration below](#fig1)) to weight (i.e. by - population) the selection probability of PSUs in bootstrap - replicates. +- **Weighted**: RAM and S3M samples do not use population proportional + sampling (PPS) to weight the sample prior to data collection (e.g. as + is done with SMART surveys). This means that a posterior weighting + procedure is required. `{bbw}` uses a *“roulette wheel”* algorithm + (see [illustration below](#fig1)) to weight (i.e. by population) the + selection probability of PSUs in bootstrap replicates. -

Roulette wheel algorithm -

In the case of prior weighting by PPS all clusters are given the same @@ -113,7 +133,7 @@ hypothesis tests to be used with complex sample survey data. ## Citation -If you use the {bbw} package in your work, please cite using the +If you use the `{bbw}` package in your work, please cite using the suggested citation provided by a call to the `citation()` function as follows: @@ -121,9 +141,9 @@ follows: citation("bbw") #> To cite bbw in publications use: #> -#> Mark Myatt, Ernest Guevarra (2025). _bbw: Blocked Weighted +#> Mark Myatt, Ernest Guevarra (2026). _bbw: Blocked Weighted #> Bootstrap_. doi:10.5281/zenodo.6594797 -#> , R package version 0.3.0, +#> , R package version 0.3.1, #> . #> #> A BibTeX entry for LaTeX users is @@ -131,8 +151,8 @@ citation("bbw") #> @Manual{, #> title = {bbw: Blocked Weighted Bootstrap}, #> author = {{Mark Myatt} and {Ernest Guevarra}}, -#> year = {2025}, -#> note = {R package version 0.3.0}, +#> year = {2026}, +#> note = {R package version 0.3.1}, #> url = {https://rapidsurveys.io/bbw/}, #> doi = {10.5281/zenodo.6594797}, #> } diff --git a/cran-comments.md b/cran-comments.md index a358522..0f8d177 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,32 +1,20 @@ ## Release summary -This is the third CRAN release of `bbw`. In this release: - -* added alternative set of boot functions that implement vectorised and parallel resampling algorithm with option for stratification - -* added functions for percentile estimation from bootstrap replicates - -* added function for post-stratification estimation - -* improved function documentation - -* improved information, warning, and error messages - -* improved vignettes +This is the fourth CRAN release of `bbw`. This is a patch release to address the CRAN NOTE regarding the missing dependency to R >= 4.2.0 because of the package using the pipe placeholder syntax added in R 4.2.0. ## Test environments -* local OS X install, R 4.4.2 -* local ubuntu 22.04 install, R 4.4.2 -* win-builder (devel, release and old release) +* local OS X install, R 4.5.2 +* local ubuntu 22.04 install, R 4.5.2 +* win-builder (devel, release, and old release) * github actions windows-latest, r: release * github actions macOS-latest, r: release -* github actions ubuntu-20.04, r: release, devel, old release +* github actions ubuntu-24.04, r: release, devel, old release * rhub windows-latest r devel -* rhub ubuntu 22.04 r devel +* rhub ubuntu 24.04 r devel * rhub macos r devel * rhub macos-arm64 r devel - +* macbuilder (devel) ## R CMD check results @@ -34,10 +22,20 @@ This is the third CRAN release of `bbw`. In this release: 0 errors | 0 warnings | 0 notes -### win-builder checks +### win-builder checks - devel and release 0 errors | 0 warnings | 0 notes +### win-builder checks - old release + +0 errors | 0 warnings | 1 note + +Author field differs from that derived from Authors@R + Author: 'Ernest Guevarra [aut, cre] (ORCID: )' + Authors@R: 'Ernest Guevarra [aut, cre] ()' + +Both ORCID information are the same but formatted differently. + ### GitHub Actions checks 0 errors | 0 warnings | 0 notes @@ -46,8 +44,11 @@ This is the third CRAN release of `bbw`. In this release: 0 errors | 0 warnings | 0 notes +### macbuilder checks + +0 errors | 0 warnings | 0 notes + ## Reverse dependencies -`bbw` doesn't have any downstream / reverse dependencies -(see https://github.com/rapidsurveys/bbw/tree/main/revdep) +`bbw` has one downstream / reverse dependency with no issues arising with the proposed update (see https://github.com/rapidsurveys/bbw/tree/main/revdep) diff --git a/inst/CITATION b/inst/CITATION index 668ac78..13b62ea 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -3,8 +3,8 @@ bibentry( header = "To cite bbw in publications use:", title = "bbw: Blocked Weighted Bootstrap", author = c(person("Mark Myatt"), person("Ernest Guevarra")), - year = "2025", - note = "R package version 0.3.0", + year = "2026", + note = "R package version 0.3.1", url = "https://rapidsurveys.io/bbw/", doi = "10.5281/zenodo.6594797" -) \ No newline at end of file +) diff --git a/inst/WORDLIST b/inst/WORDLIST index 2ab9ff7..7e222ac 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -3,6 +3,7 @@ Bakool Boateng CMD CodeFactor +Codecov DL Fairhurst FeFol @@ -25,9 +26,10 @@ Sankar Shabelle Siling Sodani -codecov +cran df doi +pkgdown psu runtimes sd diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 8aec48c..0a6a18f 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -8,17 +8,27 @@ development: template: bootstrap: 5 theme: breeze-light - ganalytics: "G-77JJCGSCV3" bslib: bootswatch: sandstone primary: "#A41034" + includes: + in_header: | + + + navbar: bg: primary type: light structure: left: [home, intro, reference, articles, news] - right: [search, mastodon, linkedin, github] + right: [search, github] components: articles: text: Articles @@ -27,14 +37,15 @@ navbar: href: articles/bbw-estimation.html - text: "Using bbw with parallel computation" href: articles/bbw-parallel.html - mastodon: - icon: "fab fa-mastodon fa-lg" - aria-label: Mastodon - href: https://fosstodon.org/@katilingban - linkedin: - icon: "fab fa-linkedin fa-lg" - aria-label: LinkedIn - href: https://www.linkedin.com/company/katilingban + # mastodon: + # icon: "fab fa-mastodon fa-lg" + # aria-label: Mastodon + # href: https://fosstodon.org/@katilingban + # bluesky: + # icon: "fab fa-bluesky fa-lg" + # aria-label: Bluesky + # href: https://bsky.app/profile/katilingban.io + home: #links: diff --git a/revdep/README.md b/revdep/README.md index 306344f..53ae6ed 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,82 +1,96 @@ # Platform -|field |value | -|:--------|:-----------------------------------| -|version |R version 4.4.2 (2024-10-31) | -|os |Pop!_OS 22.04 LTS | -|system |x86_64, linux-gnu | -|ui |X11 | -|language |(EN) | -|collate |en_GB.UTF-8 | -|ctype |en_GB.UTF-8 | -|tz |Europe/London | -|date |2025-01-15 | -|pandoc |2.9.2.1 @ /usr/bin/ (via rmarkdown) | +|field |value | +|:--------|:---------------------------------| +|version |R version 4.5.2 (2025-10-31) | +|os |Pop!_OS 22.04 LTS | +|system |x86_64, linux-gnu | +|ui |Positron | +|language |(EN) | +|collate |en_GB.UTF-8 | +|ctype |en_GB.UTF-8 | +|tz |Europe/London | +|date |2026-01-20 | +|pandoc |3.8.3 @ /usr/bin/ (via rmarkdown) | +|quarto |1.8.26 @ /opt/quarto/bin/quarto | # Dependencies |package |old |new |Δ | |:--------------|:----------|:----------|:--| -|bbw |0.2.0 |0.3.0 |* | +|bbw |0.3.0 |0.3.1 |* | |abind |1.4-8 |1.4-8 | | |backports |1.5.0 |1.5.0 | | -|broom |1.0.7 |1.0.7 | | +|broom |1.0.11 |1.0.11 | | |car |3.1-3 |3.1-3 | | |carData |3.0-5 |3.0-5 | | -|cli |3.6.3 |3.6.3 | | -|colorspace |2.1-1 |2.1-1 | | -|cowplot |1.1.3 |1.1.3 | | -|cpp11 |0.5.1 |0.5.1 | | -|Deriv |4.1.6 |4.1.6 | | -|doBy |4.6.24 |4.6.24 | | -|doParallel |NA |1.0.17 |* | +|cli |3.6.5 |3.6.5 | | +|colorspace |2.1-2 |2.1-2 | | +|cowplot |1.2.0 |1.2.0 | | +|cpp11 |0.5.3 |0.5.3 | | +|curl |7.0.0 |7.0.0 | | +|Deriv |4.2.0 |4.2.0 | | +|doBy |4.7.1 |4.7.1 | | +|doParallel |1.0.17 |1.0.17 | | |dplyr |1.1.4 |1.1.4 | | -|fansi |1.0.6 |1.0.6 | | |farver |2.1.2 |2.1.2 | | -|foreach |NA |1.5.2 |* | +|foreach |1.5.2 |1.5.2 | | +|forecast |9.0.0 |9.0.0 | | |Formula |1.2-5 |1.2-5 | | -|generics |0.1.3 |0.1.3 | | -|ggplot2 |3.5.1 |3.5.1 | | +|fracdiff |1.5-3 |1.5-3 | | +|generics |0.1.4 |0.1.4 | | +|ggplot2 |4.0.1 |4.0.1 | | |glue |1.8.0 |1.8.0 | | |gtable |0.3.6 |0.3.6 | | -|isoband |0.2.7 |0.2.7 | | -|iterators |NA |1.0.14 |* | +|isoband |0.3.0 |0.3.0 | | +|iterators |1.0.14 |1.0.14 | | +|jsonlite |2.0.0 |2.0.0 | | |labeling |0.4.3 |0.4.3 | | -|lifecycle |1.0.4 |1.0.4 | | -|lme4 |1.1-36 |1.1-36 | | -|magrittr |2.0.3 |2.0.3 | | -|MatrixModels |0.5-3 |0.5-3 | | +|lifecycle |1.0.5 |1.0.5 | | +|lme4 |1.1-38 |1.1-38 | | +|lmtest |0.9-40 |0.9-40 | | +|magrittr |2.0.4 |2.0.4 | | +|MatrixModels |0.5-4 |0.5-4 | | |microbenchmark |1.5.0 |1.5.0 | | |minqa |1.2.8 |1.2.8 | | |modelr |0.1.11 |0.1.11 | | -|munsell |0.5.1 |0.5.1 | | -|nloptr |2.1.1 |2.1.1 | | +|nloptr |2.2.1 |2.2.1 | | |numDeriv |2016.8-1.1 |2016.8-1.1 | | -|parallelly |NA |1.41.0 |* | -|pbkrtest |0.5.3 |0.5.3 | | -|pillar |1.10.1 |1.10.1 | | +|parallelly |1.46.1 |1.46.1 | | +|pbkrtest |0.5.5 |0.5.5 | | +|pillar |1.11.1 |1.11.1 | | |pkgconfig |2.0.3 |2.0.3 | | -|purrr |1.0.2 |1.0.2 | | -|quantreg |5.99.1 |5.99.1 | | -|R6 |2.5.1 |2.5.1 | | -|rbibutils |2.3 |2.3 | | +|purrr |1.2.1 |1.2.1 | | +|quadprog |1.5-8 |1.5-8 | | +|quantmod |0.4.28 |0.4.28 | | +|quantreg |6.1 |6.1 | | +|R6 |2.6.1 |2.6.1 | | +|rbibutils |2.4 |2.4 | | |RColorBrewer |1.1-3 |1.1-3 | | -|Rcpp |1.0.14 |1.0.14 | | +|Rcpp |1.1.1 |1.1.1 | | +|RcppArmadillo |15.2.3-1 |15.2.3-1 | | |RcppEigen |0.3.4.0.2 |0.3.4.0.2 | | -|Rdpack |2.6.2 |2.6.2 | | -|reformulas |0.4.0 |0.4.0 | | -|rlang |1.1.4 |1.1.4 | | -|scales |1.3.0 |1.3.0 | | +|Rdpack |2.6.4 |2.6.4 | | +|reformulas |0.4.3.1 |0.4.3.1 | | +|rlang |1.1.7 |1.1.7 | | +|S7 |0.2.1 |0.2.1 | | +|scales |1.4.0 |1.4.0 | | |SparseM |1.84-2 |1.84-2 | | -|stringi |1.8.4 |1.8.4 | | -|stringr |1.5.1 |1.5.1 | | -|tibble |3.2.1 |3.2.1 | | -|tidyr |1.3.1 |1.3.1 | | +|stringi |1.8.7 |1.8.7 | | +|stringr |1.6.0 |1.6.0 | | +|tibble |3.3.1 |3.3.1 | | +|tidyr |1.3.2 |1.3.2 | | |tidyselect |1.2.1 |1.2.1 | | -|utf8 |1.2.4 |1.2.4 | | -|vctrs |0.6.5 |0.6.5 | | +|timeDate |4051.111 |4051.111 | | +|tseries |0.10-59 |0.10-59 | | +|TTR |0.24.4 |0.24.4 | | +|urca |1.3-4 |1.3-4 | | +|utf8 |1.2.6 |1.2.6 | | +|vctrs |0.7.0 |0.7.0 | | |viridisLite |0.4.2 |0.4.2 | | |withr |3.0.2 |3.0.2 | | +|xts |0.14.1 |0.14.1 | | +|zoo |1.8-15 |1.8-15 | | # Revdeps diff --git a/revdep/cran.md b/revdep/cran.md index 33114b6..62d1ce4 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -1,6 +1,6 @@ ## revdepcheck results -We checked 0 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. +We checked 1 reverse dependencies (0 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. * We saw 0 new problems * We failed to check 0 packages diff --git a/vignettes/bbw.Rmd b/vignettes/bbw.Rmd index 68aca40..3441423 100644 --- a/vignettes/bbw.Rmd +++ b/vignettes/bbw.Rmd @@ -16,7 +16,7 @@ knitr::opts_chunk$set( ) ``` -The **blocked weighted bootstrap** is an estimation technique for use with data from two-stage cluster sampled surveys in which either prior weighting (e.g. *population-proportional sampling (PPS)* as used in [Standardized Monitoring and Assessment of Relief and Transitions (SMART)](https://smartmethodology.org/) surveys) or *posterior weighting* (e.g. as used in [Rapid Assessment Method (RAM)](https://rapidsurveys.io/ramOPmanual/) and [Simple Spatial Sampling Method (S3M)](https://researchonline.lshtm.ac.uk/id/eprint/2572543)surveys). +The **blocked weighted bootstrap** is an estimation technique for use with data from two-stage cluster sampled surveys in which either prior weighting (e.g. *population-proportional sampling (PPS)* as used in Standardized Monitoring and Assessment of Relief and Transitions (SMART) or *posterior weighting* (e.g. as used in [Rapid Assessment Method (RAM)](https://rapidsurveys.io/ramOPmanual/) and [Simple Spatial Sampling Method (S3M)](https://researchonline.lshtm.ac.uk/id/eprint/2572543)surveys). ## Features of blocked weighted bootstrap @@ -69,7 +69,7 @@ and used a large number (e.g. `3999`) survey replicates. Next versions (up to *v
-The current version (*v0.3.0*) now includes further improvements in computational efficiency using a vectorised algorithm and provides an option for parallel computation which when used reduces the computational overhead by at least 80%. +The current version (*v0.3.0* and later) now includes further improvements in computational efficiency using a vectorised algorithm and provides an option for parallel computation which when used reduces the computational overhead by at least 80%. ## Advantages