Skip to content

Commit

Permalink
reproducibility instructions added
Browse files Browse the repository at this point in the history
  • Loading branch information
markean committed Jan 23, 2024
1 parent 38c1f77 commit 3e89330
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 21 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: retel
Type: Package
Title: Regularized Exponentially Tilted Empirical Likelihood
Version: 0.1.0.9002
Version: 0.1.0.9003
Authors@R: c(
person("Eunseop", "Kim", email = "markean@pm.me",
role = c("aut", "cph", "cre")),
Expand All @@ -25,7 +25,7 @@ Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.0
RoxygenNote: 7.3.1
Imports:
checkmate,
Matrix,
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following functions enable users to set estimating functions by providing da
* `retel()` computes regularized exponentially tilted empirical likelihood with regularization parameters.

This repository accompanies the research paper titled 'Regularized Exponentially Tilted Empirical Likelihood for Bayesian Inference,' available on [arXiv](https://arxiv.org/abs/2312.17015).
The `retel-paper` folder contains code and additional resources related to the paper.
The `retel-paper/` folder contains code and outputs from the paper.
This work was supported by the U.S. National Science Foundation under Grants No. [SES-1921523](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1921523) and [DMS-2015552](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2015552).


Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ providing data and parameters:
This repository accompanies the research paper titled ‘Regularized
Exponentially Tilted Empirical Likelihood for Bayesian Inference,’
available on [arXiv](https://arxiv.org/abs/2312.17015). The
`retel-paper` folder contains code and additional resources related to
the paper. This work was supported by the U.S. National Science
Foundation under Grants
`retel-paper/` folder contains code and outputs from the paper. This
work was supported by the U.S. National Science Foundation under Grants
No. [SES-1921523](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1921523)
and
[DMS-2015552](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2015552).
Expand Down
36 changes: 33 additions & 3 deletions retel-paper/README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ knitr::opts_chunk$set(
# retel-paper

Reproducible code for generating figures and outputs from simulations and the application presented in the paper 'Regularized Exponentially Tilted Empirical Likelihood for Bayesian Inference,' accessible on [arXiv](https://arxiv.org/abs/2312.17015).
The following sections outline the directory structure and provide detailed instructions for replicating the results.

The following sections outline the directory structure and provide instructions for replicating the results.

## Directory Structure

```
.
├── application/ <- 📂 Application outputs
├── code/ <- 📂 All code for reproducibility
│ ├── application/ <- 📂 Code for application in Section 5
│ ├── application/ <- 📂 Code for application in Section 5 and Table 4
│ ├── figures/ <- 📂 Code for figures
│ │ ├── supplement/ <- 📂 Supplement figures
│ ├── simulations/ <- 📂 Code for simulations
Expand Down Expand Up @@ -61,4 +62,33 @@ The following sections outline the directory structure and provide detailed inst
├── retel-paper.Rproj <- 🖥️ R Project file for RStudio
```

## Instructions for Reproducibility
## Instructions for Reproducibility

Please ensure Git, R (version 4.1.0 or higher), and preferably RStudio (for interactive script execution on a personal computer) are installed.

1. Clone this repository.

2. Set the working directory to the `retel-paper/` folder or open the `retel-paper.Rproj` project file in RStudio.

3. Restore the project library by executing the following command in R:

```{r, eval = FALSE}
# install.packages("renv")
renv::restore()
```

This command will automatically install all the required packages, including 'retel.'
To maintain reproducibility and prevent potential issues, it is strongly advised not to manually install the packages.

4. Run the R scripts in the `code/` folder.
Each script is designed to run independently, with script names corresponding to specific methods, configuration settings, or outputs from the paper.
No edits or modifications are needed.

For example:

- `code/application/retel_f.R` reproduces the RETEL_f results for Table 4.
- `code/figures/figure1.R` reproduces Figure 1.
- `code/simulations/cr/l0/n5s05.R` reproduces the results for Table 2 when n = 5 and s = 0.5.

Note: The simulations and application code were run in a high-performance computing (HPC) environment.
The total run time for sequentially executing all scripts in the `code/` folder can vary, potentially extending to many hours, depending on the machine or hardware specifications.
47 changes: 43 additions & 4 deletions retel-paper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
Reproducible code for generating figures and outputs from simulations
and the application presented in the paper ‘Regularized Exponentially
Tilted Empirical Likelihood for Bayesian Inference,’ accessible on
[arXiv](https://arxiv.org/abs/2312.17015). The following sections
outline the directory structure and provide detailed instructions for
replicating the results.
[arXiv](https://arxiv.org/abs/2312.17015).

The following sections outline the directory structure and provide
instructions for replicating the results.

## Directory Structure

.
├── application/ <- 📂 Application outputs
├── code/ <- 📂 All code for reproducibility
│ ├── application/ <- 📂 Code for application in Section 5
│ ├── application/ <- 📂 Code for application in Section 5 and Table 4
│ ├── figures/ <- 📂 Code for figures
│ │ ├── supplement/ <- 📂 Supplement figures
│ ├── simulations/ <- 📂 Code for simulations
Expand Down Expand Up @@ -52,3 +53,41 @@ replicating the results.
├── retel-paper.Rproj <- 🖥️ R Project file for RStudio

## Instructions for Reproducibility

Please ensure Git, R (version 4.1.0 or higher), and preferably RStudio
(for interactive script execution on a personal computer) are installed.

1. Clone this repository.

2. Set the working directory to the `retel-paper/` folder or open the
`retel-paper.Rproj` project file in RStudio.

3. Restore the project library by executing the following command in R:

``` r
# install.packages("renv")
renv::restore()
```

This command will automatically install all the required packages,
including ‘retel.’ To maintain reproducibility and prevent potential
issues, it is strongly advised not to manually install the packages.

4. Run the R scripts in the `code/` folder. Each script is designed to
run independently, with script names corresponding to specific
methods, configuration settings, or outputs from the paper. No edits
or modifications are needed.

For example:

- `code/application/retel_f.R` reproduces the RETEL_f results for Table
4.
- `code/figures/figure1.R` reproduces Figure 1.
- `code/simulations/cr/l0/n5s05.R` reproduces the results for Table 2
when n = 5 and s = 0.5.

Note: The simulations and application code were run in a
high-performance computing (HPC) environment. The total run time for
sequentially executing all scripts in the `code/` folder can vary,
potentially extending to many hours, depending on the machine or
hardware specifications.
11 changes: 3 additions & 8 deletions retel-paper/renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1236,21 +1236,16 @@
"retel": {
"Package": "retel",
"Version": "0.1.0",
"Source": "GitHub",
"RemoteType": "github",
"RemoteUsername": "markean",
"RemoteRepo": "retel",
"RemoteRef": "HEAD",
"RemoteSha": "df36eeba74543a30850940129694a06dd976dd03",
"RemoteHost": "api.github.com",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"Matrix",
"R",
"checkmate",
"matrixcalc",
"nloptr"
],
"Hash": "6e15addb6ddddfc7c8ef20dc027a212e"
"Hash": "ebab6ad44ec41ef703a3f43cb73e87c2"
},
"rlang": {
"Package": "rlang",
Expand Down

0 comments on commit 3e89330

Please sign in to comment.