Skip to content

Commit

Permalink
updated NEWS and rmeoved huge data file in testthat
Browse files Browse the repository at this point in the history
  • Loading branch information
n8thangreen committed Oct 27, 2021
1 parent cf14b51 commit c91f809
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 61 deletions.
67 changes: 39 additions & 28 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,55 @@
# BCEA 2.3-2
Oct 2021

* Major refactoring of code base to improve robustness and extensibility.
* `bcea()` is now a helper function which calls the constructor `new_bcea()`, separating concerns.
* `new_bcea()` composed of smaller HEE statistics functions with names starting with `compute_` e.g. `compute_CEAC()`, `compute_EIB()`,.... This allows us to call and test them individually.
## Major refactoring

Code base improved robustness and extensibility.
* `bcea()` is now a helper function which calls the constructor `new_bcea()`, separating concerns.
* `new_bcea()` composed of smaller HEE statistics functions with names starting with `compute_*` e.g. `compute_CEAC()`, `compute_EIB()`,.... This allows us to call and test them individually.
It also allows more flexibility in changing or adding functionality to `new_bcea()`.
* Plotting functions have been rewritten. These functions now simply dispatch to the base R, ggplot2 or plotly versions (think strategy pattern).
* Plotting functions have been rewritten. These functions now simply dispatch to the base R, ggplot2 or plotly versions (think strategy pattern).
Internally, these functions, e.g.`ceplane_plot_ggplot()`, are also split into parameter and data setting and plotting components.
This modulisation allows us to add new layers to plots or modify existing parameter sets and defaults. We could also return the data without the plotting step as in e.g. `ggplot2::autoplot()`.
It also means we can reuse some functionality across plots such as axes and legend setting e.g. `BCEA:::where_legend()`.
* Plots and tables using S3 methods for `bcea` type object.
* New vignettes about plotting and comparison intervention setting.
* Tables updated. Duplication in `summary()` and `sim_table()` removed.
* `createInputs()` used for EVPI calculation now dispatches S3 methods by JAGS, BUGS, Stan and other R data types.
* `ceac_plot()` changes
* Deprecated `mce.plot()`. Now dispatched on `ceac.plot()` for both `multi.ce()` and `bcea()` outputs.
* For a multiple comparison the plot for pairwise comparison over all interventions is returned by default. The alternative version of each comparison against the reference group is still available.* Plots and tables using S3 methods for `bcea` type object.
* New vignettes about plotting and comparison intervention setting.
* Tables updated. Duplication in `summary()` and `sim_table()` removed.
* `createInputs()` used for EVPI calculation now dispatches S3 methods by JAGS, BUGS, Stan and other R data types.
* `make.report()` rewritten to have separate section files.

## New features

