Skip to content

yjin07/smoothQDLM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smooth and shape-constrained quantile distributed lag models

Overview

This repository provides R scripts for fitting the models described in the simulation section of the paper, Smooth and Shape-Constrained Quantile Distributed Lag Models [link to the paper]. The scripts cover different approaches to model fitting, taking into account the two error term distributions discussed in the paper.

Scripts

  1. Main-v01.R: This script is used for fitting unimodal models.
  2. Main-v02.R: This script is used for fitting concave models.

Usage

Both scripts accept command-line arguments for specifying the model and the error distributions. The allowed values for these parameters correspond to the models and error distributions mentioned in the paper.

Command-Line Arguments

  • --model or -m: Specifies the model to run. Allowed values are A, B, or C.
  • --error or -e: Specifies the error term distribution. Allowed values are normal or t.

Running the Scripts

To run either script, use the following command format:

Rscript script_name.R -m model -e error_distribution

Replace script_name.R with Main-v01.R or Main-v02.R depending on the model type you want to fit. Replace model with A, B, or C, and error_distribution with normal or t.

Example

Unimodal Model with Normal Error Distribution:

Rscript Main-v01.R -m A -e normal

Concave Model with t Error Distribution:

Rscript Main-v02.R -m C -e t

Repeating Simulations

To repeat the simulations as described in the paper, you will need to submit 1-2250 jobs via SLURM. This will allow you to comprehensively repeat the simulations under various configurations.

Generating Figures

You can use the Plots.ipynb to generate the plots similar to those in the paper. However, you will need to adjust the directory names where your results are saved accordingly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published