An R package which allows data to be simulation from marginal distributions obtained from Trusted Research Environments (TREs).
Installation
Currently this package can be installed using devtools
or remotes
Devtools
install.packages("devtools")
devtools::install_github("hehta/RESIDE")
Remotes
install.packages("remotes")
remotes::install_github("hehta/RESIDE")
Usage
Trusted Research Environments (TRE’s)
There are two main functions:
Worked Example Using the Internation Stroke Trial
The following is a worked example using the International Stroke Trial (IST) which has been included as a dataset in the package under ODC-by licence.
# Load the package
library(RESIDE)
# Get the marginal distributions
marginals <- get_marginal_distributions(IST)
# Export the marginal distributions
export_marginal_distributions(marginals, tempdir())
# Import the exported marginal distributions
marginals_imported <- import_marginal_distributions()
# Synthesise data from the imported marginal distributions
synthesise_data(marginals_imported)