[Rd] (PR#3427)

Dursun.Bulutoglu at afit.edu Dursun.Bulutoglu at afit.edu
Tue Jul 8 00:12:32 MEST 2003


This is a multi-part message in MIME format.

------_=_NextPart_001_01C344CC.73C3DE10
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi;

            I am having problems inverting matrices using the function
solve()

            For example R can not invert the following matrix

                 =20

              [,1]           [,2]              [,3]              [,4]
[,5]

  [1,]      25            500              11250           275000
7.106250e+06

  [2,]      500          11250           275000         7106250
1.906250e+08

  [3,]      11250       275000         7106250       190625000
5.247656e+09

  [4,]      275000     7106250       190625000     5247656250
1.471719e+11

  [5,]      7106250   190625000    5247656250   147171875000
4.184754e+12

solve(t(xxmodel)%*%(xxmodel))

Yields the following massage:

Error in solve.default(t(xxmodel) %*% (xxmodel)) : singular matrix `a'
in solve

The above 5X5 matrix is invertible. It has non-zero eigenvalues. Could
someone explain whether there is a problem in R's solve() function.

=20

Dursun Bulutoglu


------_=_NextPart_001_01C344CC.73C3DE10
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Hi;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; I
am having problems inverting matrices using the function =
solve()</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; For
example R can not invert the following matrix</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 &nbsp;&nbsp;&nbsp;&nbsp;[,1]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[,2]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[,3]&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[,4]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[,5]</span></font><=
/p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp; [1,]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;500&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11250&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;275000 =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7.10625=
0e+06</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp; [2,]&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;500&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11250&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;275000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;7106250 =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.906250e+08<=
/span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp; [3,]&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;11250&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;275000&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7106250&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;190625000 =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.247656e+09</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp; [4,]&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;275000&nbsp;&nbsp;
&nbsp;&nbsp;7106250&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;190625000&nbsp; =
&nbsp;&nbsp;&nbsp;5247656250
&nbsp;&nbsp;&nbsp;&nbsp;1.471719e+11</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp; [5,] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7106250 =
&nbsp;&nbsp;190625000
&nbsp;&nbsp;&nbsp;5247656250 &nbsp;&nbsp;147171875000 =
&nbsp;&nbsp;4.184754e+12</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>solve(t(xxmodel)%*%(xxmodel))</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Yields the following massage:</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Error in solve.default(t(xxmodel) %*% (xxmodel)) : =
singular
matrix `a' in solve</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The above 5X5 matrix is invertible. It has non-zero =
eigenvalues.
Could someone explain whether there is a problem in R&#8217;s solve() =
function.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Dursun Bulutoglu</span></font></p>

</div>

</body>

</html>
=00
------_=_NextPart_001_01C344CC.73C3DE10--



More information about the R-devel mailing list