[R] System is computationally singular?

Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.ac.be
Thu Dec 9 09:27:27 CET 2004


Hi Rui,

when you are far from the optimum the Hessian might be a non positive 
definite matrix and thus it cannot be solved. There are some positive 
definite modifications that you could apply. For more info you could 
check at Section 3.2.4 of:

http://www.stat.wisc.edu/~mchung/teaching/stat471/stat_computing.pdf

However, if you have a function computing the minus log-likelihood and 
its derivative, then it would be easier to use `optim()', probably 
with method "BFGS" (or "CG" if you have many parameters).

I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Rui Wang" <wangruiwin at hotmail.com>
To: <r-help at stat.math.ethz.ch>
Sent: Thursday, December 09, 2004 4:16 AM
Subject: [R] System is computationally singular?


> Hi all,
>
> I was using the Newton-Raphson method to estimate paremeters in the 
> model developed by my supervisor. However, when I interatively 
> computed theta(t+1)=theta(t) - solve(H)*s (where the Hessian matrix 
> and score vector were explicitely derived), I got the error message: 
> Error in solve.default(H) : system is computationally singular: 
> reciprocal condition number = 1.70568e-032. Assume my score vector 
> and Hessian matrix were correct, could anyone give me some 
> suggestion on how to avoid this singular situation? Thank you in 
> advance. Maybe this question is not related to R itself, but it is 
> kind of statistical computation problems, please forgive me to put 
> questions here.
>
> Rui
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list