LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 8 Apr 2003 21:11:12 -0300
Reply-To:   Carlos Tadeu <ctsdias@CARPA.CIAGRI.USP.BR>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Carlos Tadeu <ctsdias@CARPA.CIAGRI.USP.BR>
Subject:   svd in iml
Content-Type:   text/plain; charset="iso-8859-1"

Dear SAS-l, I am trying to do a singular value decomposition of matrix A in IML using eigvec and eigval functions, but I can not reproduce the original matrix A. What is wrong? Does anyone have had the same problem? I know that SVD routine operates well. The code that I am using eigvec function is: proc iml;

reset print;

A={1 2 7 9,

0 4 5 1,

2 6 8 2};

n=nrow(A);

p=ncol(A);

AAL=A*t(A);

ALA=t(A)*A;

U=eigvec(AAL);

V=eigvec(ALA);

L=eigval(AAL);

D=sqrt(diag(L));

U=U[1:3,1:3];

V=V[1:4,1:3];

RR=U*D*t(V);

quit;

TIA

Carlos


Back to: Top of message | Previous page | Main SAS-L page