Re: [R] Matlab inv() and R solve() differences

2009-01-30 Thread Stephan Kolassa
Hi Cleber, there is no hard-and-fast "magic number" here. Ill-conditioning also depends on what you are trying to do (inference? prediction?). The condition number is only one of a number of conditioning/collinearity diagnostics commonly used. Take a look at: Golub, G. H., & Van Loan, C. F.

Re: [R] Matlab inv() and R solve() differences

2009-01-30 Thread Peter Dalgaard
Berend Hasselman wrote: > > > Joseph P Gray wrote: >> I submit the following matrix to both MATLAB and R >> >> x= 0.133 0.254 -0.214 0.116 >> 0.254 0.623 -0.674 0.139 >>-0.214 -0.674 0.910 0.011 >> 0.116 0.139 0.011 0.180 >> >> MATLAB's inv(x) provides the following >> 137.21 -50.6

Re: [R] Matlab inv() and R solve() differences

2009-01-30 Thread Berend Hasselman
Joseph P Gray wrote: > > I submit the following matrix to both MATLAB and R > > x= 0.133 0.254 -0.214 0.116 > 0.254 0.623 -0.674 0.139 >-0.214 -0.674 0.910 0.011 > 0.116 0.139 0.011 0.180 > > MATLAB's inv(x) provides the following > 137.21 -50.68 -4.70 -46.42 > -120.71 27.28 -

Re: [R] Matlab inv() and R solve() differences

2009-01-30 Thread Cleber Nogueira Borges
Hello, is there a upper limit to kappa value where I can consider a matrix well-conditioned? Cleber Kingsford Jones wrote: I suppose the solution is unstable because x is ill-conditioned: x [,1] [,2] [,3] [,4] [1,] 0.133 0.254 -0.214 0.116 [2,] 0.254 0.623 -0.67

Re: [R] Matlab inv() and R solve() differences

2009-01-30 Thread Peter Dalgaard
Joseph P Gray wrote: I submit the following matrix to both MATLAB and R x= 0.133 0.254 -0.214 0.116 0.254 0.623 -0.674 0.139 -0.214 -0.674 0.910 0.011 0.116 0.139 0.011 0.180 MATLAB's inv(x) provides the following 137.21 -50.68 -4.70 -46.42 -120.71 27.28 -8.94 62.19 -58.15 6.93

Re: [R] Matlab inv() and R solve() differences

2009-01-29 Thread Berwin A Turlach
G'day all, On Thu, 29 Jan 2009 19:24:40 -0700 Kingsford Jones wrote: > I suppose the solution is unstable because x is ill-conditioned: While, as you show, x is ill-conditioned, I do not believe that this is serious enough to explain the differences that Pat sees between MATLAB and R. In fac

Re: [R] Matlab inv() and R solve() differences

2009-01-29 Thread Kingsford Jones
I suppose the solution is unstable because x is ill-conditioned: > x [,1] [,2] [,3] [,4] [1,] 0.133 0.254 -0.214 0.116 [2,] 0.254 0.623 -0.674 0.139 [3,] -0.214 -0.674 0.910 0.011 [4,] 0.116 0.139 0.011 0.180 > cor(x) [,1] [,2] [,3] [,4] [1,] 1.000

[R] Matlab inv() and R solve() differences

2009-01-29 Thread Joseph P Gray
I submit the following matrix to both MATLAB and R x= 0.133 0.254 -0.214 0.116 0.254 0.623 -0.674 0.139 -0.214 -0.674 0.910 0.011 0.116 0.139 0.011 0.180 MATLAB's inv(x) provides the following 137.21 -50.68 -4.70 -46.42 -120.71 27.28 -8.94 62.19 -58.15 6.93 -7.89 36.94 8.35