Skip to content

Commit

Permalink
19: Make ready for release (#25)
Browse files Browse the repository at this point in the history
* fill README

* add reference to description

* switch URL to pkgdown

* use sticker

* clean NEWS

* just line wrap

* removing roxytypes and roxylint from Suggests and remove Remotes
  • Loading branch information
danielinteractive authored Feb 16, 2024
1 parent 85e78e2 commit e077e9b
Show file tree
Hide file tree
Showing 9 changed files with 182 additions and 62 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ coverage.*
init.sh
workflows.md
images
^README\.Rmd$
^data-raw$
^node_modules$
15 changes: 14 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ repos:
rev: v4.0.0-alpha.8
hooks:
- id: prettier
exclude: >
(?x)^(
README.md
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand All @@ -65,7 +69,11 @@ repos:
- id: end-of-file-fixer
exclude: '\.Rd'
- id: trailing-whitespace
exclude: '\.Rd'
exclude: >
(?x)^(
.*\.Rd|
README.md
)$
- id: check-yaml
- id: no-commit-to-branch
- id: mixed-line-ending
Expand All @@ -87,3 +95,8 @@ repos:
rev: v0.39.0
hooks:
- id: markdownlint
exclude: >
(?x)^(
README.md|
NEWS.md
)$
26 changes: 11 additions & 15 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ Authors@R: c(
person("Thomas", "Kuenzel", email = "[email protected]", role = c("aut", "cre")),
person("Kaspar", "Rufibach", email = "[email protected]", role = "aut"),
person("Regina", "Stegherr", email = "[email protected]", role = "aut"),
person("Daniel", "Sabanes Bove", email = "[email protected]", role = "aut"),
person("Daniel", "Sabanés Bové", email = "[email protected]", role = "aut"),
person("F. Hoffmann-La Roche AG", role = c("cph", "fnd")),
person("Universität Ulm", role = c("cph", "fnd"))
)
Description: The SAVVY project is a consortium of academic and pharmaceutical
industry partners that aims to improve the analyses of adverse event (AE)
data in clinical trials through the use of survival techniques appropriately
dealing with varying follow-up times and competing events.
Although statistical methodologies have advanced, in AE analyses often
the incidence proportion, the incidence density or a non-parametric
Kaplan-Meier estimator are used, which either ignore censoring or
dealing with varying follow-up times and competing events, see
Stegherr, Schmoor, Beyersmann, et al. (2021) <doi:10.1186/s13063-021-05354-x>.
Although statistical methodologies have advanced,
in AE analyses often the incidence proportion, the incidence density or a
non-parametric Kaplan-Meier estimator are used, which either ignore censoring or
competing events. This package contains functions to easily conduct the
proposed improved AE analyses.
License: Apache License 2.0
URL: https://github.com/openpharma/savvyr/
URL: https://openpharma.github.io/savvyr/
BugReports: https://github.com/openpharma/savvyr/issues
Depends:
R (>= 3.6)
R (>= 4.0)
Imports:
checkmate,
etm,
Expand All @@ -33,15 +34,10 @@ Suggests:
kableExtra,
knitr,
rmarkdown,
testthat (>= 2.0),
roxytypes,
roxylint
Remotes:
openpharma/roxytypes,
openpharma/roxylint,
testthat (>= 3.0)
Config/Needs/documentation:
roxytypes,
roxylint
roxytypes=github::openpharma/roxytypes,
roxylint=github::openpharma/roxylint
RdMacros:
Rdpack
VignetteBuilder:
Expand Down
14 changes: 5 additions & 9 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# savvyr 0.1.0

### New features
- First CRAN version of the package.
- The package provides functions to easily conduct the improved AE analyses proposed by the SAVVY framework.

* Add an initializer script.
### New Features

### Enhancements

* Documentation on how to use the initialize a package.

### Bug fixes

* None.
- Estimators that do not account for competing events (incidence proportion, incidence density, Inverse Kaplan Meier).
- Estimators accounting for competing events (incidence proportion accounting for competing events and Aalen-Johansen, both first with death only as hard competing event, or using all competing events).
64 changes: 64 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# savvyr <img src="man/figures/logo.png" align="right" width="175" />

<!-- badges: start -->
[![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)
[![CRAN status](https://www.r-pkg.org/badges/version-last-release/savvyr)](https://www.r-pkg.org/badges/version-last-release/savvyr)
[![CRAN monthly downloads](https://cranlogs.r-pkg.org/badges/savvyr)](https://cranlogs.r-pkg.org/badges/savvyr)
[![CRAN total downloads](https://cranlogs.r-pkg.org/badges/grand-total/savvyr)](https://cranlogs.r-pkg.org/badges/grand-total/savvyr)
[![Code Coverage](https://raw.githubusercontent.com/openpharma/savvyr/_xml_coverage_reports/data/main/badge.svg)](https://raw.githubusercontent.com/openpharma/savvyr/_xml_coverage_reports/data/main/coverage.xml)
<!-- badges: end -->
\

The SAVVY project is a consortium of academic and pharmaceutical
industry partners that aims to improve the analyses of adverse event (AE)
data in clinical trials through the use of survival techniques appropriately
dealing with varying follow-up times and competing events.
Although statistical methodologies have advanced, in AE analyses often
the incidence proportion, the incidence density or a non-parametric
Kaplan-Meier estimator are used, which either ignore censoring or
competing events. The `savvyr` package contains functions to easily conduct the
proposed improved AE analyses.

## Installation

### Release

You can install the current release version from *CRAN* with:

```{r cran-installation, eval = FALSE}
install.packages("savvyr")
```

### Development

You can install the development version of savvyr from [GitHub](https://github.com/) with:

``` r
if (!require("remotes")) {
install.packages("remotes")
}
remotes::install_github("openpharma/savvyr")
```

## Getting Started

See the [introductory vignette](https://openpharma.github.io/savvyr/main/articles/introduction.html) to get started.

## Citing `savvyr`

To cite `savvyr` please see [here](https://openpharma.github.io/savvyr/main/authors.html#citation).
63 changes: 61 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
# savvyr

Short description of the package
<!-- README.md is generated from README.Rmd. Please edit that file -->

# savvyr <img src="man/figures/logo.png" align="right" width="175" />

<!-- badges: start -->

[![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)
[![CRAN
status](https://www.r-pkg.org/badges/version-last-release/savvyr)](https://www.r-pkg.org/badges/version-last-release/savvyr)
[![CRAN monthly
downloads](https://cranlogs.r-pkg.org/badges/savvyr)](https://cranlogs.r-pkg.org/badges/savvyr)
[![CRAN total
downloads](https://cranlogs.r-pkg.org/badges/grand-total/savvyr)](https://cranlogs.r-pkg.org/badges/grand-total/savvyr)
[![Code
Coverage](https://raw.githubusercontent.com/openpharma/savvyr/_xml_coverage_reports/data/main/badge.svg)](https://raw.githubusercontent.com/openpharma/savvyr/_xml_coverage_reports/data/main/coverage.xml)
<!-- badges: end -->

The SAVVY project is a consortium of academic and pharmaceutical
industry partners that aims to improve the analyses of adverse event
(AE) data in clinical trials through the use of survival techniques
appropriately dealing with varying follow-up times and competing events.
Although statistical methodologies have advanced, in AE analyses often
the incidence proportion, the incidence density or a non-parametric
Kaplan-Meier estimator are used, which either ignore censoring or
competing events. The `savvyr` package contains functions to easily
conduct the proposed improved AE analyses.

## Installation

### Release

You can install the current release version from *CRAN* with:

``` r
install.packages("savvyr")
```

### Development

You can install the development version of savvyr from
[GitHub](https://github.com/) with:

``` r
if (!require("remotes")) {
install.packages("remotes")
}
remotes::install_github("openpharma/savvyr")
```

## Getting Started

See the [introductory
vignette](https://openpharma.github.io/savvyr/main/articles/introduction.html)
to get started.

## Citing `savvyr`

To cite `savvyr` please see
[here](https://openpharma.github.io/savvyr/main/authors.html#citation).
21 changes: 4 additions & 17 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,20 @@ AdVerse
AE
al
Beyersmann
BiocCheck
Bove
CMD
Bové
doi
et
Forkers
funder
github
gitleaks
Hoffmann
initializer
Johansen
Kaplan
Kaspar
Kuenzel
L<U+00FC>bbert
Pkgdown
Pre
pre
repo
Roxygen
Rufibach
Sabanes
Sabanés
savvyr
Schmoor
Stegherr
SuperLinter
Ulm
Universit
Universit<U+00E4>t
Universität
VarYing
6 changes: 3 additions & 3 deletions man/savvyr-package.Rd

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

32 changes: 17 additions & 15 deletions vignettes/savvyr_example.Rmd → vignettes/introduction.Rmd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "Estimation of AE probabilities with savvyr"
title: "Introduction to `savvyr`"
package: savvyr
bibliography: "../inst/REFERENCES.bib"
output:
rmarkdown::html_vignette:
toc: true
vignette: |
%\VignetteEncoding{UTF-8}
%\VignetteIndexEntry{Estimation of AE probabilities with savvyr}
%\VignetteIndexEntry{Introduction to `savvyr`}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
chunk_output_type: console
Expand All @@ -22,16 +22,16 @@ library(savvyr)
library(kableExtra)
```



In this vignette we give an introduction how to use `savvyr` to estimate adverse event probabilities using the SAVVY framework.

# Example using dummy data

We generate the dataset $S1$ in @stegherr_meta_analytic_2021 using the parameter
values for Arm A.
First we define sample size and range of censoring times. Then we set the hazard
values for Arm A.
First we define the sample size and a range of censoring times.
Then we set the hazard
of the three event types (adverse event, death/hard competing event and soft
competing event). After the dataset has been generated we set $\tau$ as the
competing event). After the dataset has been generated, we set $\tau$ as the
maximum event time.

```{r, include=TRUE, echo=TRUE}
Expand All @@ -40,12 +40,14 @@ n <- 200
min_cens <- 0
max_cens <- 1000
haz_ae <- 0.00265
haz_death <- 0.00151
haz_soft <- 0.00227
set.seed(2020)
dat1 <- generate_data(n, cens = c(min_cens, max_cens), haz_ae, haz_death, haz_soft)
dat1 <- generate_data(
n,
cens = c(min_cens, max_cens),
haz_ae = 0.00265,
haz_death = 0.00151,
haz_soft = 0.00227
)
tau <- max(dat1[, "time_to_event"])
```
Expand All @@ -56,10 +58,10 @@ The structure of the dataset looks as follows:
kable(head(dat1, 10), align = c("crcr"))
```

For this dataset we then compute all the estimators used in the comparisons
in @stegherr_survival_2021 and @stegherr_estimating_2021.
For this dataset we then compute all the estimators used in the comparisons
in @stegherr_survival_2021 and @stegherr_estimating_2021.
We start with the estimators that do not account for competing events (incidence
proportion, incidence density, Inverse Kaplan Meier), then incidence proportion
proportion, incidence density, Inverse Kaplan Meier), then incidence proportion
accounting for competing events and Aalen-Johansen (both first with death only
as hard competing event, then using all competing events):

Expand Down

0 comments on commit e077e9b

Please sign in to comment.