The tips and tricks I learned during my PhD
- Check out : https://www.r-bloggers.com/2014/09/in-depth-introduction-to-machine-learning-in-15-hours-of-expert-videos/ and the answers: https://github.com/asadoughi/stat-learning
- https://codingclubuc3m.rbind.io/post/2019-10-15/
- https://speakerdeck.com/rmcelreath
- https://xcelab.net/rm/statistical-rethinking/
- https://www.sumsar.net/files/posts/2017-bayesian-tutorial-exercises/modeling_exercise1.html
- Andrew Gelman
- For MCMC you can use lots of different algorithms. I used JAGS (https://sourceforge.net/projects/mcmc-jags/) and some STAN (https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started).
- For examples of JAGS code check out: https://github.com/andrewcparnell/jags_examples
- Stan examples: https://www.sumsar.net/blog/2017/01/bayesian-computation-with-stan-and-farmer-jons/
- Setting up a personal access code: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
- Save this access code and use it when you are promoted for the username or password. This is known as HTTPS section. You will need this if you want to git push or git commit from the terminal.
- SSH is a different process and requires a separate code
- Github desktop is great
- If you have very large files there is a limit on Github desktop of 100M. This can be overcome using the terminal but it is limited to files under 2GB. Check out: https://git-lfs.com/ or https://guide.ncloud-docs.com/beta/docs/en/sourcecommit-use-lfs
- Maximum git push is 100M but every time you commit it saves it. If you commit a larger file and want to remove this commit later check out: https://rtyley.github.io/bfg-repo-cleaner/
- When you have submitted your paper to a journal or before submitting (check requirements of journal to see if its allowed), then you can upload it to Arxiv and use Overleaf to tidy up the upload before submitting: https://arxiv.org/
- You will need someone to refer you to the specific section of arxiv which may take a day to do. Watch which section of Arxiv you are uploading to, e.g. stat os stats_ML as they we require different levels of approval.
- How to make an R package follow these instructions: https://r-pkgs.org/
- This repo has a list of all the tests that CRAN require prior to submission.
- Use the submit2cran.R script for a list of all the test and refer to the book for more detail
- If having an issue with JAGS "version 4 not found" try setting up a new workflow using the instructions from: https://github.com/r-lib/actions and look at https://www.tidyverse.org/blog/2022/06/actions-2-0-0/
- Size of the package must be 5MB see: https://cran.r-project.org/web/packages/policies.html
- Other checks: https://rcmdcheck.r-lib.org/
- Review this before you start: https://rjournal.github.io/index.html
- There is a specific template which is set up using these instructions: https://rjournal.github.io/rjtools/
- Becareful if naming code chunks do not use load_new, i.e. _, this leads to problems. Also % in the caption needs to be \%.
- There is a limit of 100 MB when submitting
- CHECK hidden files in mac. There was a .git file in mine that caused huge memory issue!
- The RJtemplate_overleaf.zip contains the template for converting your Rjournal paper into an Overleaf format.
- Use Homebrew: https://formulae.brew.sh/
- A useful skill but I didn't figure it out fully. Check out: https://towardsdatascience.com/how-to-web-scrape-with-python-in-4-minutes-bc49186a8460