Skip to content

Simulations to understand the recent advances in the DiD literature

License

Notifications You must be signed in to change notification settings

pkollenda/DiD-Simulations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recent advances in the difference-in-differences literature. An attempt at understanding via simulations.

Reproducibility

You need GIT installed and talking to RStudio. See here for help.
You need a working version of Latex + Editor (I use TexStudio) or figure out how to do it in RMarkdown (like so).

Workflow Tips

R

Keep options etc. in the RProfile file.

GIT

  • Commit and pull/push through RStudio.
  • Create new branch (on local and remote) via RStudio. Make sure to commit changes to the correct branch and push before switching branches.
  • Merge branch to main via shell (git merge –no-f nameofbranch), shell asks for commit message but can just close and commit via RStudio.
  • Delete branches on local (git branch -d nameofbranch) and on remote (git push origin –delete nameofbranch)
  • Update branch list from remote with git fetch -p
  • data does not get uploaded (hence, folder included in .gitignore file)

Renv

Renv is used to create sandboxed package versions that will be transferable between machines. - Intitialize with (should automatically execute when cloning this repository). - With a new repo, first to load the package status of the (clean) renv.lock file. - When new packages are installed or updated, save the current status with in the renv.lock file.

Latex

  • Changes in latex docs should be commited to git via RStudio.
  • Include auxiliary latex files in gitignore.

Make (?)

  • GranttMcDermott uses GNU Make to automatically run all (or parts of) the executables in the project. Looks cool but I will stick with the one master.R file for now which executes all the code.

Acknowledgments

This workflow was inspired by Grant McDermott’s Git Lecture and exemplary Git Repository.
Info about Git and RStudio comes from happy-git-with-R.
Info about Renv from the package documentation.

About

Simulations to understand the recent advances in the DiD literature

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published