Coder Social home page Coder Social logo

doseresponse / medrc Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 1.0 1.12 MB

Hierarchical dose-response models in R

Home Page: https://doseresponse.github.io/medrc/index.html

R 100.00%
nonlinear-regression hierarchical-models dose-response-modeling r

medrc's People

Contributors

daniel-gerhard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

guhjy

medrc's Issues

self-start

adding self start functionality to medrc model functions

Why make it so that negative slopes are increasing?

#' @param x numeric dose vector.
#' @param b steepness
#' @param c lower limit
#' @param d upper limit
#' @param e ED50
meLL.4 <- function(x, b, c, d, e){
  .value <- c + (d-c)/(1 + exp(b*log(x/e)))
  # ...
}

The above is not a conventional way of writing the logistic model that I've seen. Instead I usually see it written as:

fourPL <- function(x, a, b, c, d, e) {
  d + (c - d) / (1 + ((x / e)^b))
}

In the formulation used by this software, curves that exhibit increasing response with respect to dose have negative slope. Is there a reason for this or is it just historical? I understand that changing it now would be a problematic breaking change, but I found it pretty unintuitive.

Error when using medrm with BC.4()

Hi,

I'm working on analyzing dose response data with a clear hormesis effect from a blocked experiment, however, when I set fct = BC.4() I get the following error:

Error in str2lang(x) : :1:18: unexpected ','
1: germination~(time,
^

Here's an example dataset and my model:

#dataset
time <- c(0,0,0,0,12,12,12,12,24,24,24,24,48,48,48,48,96,96,96,96)
block <- c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4)
block <- as.factor(block)
germination <- c(.78,.80,.82,.75,.90,.95,.89,.91,.68,.71,.65,.69,.08,.05,.06,.02,0,0,.01,0)
data <- data.frame(block, time, germination)

#model
m <- medrm(germination ~ time,
data = data,
fct = BC.4(),
random = b + e ~ 1|block)

I haven't been able to find any other mentions of str2lang errors from drc/medrc online. Does medrc support the Brain-Cousens model? If not, can you point me in the direction of other functions to use for the model?

Thanks!

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.