drugprepr
An algorithm for the transparent and efficient preparation of CPRD drug data into information on individuals’ drug use over time
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 4 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
2 of 4 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Repository
An algorithm for the transparent and efficient preparation of CPRD drug data into information on individuals’ drug use over time
Basic Info
- Host: GitHub
- Owner: belayb
- License: other
- Language: R
- Default Branch: master
- Size: 486 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
R package drugprepr
Prepare prescription data (such as from the Clinical Practice Research Datalink) into an analysis-ready format, with start and stop dates for each patient's prescriptions. Based on Pye et al (2018).
The package drugprepr is designed to help improve transparency and efficiency in pharmaco-epidemiology studies that depend on electronic prescribing records. By pre-processing data in a reproducible way, it is easier to evaluate the sensitivity of analyses to different decisions, such as how to deal with overlapping prescriptions or missing data.
Much of the package depends on a workhorse function, impute(), which replaces elements that match some predicate (indicating implausiblity or missingness) with a summary of a grouping level (for instance, the mean of values from the same GP practice).
You can use this function in your own analyses.
The algorithm of Pye et al (2018) is implemented in the function drug_prep(), which performs the following steps.
- Impute implausible prescription quantities
- Impute missing prescription quantities
- Impute implausible daily doses
- Impute missing daily doses
- Estimate prescription durations
- Remove or truncate implausibly-long prescription durations
- Impute missing prescription durations
- Disambiguate prescriptions with the same start date
- Handle overlapping prescription periods
- Close small gaps between successive prescriptions
The user is welcome to define their own algorithm with different steps or a different ordering; see the source code on GitHub to see how.
Output is a data frame containing prescription start and stop dates for each patient, practice and drug. This may be fed into a statistical model to estimate the effect of drug exposure on events, for example exposure to opioids and incidence of fractures.
drugprepr can also be used in combination with the package doseminer to extract structured information from freetext prescription instructions.
Installation
You can install drugprepr from CRAN:
r
install.packages('drugprepr')
Or get the latest development version from GitHub:
r
remotes::install_github('belayb/drugprepr')
Usage
The main function to use is drug_prep().
See the package vignettes and examples in the documentation for more details.
Contributors
Maintained by Belay Birlie Yimer and David Selby of the Centre for Epidemiology Versus Arthritis, University of Manchester, UK. Other co-authors: Meghna Jani, Goran Nenadic, Mark Lunt, William G. Dixon.
Pull requests and GitHub issues are welcome.
Owner
- Name: Belay Birlie Yimer
- Login: belayb
- Kind: user
- Location: Manchester, UK
- Repositories: 14
- Profile: https://github.com/belayb
Statistician with a research interests in Bayesian methods, multilevel models, etc
GitHub Events
Total
- Watch event: 1
- Fork event: 1
Last Year
- Watch event: 1
- Fork event: 1
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Selby | d****d@s****k | 67 |
| belayb | b****r@m****k | 40 |
| David Selby | d****y@m****k | 38 |
| Belay Birlie | 3****b | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 2 years ago
All Time
- Total issues: 3
- Total pull requests: 6
- Average time to close issues: 3 months
- Average time to close pull requests: less than a minute
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.67
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- belayb (2)
- Selbosh (1)
Pull Request Authors
- belayb (6)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 169 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: drugprepr
Prepare Electronic Prescription Record Data to Estimate Drug Exposure
- Documentation: http://cran.r-project.org/web/packages/drugprepr/drugprepr.pdf
- License: MIT + file LICENSE
-
Latest release: 0.0.4
published over 4 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 2.10 depends
- DescTools * imports
- doseminer * imports
- dplyr * imports
- purrr * imports
- rlang * imports
- sqldf * imports
- stringr * imports
- tidyr * imports
- kableExtra * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests