GithubHelp home page GithubHelp logo

[BUG]nauc() function about drda HOT 3 CLOSED

albertopessia avatar albertopessia commented on September 24, 2024
[BUG]nauc() function

from drda.

Comments (3)

albertopessia avatar albertopessia commented on September 24, 2024

In order to debug the code I need to know first the parameters you used.

What are the values of xlim, ylim, and the model coefficients (you can extract them with coef(your_drda_fit_object))? Is the model a 4-parameter logistic function?

from drda.

ofleitas avatar ofleitas commented on September 24, 2024

from drda.

albertopessia avatar albertopessia commented on September 24, 2024

The bug was in the specification of the ylim argument. By default ylim is defined for a relative scale of c(0, 1) instead of a percentage of c(0, 100).

Since the curve in this example is defined for percentages with values in c(9.4, 99.995), it does not intersect in this particular case the default range c(0, 1). Therefore, inner computations failed with a logarithm of a negative number.

I now fixed the bug by adding extra checks in the latest 2.0 version. CRAN version is coming soon but it is possible to install the development version through GitHub (see README in the homepage).

However, if your data represent percentages, remember to set ylim = c(0, 100) when calling nauc() and naac().

Note: New 2.0 version has a slightly different parameterization from before. Instead of a lower bound (alpha) and upper bound (beta) parameters, we now use the same parameterization of the Emax model, that is the value at -Inf (alpha) and the maximum effect at Inf (delta) (check help(drda) to know more).

from drda.

Related Issues (4)

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.