Re: [R] nls diagnostics?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sun, 25 May 2008 22:54:43 -0400

On Sun, May 25, 2008 at 9:32 PM, Katharine Mullen <kate_at_few.vu.nl> wrote:
> Dear Spencer,
>
> I just saw your post.
>
> If the singular gradient happens during or after iteration one (that is,
> not at the initial estimates), then calling summary on the nls output
> would give standard error estimates on the parameters useful for
> diagnostics. You could also call chol2inv(xx$m$Rmat()) where xx is the
> object returned by nls to get an estimate of the inverse of the hessian;
> you could use this estimate to proceed with the diagnostics you were
> discussing.

Try this:

> library(nls2)
> DF1 <- data.frame(y=1:9, one=rep(1,9))
> xx <- nls2(y~(a+2*b)*one, DF1, start = c(a=1, b=1), algorithm = "brute-force")
> eigen(chol2inv(xx$m$Rmat()))
$values
[1] 5.070602e+31 0.000000e+00

$vectors

           [,1] [,2]
[1,] -0.8944272 -0.4472136
[2,] 0.4472136 -0.8944272



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 26 May 2008 - 02:58:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 26 May 2008 - 04:30:49 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive