Giter Club home page Giter Club logo

tsk's People

Contributors

brsr avatar

Watchers

 avatar

Forkers

thanhkhiet84

tsk's Issues

Is it possible to perform Abbott's correction before smooth the data using the PAVA algorithm?

Dear Brenton,

I got two questions here:

First of all, in tsk::tsk(), you smooth the data (of course only when the data do not show monotonically increasing trend) before doing the Abbott's correction of the control response (when control response is not 0). Shouldn't the Abbott's correction be done before smoothing?

In tsk::tsk(), smoothing using gpava() will sometimes result in a smoothed control p different from the original control p.

# Correct for the control dose.
  data.smoothed$p <- (data.smoothed$p-control)/(1-control)

Then you correct the smoothed data with the original control p based on Abbott's formula. It will not normalize the smoothed corrected control p to 0, likely leading to biases in the results.

Secondly, in the ecotoxicology::TSK(), after Abbott's correction, sample size (n) for all groups is also corrected to n_i_-r[1], where ni is the sample size of each test group, r[1] is the number of original control response. I am not sure if it is correct to do this sample size correction, but would like to hear your opinion. Thank you very much!

n vs n-1 in variance estimation

Received by e-mail in February from Dr. Jerry Lewis:

Variance of m is calculated by noting that within each dose, the number of responders, X, is distributed binomial(n,P), where P is a monotonic function of dose. But, as noted in all editions of Finney (Statistical Method in Biological Assay), while p = X/n is unbiased for P, E[ p_(1-p)/n ] < P_(1-P)/n. You need p_(1-p)/(n-1) for unbiased estimation of P_(1-P)/n, which Finney used in his worked Karber example (omitted from 3rd ed). Without this modification, the Karber intervals seem too narrow when compared to the 50% horizontal slice through intervals from generalized linear models.

The original goal of this package was to replicate a program that used $n$ in the variance estimate, so that's what the current state is. It would be reasonable to add an option to use $n-1$ instead, but I can't determine what needs to be changed in the variance calculation from Dr Lewis's email alone, since there are multiple different $n$s that appear.

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.