Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsantiagoquevedo committed May 6, 2024
2 parents 7704a1e + a5dd9a2 commit 9f7b458
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 79 deletions.
23 changes: 17 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,29 @@ Package: vaccineff
Title: Estimate Vaccine Effectiveness Based on Different Study Designs
Version: 0.0.1
Authors@R: c(
person(given = "Zulma M.", family = "Cucunubá", email = "zulma.cucunuba@javeriana.edu.co", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8165-3198")),
person(given = "David Santiago", family = "Quevedo", email = "ex-dsquevedo@javeriana.edu.co", role = c("aut"),
comment = c(ORCID = "0000-0003-1583-4262")),
person(given = "Santiago", family = "Loaiza", email = "santiago.loaiza@javeriana.edu.co", role = c("aut"),
comment = c(ORCID = "0000-0002-2092-3262")),
person(given = "Zulma M.", family = "Cucunubá", email = "zulma.cucunuba@javeriana.edu.co", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8165-3198")),
person("International Development Research Center (IDRC)", role = c("fnd")),
person(given = "Geraldine", family = "Gómez Millán", email = "geralidine.gomez@javeriana.edu.co", role = c("ctb"),
comment = c(ORCID = "0009-0007-8701-0568")),
person(given = "Pratik", family = "Gupte", email = "pratik.gupte@lshtm.ac.uk", role = c("ctb"),
comment = c(ORCID = "0000-0001-5294-7819"))
comment = c(ORCID = "0000-0001-5294-7819")),
person(given = "Érika J", family = "Cantor", email = "erika.cantor@javeriana.edu.co", role = c("ctb"),
comment = c(ORCID = "0000-0003-3320-6032")),
person(given = "Santiago", family = "Loaiza", email = "santiago.loaiza@javeriana.edu.co", role = c("ctb"),
comment = c(ORCID = "0000-0002-2092-3262")),
person(given = "Jaime", family = "Pavlich-Mariscal", email = "jpavlich@javeriana.edu.co", role = c("ctb"),
comment = c(ORCID = "0000-0002-3892-6680")),
person(given = "Hugo", family = "Gruson", email = "hugo.gruson@data.org", role = c("ctb"),
comment = c(ORCID = "0000-0002-4094-1476")),
person(given = "Chris", family = "Hartgerink", email = "chris@data.org", role = "ctb",
comment = c(ORCID = "0000-0003-1050-6809")),
person(given = "Felipe Segundo", family = "Abril", email = "fsabrilb@unal.edu.co", role = "ctb",
comment = c(ORCID = "0000-0002-2512-4929"))
)
Description: Estimate vaccine effectiveness based on different observational study designs, as discussed in Torvaldsen and McIntyre (2020) <doi:10.3316/informit.511798489353134>.
Description: R package with tools for estimating vaccine effectiveness and vaccine related metrics.
URL: https://github.com/epiverse-trace/vaccineff, https://epiverse-trace.github.io/vaccineff/
BugReports: https://github.com/epiverse-trace/vaccineff/issues
License: MIT + file LICENSE
Expand Down
18 changes: 6 additions & 12 deletions R/coh_matching.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,27 +173,21 @@ get_censoring_date_match <- function(data,
data,
min.rows = 1L
)

# check for string type
checkmate::assert_string(outcome_date_col)
checkmate::assert_string(censoring_date_col)

# check for names in data
checkmate::assert_names(
colnames(data),
must.include = c(outcome_date_col, censoring_date_col)
)
# check for subclass
checkmate::expect_names(
colnames(data),
must.include = "subclass",
info = "'subclass' column from match must be included in 'data' to \
identify matched couples."
must.include = c(outcome_date_col, censoring_date_col, "subclass")
)

# check for date type
checkmate::assert_date(data[[outcome_date_col]])
checkmate::assert_date(data[[censoring_date_col]])

# check for string type
checkmate::assert_string(outcome_date_col)
checkmate::assert_string(censoring_date_col)

# create censoring date for every couple indexed by subclass
censoring_date <- unlist(
tapply(data[[censoring_date_col]],
Expand Down
31 changes: 9 additions & 22 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,11 @@ knitr::opts_chunk$set(

<!-- badges: end -->

*{{ packagename }}* is an R package that offers tools for estimating the
vaccine effectiveness, using a series of epidemiological designs including cohort studies, test-negative case-control, and screening
methods [@torvaldsen2020]. The package provides a set of features for preparing the data,
to analyze different study designs and for assessing the performance of
the models.

*{{ packagename }}* is developed at [Pontificia Universidad Javeriana](https://www.javeriana.edu.co/inicio) as part of the
[Epiverse-TRACE initiative](https://data.org/initiatives/epiverse/).

*{{ packagename }}* is an R package that offers tools for estimating vaccine effectiveness, using a series of epidemiological designs including cohort studies, test-negative case-control, and screening methods [@torvaldsen2002]. The current version of the package provides a set of features for preparing, visualizing, and managing cohort data, estimating vaccine effectiveness, and assessing the performance of the models. Test-negative design and screening method will be included in future versions.

## Installation

The current development version of _{{ packagename }}_ can be installed from [GitHub](https://github.com/) using the `pak` package.
Expand All @@ -53,8 +49,8 @@ pak::pak("{{ gh_repo }}")
library(vaccineff)
```

*{{ packagename }}* provides minimal datasets that can be used to test out
each design `(cohortdata, testnegdata, screeningdata)`
*{{ packagename }}* provides a minimal cohort dataset that can be used to test out
the models.

```{r example, include = TRUE, echo = TRUE}
# Load example `cohortdata` included in the package
Expand All @@ -74,25 +70,16 @@ To report a bug or to request a new feature please open an [issue](https://githu

Contributions to _{{ packagename }}_ are welcomed. Please follow the [package contributing guide](https://github.com/{{ gh_repo }}/blob/main/.github/CONTRIBUTING.md).

## Code of conduct

Please note that the _{{ packagename }}_ project is released with a [Contributor Code of Conduct](https://github.com/epiverse-trace/.github/blob/main/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.

## Contributions

Contributors to the project include:

- [David Santiago Quevedo](https://github.com/davidsantiagoquevedo)
(author)
**Authors**: [David Santiago Quevedo](https://github.com/davidsantiagoquevedo) and [Zulma M. Cucunubá](https://github.com/zmcucunuba) (maintainer)

- [Zulma M. Cucunubá](https://github.com/zmcucunuba) (author)
**Contributors**:
[Geraldine Gómez](https://github.com/GeraldineGomez), [Pratik Gupte](https://github.com/pratikunterwegs), [Érika J. Cantor](https://github.com/ErikaCantor), [Santiago Loaiza](https://github.com/santilo9513), [Jaime A. Pavlich-Mariscal](https://github.com/jpavlich), [Hugo Gruson](https://github.com/Bisaloo), [Chris Hartgerink](https://github.com/chartgerink), [Felipe Segundo Abril-Bermúdez](https://github.com/fsabrilb)

- [Santiago Loaiza](https://github.com/santilo9513) (author)

- [Geraldine Gómez](https://github.com/GeraldineGomez) (contributor)

- [Jaime A. Pavlich-Mariscal](https://github.com/jpavlich) (contributor)
## Code of conduct

- [Pratik Gupte](https://github.com/pratikunterwegs) (contributor)
Please note that the _{{ packagename }}_ project is released with a [Contributor Code of Conduct](https://github.com/epiverse-trace/.github/blob/main/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.

## References
79 changes: 43 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ status](https://www.r-pkg.org/badges/version/vaccineff)](https://CRAN.R-project.

<!-- badges: end -->

*vaccineff* is an R package that offers tools for estimating the vaccine
effectiveness, using a series of epidemiological designs including
cohort studies, test-negative case-control, and screening methods
([Torvaldsen and McIntyre 2020](#ref-torvaldsen2020)). The package
provides a set of features for preparing the data, to analyze different
study designs and for assessing the performance of the models.

*vaccineff* is developed at [Pontificia Universidad
Javeriana](https://www.javeriana.edu.co/inicio) as part of the
[Epiverse-TRACE initiative](https://data.org/initiatives/epiverse/).

*vaccineff* is an R package that offers tools for estimating vaccine
effectiveness, using a series of epidemiological designs including
cohort studies, test-negative case-control, and screening methods
([Torvaldsen and McIntyre 2002](#ref-torvaldsen2002)). The current
version of the package provides a set of features for preparing,
visualizing, and managing cohort data, estimating vaccine effectiveness,
and assessing the performance of the models. Test-negative design and
screening method will be included in future versions.

## Installation

The current development version of *vaccineff* can be installed from
Expand All @@ -40,19 +42,25 @@ pak::pak("epiverse-trace/vaccineff")

## Quick start

*vaccineff* provides minimal datasets that can be used to test out each
design `(cohortdata, testnegdata, screeningdata)`
*vaccineff* provides a minimal cohort dataset that can be used to test
out the models.

``` r
# Load example `cohortdata` included in the package
data("cohortdata")
head(cohortdata, 5)
#> sex age subsidy death_date vaccine_date_1 vaccine_date_2 vaccine_1 vaccine_2
#> 1 F 6 0 <NA> <NA> <NA> <NA> <NA>
#> 2 M 79 0 <NA> 2044-03-31 2044-05-07 BRAND2 BRAND2
#> 3 F 34 0 <NA> 2044-07-26 2044-09-03 BRAND2 BRAND2
#> 4 M 26 0 <NA> <NA> <NA> <NA> <NA>
#> 5 F 66 0 <NA> 2044-05-20 2044-06-17 BRAND2 BRAND2
#> id sex age death_date death_other_causes vaccine_date_1 vaccine_date_2
#> 1 afade1b2 F 37 <NA> <NA> <NA> <NA>
#> 2 556c8c76 M 19 <NA> <NA> <NA> <NA>
#> 3 04edf85a M 50 <NA> <NA> <NA> <NA>
#> 4 7e51a18e F 8 <NA> <NA> <NA> <NA>
#> 5 c5a83f56 M 66 <NA> <NA> <NA> <NA>
#> vaccine_1 vaccine_2
#> 1 <NA> <NA>
#> 2 <NA> <NA>
#> 3 <NA> <NA>
#> 4 <NA> <NA>
#> 5 <NA> <NA>
```

## Package vignettes
Expand All @@ -73,40 +81,39 @@ Contributions to *vaccineff* are welcomed. Please follow the [package
contributing
guide](https://github.com/epiverse-trace/vaccineff/blob/main/.github/CONTRIBUTING.md).

Contributors to the project include:

**Authors**: [David Santiago
Quevedo](https://github.com/davidsantiagoquevedo) and [Zulma M.
Cucunubá](https://github.com/zmcucunuba) (maintainer)

**Contributors**: [Geraldine Gómez](https://github.com/GeraldineGomez),
[Pratik Gupte](https://github.com/pratikunterwegs), [Érika J.
Cantor](https://github.com/ErikaCantor), [Santiago
Loaiza](https://github.com/santilo9513), [Jaime A.
Pavlich-Mariscal](https://github.com/jpavlich), [Hugo
Gruson](https://github.com/Bisaloo), [Chris
Hartgerink](https://github.com/chartgerink), [Felipe Segundo
Abril-Bermúdez](https://github.com/fsabrilb)

## Code of conduct

Please note that the *vaccineff* project is released with a [Contributor
Code of
Conduct](https://github.com/epiverse-trace/.github/blob/main/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.

## Contributions

Contributors to the project include:

- [David Santiago Quevedo](https://github.com/davidsantiagoquevedo)
(author)

- [Zulma M. Cucunubá](https://github.com/zmcucunuba) (author)

- [Santiago Loaiza](https://github.com/santilo9513) (author)

- [Geraldine Gómez](https://github.com/GeraldineGomez) (contributor)

- [Jaime A. Pavlich-Mariscal](https://github.com/jpavlich) (contributor)

- [Pratik Gupte](https://github.com/pratikunterwegs) (contributor)

## References

<div id="refs" class="references csl-bib-body hanging-indent">
<div id="refs" class="references csl-bib-body hanging-indent"
entry-spacing="0">

<div id="ref-torvaldsen2020" class="csl-entry">
<div id="ref-torvaldsen2002" class="csl-entry">

Torvaldsen, S., and P. B. McIntyre. 2020. “Observational Methods in
Torvaldsen, S., and P. B. McIntyre. 2002. “Observational Methods in
Epidemiologic Assessment of Vaccine Effectiveness.” *Communicable
Diseases Intelligence Quarterly Report* 26 (3).
<https://doi.org/10.3316/informit.511798489353134>.
<https://pubmed.ncbi.nlm.nih.gov/12416713/>.

</div>

Expand Down
4 changes: 4 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ darkred
coh
MatchIt
loglog
Bermúdez
IDRC
Érika
funder
10 changes: 8 additions & 2 deletions man/vaccineff-package.Rd

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

2 changes: 1 addition & 1 deletion vignettes/references.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[
{"id":"torvaldsen2020","accessed":{"date-parts":[[2023,7,5]]},"author":[{"family":"Torvaldsen","given":"S."},{"family":"McIntyre","given":"P. B."}],"citation-key":"torvaldsen2020","container-title":"Communicable Diseases Intelligence Quarterly Report","DOI":"10.3316/informit.511798489353134","issue":"3","issued":{"date-parts":[[2020,8,23]]},"publisher":"Australian Government Department of Health","source":"search.informit.org (Atypon)","title":"Observational methods in epidemiologic assessment of vaccine effectiveness","type":"article-journal","URL":"https://search.informit.org/doi/abs/10.3316/INFORMIT.511798489353134","volume":"26"}
{"id":"torvaldsen2002","accessed":{"date-parts":[[2024,5,2]]},"author":[{"family":"Torvaldsen","given":"S."},{"family":"McIntyre","given":"P. B."}],"citation-key":"torvaldsen2002","container-title":"Communicable Diseases Intelligence Quarterly Report","issue":"3","issued":{"date-parts":[[2002,8,23]]},"publisher":"Australian Government Department of Health","source":"health.gov.au","title":"Observational methods in epidemiologic assessment of vaccine effectiveness","type":"article-journal","URL":"https://pubmed.ncbi.nlm.nih.gov/12416713/","volume":"26"}
]

0 comments on commit 9f7b458

Please sign in to comment.