* Extend ways to set comparison interventions. Subsets of comparison can still be set in a call to a plotting function as before.
Now subsets can be set in both the original `bcea()` construction or separately using a setter functions `setComparisons()`.
* Similarly, maximum willingness to pay and the reference group can be set with `setKmax()` and `setReferenceGroup()`, respectively.
* `multi.ce()` and `CEriskAv()` also now work similarly. They operate by modifying the `bcea` object, rather than creating new one (think decorator pattern).
* `ceac_plot()` changes
* Deprecated `mce.plot()`. Now dispatched on `ceac.plot()` for both `multi.ce()` and `bcea()` outputs.
* For a multiple comparison the plot for pairwise comparison over all interventions is returned by default.
The alternative version of each comparison against the reference group is still available.
* `bcea()` methods for jags, WinBUGS, Stan (#76)

## Miscellaneous

* Additional help documentation and examples.
* `make.report()` rewritten to have separate section files.
* Testing suite started. This is not comprehensive as of yet.
* Added a `NEWS.md` file to track changes to the package.
Details about previous releases, such as dates, versions, fixes and enhancements obtained from CRAN and code comments so a little patchy.
* Added a `NEWS.md` file to track changes to the package. Details about previous releases, such as dates, versions, fixes and enhancements obtained from CRAN and code comments so a little patchy.
* `pkgdown` GitHub site made.
* Cheatsheet written and published on RStudio site.
* Cheatsheet written and published on RStudio site (#22).
* Dependency package **ldr** removed from **BCEA** because it was removed from CRAN (#74)





# BCEA 2.3-1.1
26 Aug 2019

# BCEA 2.3-1
5 Aug 2019

# BCEA 2.2-6
11 July 2018

* Fix in `evppi` to allow N to be selected in all methods
* Fix in `evppi` to allow `N` to be selected in all methods
* Fix `diag.evppi`

# BCEA 2.2-5
Expand All @@ -49,13 +60,13 @@ Details about previous releases, such as dates, versions, fixes and enhancements
# BCEA 2.2.4
Nov 2016

* Fixes for new ggplot2 version (`legend.spacing()` and `plot.title` hjust argument)
* Fixes for new ggplot2 version (`legend.spacing()` and `plot.title` `hjust` argument)

# BCEA 2.2-3
22 May 2016

* Major update for the EVPPI to include PFC
* Fixed issues with info.rank
* Fixed issues with `info.rank`

# BCEA 2.2-2
25 Jan 2016
Expand All @@ -77,16 +88,16 @@ Oct 2015
6 May 2015 2015

* New function for EVPPI using SPDE-INLA
* Modifications to the EVPPI functions
* Modifications to the EVPPI functions
* Documentation updated
* Allows xlim & ylim in the `ceplane.plot`, `contour` and `contour2` functions
* It is now possible to run bcea for a scalar wtp
* Old evppi function and method has been renamed `evppi0`, which means there's also a new `plot.evppi0` method
* Allows `xlim` & `ylim` in the `ceplane.plot`, `contour` and `contour2` functions
* It is now possible to run `bcea` for a scalar wtp
* Old `evppi` function and method has been renamed `evppi0`, which means there's also a new `plot.evppi0` method

# BCEA 2.1-0
13 Jan 2015

* Migrated from `if(require())` to `if(requireNamespace(,quietly=TRUE))`
* Migrated from `if (require())` to `if (requireNamespace(,quietly=TRUE))`
* Documentation updated
* Added threshold argument to `ceef.plot` function

Expand Down Expand Up @@ -123,7 +134,7 @@ Oct 2014
* Implements two quick and general methods to compute the EVPPI
* Function `CreateInputs()`, which takes as input an object in the class rjags or bugs
* Compute the EVPPI for one or more parameters calling the function `evppi()`
* Results can be visualised using the specific method plot for the class evppi and show the overall EVPI with the EVPPI for the selected parameter(s)
* Results can be visualised using the specific method plot for the class `evppi` and show the overall EVPI with the EVPPI for the selected parameter(s)

# BCEA 1.3-1

Expand Down
Binary file modified tests/testthat/Rplots.pdf
Binary file not shown.
24 changes: 0 additions & 24 deletions tests/testthat/_snaps/summary.md

This file was deleted.

Binary file removed tests/testthat/bcea_vaccine.RData
Binary file not shown.
17 changes: 8 additions & 9 deletions tests/testthat/test-summary.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

# library(BCEA)

##TODO:
# data(Vaccine, package = "BCEA")
# he <- bcea(e = e, c = c, interventions = treats, ref = 2)
# save(he, file = "tests/testthat/bcea_vaccine.RData")

test_that("vaccine data", {
load(test_path("bcea_vaccine.RData"))

testthat::local_edition(3)
expect_snapshot_output(summary(he))
})
# he <- bcea(eff = e, cost = c, interventions = treats, ref = 2)
#
# test_that("vaccine data", {
#
# testthat::local_edition(3)
# expect_snapshot_output(summary(he))
# })

# test_that("smoking data", {
# load("bcea_smoking.RData")
Expand Down

0 comments on commit c91f809

Please sign in to comment.