[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'> =
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'> =
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'> =
</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> =
[,1]
[,2] =
[,3] &nb=
sp;
[,4] &nb=
sp;
[,5]</span></font><=
/p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> [1,]
25 =
500
11250 &n=
bsp;
275000 =
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'> [2,] =
500
11250 =
275000
7106250 =
1.906250e+08<=
/span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> [3,] =
11250
275000 =
7106250
190625000 =
5.247656e+09</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> [4,] =
275000
7106250 190625000 =
5247656250
1.471719e+11</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> [5,] 7106250 =
190625000
5247656250 147171875000 =
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’s solve() =
function.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </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