Coder Social home page Coder Social logo

tidydrc's Introduction

tidydrc

tidydrc

Description

Tidy modelling of dose-response relationships with the drc package in R.
This is a wrapper for drc by Christian Ritz, which is probably the best package for modelling dose-response.
tidydrc contains two functions which make it easier to generate and plot these models. Install it with:

devtools::install_github("angelovangel/tidydrc")

Examples

The tidydrc_model() function returns a dataframe with list-columns (the data, predictions and coefficients). It is thus easy to implement in tidy workflows. For example, to fit Michaelis-Menten kinetics models for treated and untreated samples in the Puromycin dataset (built-in) and get the Km values with std. error:

mm <- tidydrc_model(Puromycin, conc, rate, model = MM.3(), state)
names(mm$drmod) <- as.character(mm$state)
map(mm$drmod, ED, 50) %>% map_df(as_tibble, .id = "sample")

The list-column dataframe can be directly piped to tidydrc_plot()

tidydrc_model(S.alba, Dose, DryMatter, model = LL.4(), Herbicide) %>%
tidydrc_plot(ed50 = TRUE, color = ~Herbicide) + 
scale_x_log10()

A more involved example...

References

Ritz, C., Baty, F., Streibig, J. C., Gerhard, D. (2015) Dose-Response Analysis Using R PLOS ONE, 10(12), e0146021

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.