Code Monkey home page Code Monkey logo

ct_dynamics_preprint's Introduction

ct_dynamics_preprint

Code required to regenerate the figures and analyses in Hay & Kennedy-Shaffer et al.

General framework

  • Data are stored in the data folder.
  • R functions are stored in the code folder.
  • All code to run analyses and generate figures is in the scripts folder.
  • Model parameters are typically controlled by the corresponding table in the pars folder. Typically, the file with "fitted" in the name is after the optim fitting procedure. Change values, MCMC control and bounds in these tables.
  • Most normal figures get saved to the figs folder.
  • Figures generated as part of the fitting procedure tend to get saved to the results folder, in a sub-folder with name matching the analysis.

lazymcmc

The lazymcmc package is needed throughout this project. It can be installed with devtools::install_github("jameshay218/lazymcmc")

Working directory

The first thing that needs changing in each script is the starting working directory at the top of each script.

Priors for fitting

Check code/priors.R. The priors for model fitting are currently hard-coded.

fit_viral_load_model.R

  • Uses optim to find the viral kinetics parameters that give a reasonable least squares.
  • It fits the old gamma model, the original single hinge function and the new double-hinge function.
  • Note that optim is quite sensitive to starting conditions, so find the lines that call optim and check that the starting parameters give fairly reasonable trajectories.

ct_dynamics_preprint's People

Contributors

jameshay218 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.