{"id":32199450,"url":"https://github.com/albertopessia/drda","last_synced_at":"2026-03-27T02:08:54.956Z","repository":{"id":56934862,"uuid":"320212918","full_name":"albertopessia/drda","owner":"albertopessia","description":"Dose-response data analysis","archived":false,"fork":false,"pushed_at":"2025-01-16T09:07:44.000Z","size":1055,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T19:00:16.757Z","etag":null,"topics":["dose-response","logistic-function","r","r-package"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/albertopessia.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-10T08:50:25.000Z","updated_at":"2025-10-06T12:31:18.000Z","dependencies_parsed_at":"2024-08-21T12:50:07.128Z","dependency_job_id":null,"html_url":"https://github.com/albertopessia/drda","commit_stats":{"total_commits":190,"total_committers":2,"mean_commits":95.0,"dds":"0.0052631578947368585","last_synced_commit":"967d60761bfa1752b7ecdaa2626e7b4558b79f3b"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/albertopessia/drda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertopessia%2Fdrda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertopessia%2Fdrda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertopessia%2Fdrda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertopessia%2Fdrda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/albertopessia","download_url":"https://codeload.github.com/albertopessia/drda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertopessia%2Fdrda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280371890,"owners_count":26319523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dose-response","logistic-function","r","r-package"],"created_at":"2025-10-22T03:16:09.891Z","updated_at":"2025-10-22T03:16:12.419Z","avatar_url":"https://github.com/albertopessia.png","language":"R","readme":"# drda\n\n[![Build Status](https://github.com/albertopessia/drda/actions/workflows/r-cmd-check.yml/badge.svg?branch=master)](https://github.com/albertopessia/drda/actions/workflows/r-cmd-check.yml) [![Coverage](https://codecov.io/gh/albertopessia/drda/branch/master/graph/badge.svg?token=VgWfj5eLiV)](https://codecov.io/gh/albertopessia/drda)\n\n## Overview\n\n*drda* is an [R](https://www.r-project.org/) package for fitting growth curves\nand performing dose-response data analysis.\n\nThe current available models are:\n\n- 5-parameter logistic function\n- 5-parameter log-logistic function\n- 4-parameter logistic function\n- 4-parameter log-logistic function\n- 2-parameter logistic function\n- 2-parameter log-logistic function\n- Gompertz function\n- log-Gompertz function\n\nA 6-parameter (log-)logistic function is also available for theoretical\nresearch, but its use in real applications is discouraged because it is usually\nnon-identifiable from data.\n\n## Installation\n\nYou can install the latest stable release of the `drda` R package from CRAN with\n\n```{r}\ninstall.packages(\"drda\")\n```\n\nTo install the latest development version of the package from GitHub use\n\n```{r}\n# install.packages(\"remotes\")\nremotes::install_github(\"albertopessia/drda\")\n```\n\n## Usage\n\n### Load the package\n\n```{r}\nlibrary(drda)\n```\n\n### Example data\n\nPackage `drda` comes with our own example dataset:\n\n```{r}\n?voropm2\n\nhead(voropm2)\n```\n\n### Default fitting\n\n```{r}\n# by default `drda` uses a 4-parameter logistic function for model fitting\n\n# common R API for fitting models\nfit \u003c- drda(response ~ log_dose, data = voropm2)\n\n# get a general overview of the results\nsummary(fit)\n\n# get parameter estimates by using generic functions...\ncoef(fit)\nsigma(fit)\n\n# ... or accessing the variables directly\nfit$coefficients\nfit$sigma\n\n# compare the estimated model against a flat horizontal line, or the full\n# 5-parameter logistic model, using AIC, BIC, and the Likelihood Ratio Test\n# (LRT)\n#\n# note that the LRT is testing the null hypothesis of a flat horizontal line\n# being as a good fit as the chosen model, therefore we expect the test to be\n# significant\n#\n# if the test is not significant, a horizontal line is probably a better model\nanova(fit)\n```\n\n### Other models\n\n```{r}\n# use the `mean_function` argument to select a different model\nfit_l2 \u003c- drda(response ~ log_dose, data = voropm2, mean_function = \"logistic2\")\nfit_l4 \u003c- drda(response ~ log_dose, data = voropm2, mean_function = \"logistic4\")\nfit_l5 \u003c- drda(response ~ log_dose, data = voropm2, mean_function = \"logistic5\")\nfit_gz \u003c- drda(response ~ log_dose, data = voropm2, mean_function = \"gompertz\")\n\n# which model should be chosen?\nanova(fit_l2, fit_l4, fit_l5, fit_gz)\n\n# 5-parameter logistic function provides the best fit (AIC and BIC are minimum)\n```\n\n### Weighted fit\n\n```{r}\n# it is possible to give each observation its own weight\nfit_weighted \u003c- drda(response ~ log_dose, data = voropm2, weights = weight)\n\n# all the commands shown so far are available for a weighted fit as well\n```\n\n### Constrained optimization\n\n```{r}\n# it is possible to fix parameter values by setting the `lower_bound` and\n# `upper_bound` appropriately\n#\n# unconstrained parameters have a lower bound of `-Inf` and an upper bound of\n# `Inf`\n#\n# Important: be careful when deciding the constraints, because the optimization\n#            problem might become very difficult to solve within a reasonable\n#            number of iterations.\n#\n# In this particular example we are:\n#   - fixing the alpha parameter to 1\n#   - fixing the delta parameter to -1\n#   - constraining the growth rate to be between 1 and 5\n#   - not constraining the `phi` parameter, i.e. the `log(EC50)`\nlb \u003c- c(1, -1, 1, -Inf)\nub \u003c- c(1, -1, 5,  Inf)\n\nfit \u003c- drda(\n  response ~ log_dose, data = voropm2, lower_bound = lb, upper_bound = ub,\n  max_iter = 260\n)\n\nsummary(fit)\n\n# if the algorithm does not converge, we can try to increase the maximum number\n# of iterations or provide our own starting point\nfit \u003c- drda(\n  response ~ log_dose, data = voropm2, lower_bound = lb, upper_bound = ub,\n  start = c(1, -1, 2.6, 5), max_iter = 10000\n)\n\nsummary(fit)\n```\n\n### Basic plot functionality\n\n```{r}\nfit_l5 \u003c- drda(response ~ log_dose, data = voropm2, mean_function = \"logistic5\")\n\n# plot the data used for fitting, the maximum likelihood curve, and\n# *approximate* confidence intervals for the curve\nplot(fit_l5)\n\n# combine all curves in the same plot\nfit_l2 \u003c- drda(response ~ log_dose, data = voropm2, mean_function = \"logistic2\")\nfit_l4 \u003c- drda(response ~ log_dose, data = voropm2, mean_function = \"logistic4\")\nplot(fit_l2, fit_l4, fit_l5)\n\n# modify default plotting options\n# use `legend_show = FALSE` to remove the legend altogether\nplot(\n  fit_l5, base = \"10\", col = \"magenta\", xlab = \"x\", ylab = \"y\", level = 0.9,\n  midpoint = FALSE, main = \"Example plot\", legend_location = \"topright\",\n  legend = \"5-parameter logistic function\"\n)\n```\n\n## License\n\nThis package is free and open source software licensed under [MIT](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertopessia%2Fdrda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertopessia%2Fdrda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertopessia%2Fdrda/lists"}