Re: [R] nls confidence intervals

2003-08-14 Thread Duncan Murdoch
On Thu, 14 Aug 2003 09:08:26 -0700, Spencer Graves [EMAIL PROTECTED] wrote : This seems to identify a possible bug in R 1.7.1 under Windows 2000: tstDf - data.frame(y = 1:11, x=1:11) fit - nls(y~a/x, data=tstDf, start=list(a=1)) predict(fit, se.fit=TRUE) [1] 7.0601879 3.5300939 2.3533960

Re: [R] nls confidence intervals

2003-08-14 Thread Torsten Hothorn
On Thu, 14 Aug 2003, Spencer Graves wrote: This seems to identify a possible bug in R 1.7.1 under Windows 2000: tstDf - data.frame(y = 1:11, x=1:11) fit - nls(y~a/x, data=tstDf, start=list(a=1)) predict(fit, se.fit=TRUE) [1] 7.0601879 3.5300939 2.3533960 1.7650470 1.4120376

RE: [R] nls confidence intervals

2003-08-14 Thread Paul, David A
You can use the well-known Taylor series approximation to the variance of an arbitrary function: Var( f(X) ) ~= Sum( s[i]^2*D2[i] ) + 2*Sum( Sum( s[i,j]*D[i]*D[j] ) ) where D2[i] is the second partial derivative of f(x) with respect to the ith parameter and D[j] is the first partial derivative

Re: [R] nls confidence intervals

2003-08-14 Thread Spencer Graves
This seems to identify a possible bug in R 1.7.1 under Windows 2000: tstDf - data.frame(y = 1:11, x=1:11) fit - nls(y~a/x, data=tstDf, start=list(a=1)) predict(fit, se.fit=TRUE) [1] 7.0601879 3.5300939 2.3533960 1.7650470 1.4120376 1.1766980 1.0085983 [8] 0.8825235 0.7844653 0.7060188

Re: [R] nls confidence intervals

2003-08-14 Thread Spencer Graves
Regarding the accuracy of the Taylor series approximation, my favorite reference is Bates Watts (1988) Nonlinear Regression Analysis and Its Applications (Wiley, esp. pp. 255-260). Recently, Brian Ripley also Chambers Hastie (1992) Statistical Models in S (Wadsworth, ch. 10) and Venables

Re: [R] nls confidence intervals

2003-08-14 Thread Duncan Murdoch
On Thu, 14 Aug 2003 12:43:25 -0400, Duncan Murdoch [EMAIL PROTECTED] wrote : Perhaps the description below of what se.fit is supposed to do should be modified. I've done that now in the development version (to become 1.8.0). Err, I mean in the patch version (but it should still end up in

Re: [R] nls confidence intervals

2003-08-14 Thread Duncan Murdoch
On Thu, 14 Aug 2003 12:43:25 -0400, Duncan Murdoch [EMAIL PROTECTED] wrote : Perhaps the description below of what se.fit is supposed to do should be modified. I've done that now in the development version (to become 1.8.0). Duncan Murdoch __ [EMAIL