Re: [R] singularity problem

2013-10-14 Thread Rolf Turner
On 10/14/13 23:31, Šárka Rusá wrote: Dear R, I have a problem concerning the inverse of a matrix. My matrix is quite large and I extracted just linearly independent columns from the matrix. However, the function solve() still cannot invert the matrix - I get an error that it is computationally s

[R] singularity problem

2013-10-14 Thread Šárka Rusá
Dear R, I have a problem concerning the inverse of a matrix. My matrix is quite large and I extracted just linearly independent columns from the matrix. However, the function solve() still cannot invert the matrix - I get an error that it is computationally singular. Is there any way how to extrac

Re: [R] Singularity problem

2011-03-16 Thread Feng Li
e Cramer's Rule, but it will give you a feel for the issue. HTH Rex -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Berend Hasselman Sent: Wednesday, March 16, 2011 1:33 PM To: r-help@r-project.org Subject: Re: [R] Si

Re: [R] Singularity problem

2011-03-16 Thread Berend Hasselman
On 16-03-2011, at 21:11, David Winsemius wrote: > > On Mar 16, 2011, at 1:32 PM, Berend Hasselman wrote: >> . >> svd(a) indicates the problem. >> >> largest singular value / smallest singular value=1e17 (condition number) >> --> reciprocal condition number=1e-17 >> and the standard solve c

Re: [R] Singularity problem

2011-03-16 Thread William Dunlap
; Sent: Wednesday, March 16, 2011 1:12 PM > To: Berend Hasselman > Cc: r-help@r-project.org > Subject: Re: [R] Singularity problem > > > On Mar 16, 2011, at 1:32 PM, Berend Hasselman wrote: > > > > > Peter Langfelder wrote: > >> > >> On Wed, Mar

Re: [R] Singularity problem

2011-03-16 Thread rex.dwyer
[mailto:r-help-boun...@r-project.org] On Behalf Of Berend Hasselman Sent: Wednesday, March 16, 2011 1:33 PM To: r-help@r-project.org Subject: Re: [R] Singularity problem Peter Langfelder wrote: > > On Wed, Mar 16, 2011 at 8:28 AM, Feng Li <m...@feng.li> wrote: >> Dear R, >> &

Re: [R] Singularity problem

2011-03-16 Thread David Winsemius
On Mar 16, 2011, at 1:32 PM, Berend Hasselman wrote: Peter Langfelder wrote: On Wed, Mar 16, 2011 at 8:28 AM, Feng Li wrote: Dear R, If I have remembered correctly, a square matrix is singular if and only if its determinant is zero. I am a bit confused by the following co

Re: [R] Singularity problem

2011-03-16 Thread Berend Hasselman
Peter Langfelder wrote: > > On Wed, Mar 16, 2011 at 8:28 AM, Feng Li wrote: >> Dear R, >> >> If I have remembered correctly, a square matrix is singular if and only >> if >> its determinant is zero. I am a bit confused by the following code error. >> Can someone give me a hint? >>

Re: [R] Singularity problem

2011-03-16 Thread Peter Langfelder
On Wed, Mar 16, 2011 at 8:28 AM, Feng Li wrote: > Dear R, > > If I have remembered correctly, a square matrix is singular if and only if > its determinant is zero. I am a bit confused by the following code error. > Can someone give me a hint? > >> a <- matrix(c(1e20,1e2,1e3,1e3),2) >> det(a) > [1]

Re: [R] Singularity problem

2011-03-16 Thread Allan Engelhardt
Numeric underflow. Try qr.solve(a) Allan On 16/03/11 15:28, Feng Li wrote: Dear R, If I have remembered correctly, a square matrix is singular if and only if its determinant is zero. I am a bit confused by the following code error. Can someone give me a hint? a<- matrix(c(1e20,1e2,1e3,1e3),

[R] Singularity problem

2011-03-16 Thread Feng Li
Dear R, If I have remembered correctly, a square matrix is singular if and only if its determinant is zero. I am a bit confused by the following code error. Can someone give me a hint? > a <- matrix(c(1e20,1e2,1e3,1e3),2) > det(a) [1] 1e+23 > solve(a) Error in solve.default(a) : system is compu

Re: [R] Singularity problem

2010-01-08 Thread David Winsemius
On Jan 8, 2010, at 4:50 PM, Moohwan Kim wrote: Dear R family I have a problem with invertibility in a matrix. m1 <- ar(x, method='mle') Error in solve.default(res$hessian * length(x)) : Lapack routine dgesv: system is exactly singular How could I avoid this problem? Take out the colline

[R] Singularity problem

2010-01-08 Thread Moohwan Kim
Dear R family I have a problem with invertibility in a matrix. m1 <- ar(x, method='mle') Error in solve.default(res$hessian * length(x)) : Lapack routine dgesv: system is exactly singular How could I avoid this problem? Best Moohwan __ R-help@r-pr