Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

New function using the delta method to calculate confidence intervals and prediction intervals

73 views
Skip to first unread message

Greg Pelletier

unread,
Dec 25, 2023, 3:45:51 PM12/25/23
to lmfit-py
Dear all,

Attached is a new function named delta_method to calculate the confidence interval of the nonlinear regression curve and prediction interval for new observations

This new function uses the lmfit results.fit for the variance-covariance matrix of the model parameters, and the best-fit parameter values, to calculate the confidence interval of the curve, and the prediction intervals for any new observations. The user may specify any signficance level (e.g. use alpha=0.05 for 95% confidence intervals and 95% prediction intervals). 

The function uses the delta method, which is described in detail in Section 5.1 of this online lecture:


This new delta_method function is intended to be an alternative to eval_uncertainty() for use in estimating confidence intervals and prediction intervals.

Best regards,

Greg Pelletier


lmfit_exp3_v21.py
lmfit_exp3_v21.png
Reply all
Reply to author
Forward
0 new messages