ciTools icon indicating copy to clipboard operation
ciTools copied to clipboard

Add nls

Open wmurphyrd opened this issue 7 years ago • 4 comments

I've done some work in the past with CI's and PI's for non linear regression using the propagate package. Would you be interested in receiving a PR to add nls model support to this package?

wmurphyrd avatar Sep 25 '17 12:09 wmurphyrd

Definitely interested. Do you have something we can read about interval estimates for non linear regression models?

jthaman avatar Sep 25 '17 19:09 jthaman

The author of propagate has published some blog posts on the methodology:

https://www.r-bloggers.com/predictnls-part-1-monte-carlo-simulation-confidence-intervals-for-nls-models/

https://www.r-bloggers.com/predictnls-part-2-taylor-approximation-confidence-intervals-for-nls-models/

I used the Taylor approximation method from the package to create prediction intervals for the Institute of Medicine's total energy expenditure models and the actual coverage rate for the 95% PI on the source data was 96%: http://www.fasebj.org/content/30/1_Supplement/lb382.short

Note: there's an error in the published package such that it always returns CIs when using the Monte Carlo simulation, even when PI is requested. The Taylor method works correctly (and the fix for the Monte Carlo method is trivial)

wmurphyrd avatar Sep 26 '17 03:09 wmurphyrd

Okay, this is something I can spend some time reading. I don't have a background in these types of models, so I could take me a while. If you already have some work done on these interval estimates, it could be relatively straightforward to add them to ciTools. We recently wrote a file (https://github.com/jthaman/ciTools/blob/master/CONTRIBUTING.org) that has tips for working on this project.

jthaman avatar Sep 26 '17 19:09 jthaman

Definitely interested in this too! Lifting some code from the propagate package could be the easiest...

tomwenseleers avatar Mar 28 '18 14:03 tomwenseleers