Re: [R] nls diagnostics?

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Sun, 25 May 2008 20:26:28 -0700

Hi, Gabor: Thanks very much. Spencer

Gabor Grothendieck wrote:
> On Sun, May 25, 2008 at 9:32 PM, Katharine Mullen <kate@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.
>



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 - 03:30:27 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 - 05:30:41 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