[R] "se.fit" option to the predict.nls() function
rune.haubo at gmail.com
Tue Jan 6 07:40:16 CET 2015
On 5 January 2015 at 21:08, Ben Bolker <bbolker at gmail.com> wrote:
> Roger Coppock <rcoppock <at> cox.net> writes:
>> When will "R" implement the "se.fit" option to the
>> predict.nls() function? Is there some schedule?
> I think this is unlikely to happen, ever (sorry). The exact method
> for finding confidence intervals on nonlinear fits would be
> to compute likelihood profiles for each prediction, which would
> be rather tedious.
I understand profile likelihoods for parameters, but what do you mean
by a profile likelihood for yet unobserved observations, i.e.
> Another reasonable approach would be to use bootstrapping (see
> linked r-help thread below).
> An approximate approach would be to use the delta method.
> The nlstools package might be useful.
Alternatively the propagate package: it provides a function predictNLS
that computes uncertainty measures for nls predictions using (first
and second order) Taylor approximations as well as simulation methods.
I think the appropriateness of a simple (first order) Taylor/Delta
method depends on the application. I can think of two important
aspects: (1) if the model function is close to linear, you might be
ok. (2) if you are interested in a prediction-type (rather than
confidence) interval and the residual spread dominates the
uncertainty, any inaccuracies in the model function uncertainty (where
you apply the approximation) is swamped by the residual spread anyway.
In a recent application on shelf life estimation that I worked on,
both of these aspects were applicable and a simple approximation was
More information about the R-help