Skip to content

angelovangel/tidydrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

tidy modelling of dose-response relationships with the drc package

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages