Skip to content
Prev 294714 / 398502 Next

confidence intervals for nls or nls2 model

On Tue, May 15, 2012 at 8:08 PM, Francisco Mora Ardila
<fmora at oikos.unam.mx> wrote:
as.lm is a linear model between the response variable and the gradient
of the nonlinear model and as we see below x is not part of that
linear model so x can't be in newdata when predicting from the tangent
model.  We can only make predictions at the original x points.   For
other x's we could use Interpolation. See ?approx  (?spline can also
work in smooth cases but in the example provided the function has a
kink and that won't work well with splines.)
y          a             b             c  (offset)
1   1.281055090 0.06601796 -4.411829e-01  1.168928e+00  1.397153
2   1.563609934 0.04798815 -3.268846e-01  9.766080e-01  1.015584
3   0.001570796 0.04798815 -3.268846e-01  9.766080e-01  1.015584
4   2.291579783 0.16311227 -9.767241e-01  1.597189e+00  3.451981
5   0.841891853 0.12203013 -7.665928e-01  1.512752e+00  2.582551
6   6.553951324 0.21464369 -1.206154e+00  1.564573e+00  4.542552
7  14.243274230 0.74450055 -1.361047e+00 -1.455630e+00 15.756031
8  14.519899320 0.59707858 -1.721353e+00 -6.770205e-01 12.636107
9  15.066473610 0.74450055 -1.361047e+00 -1.455630e+00 15.756031
10 21.728809880 1.00000000 -2.943955e-13 -9.073765e-12 21.163223
11 18.553054450 1.00000000 -2.943955e-13 -9.073765e-12 21.163223
12 23.722637370 1.00000000 -2.943955e-13 -9.073765e-12 21.163223