## SAS function EIGVEC and R software function eigen

Super Contributor
Posts: 376

# SAS function EIGVEC and R software function eigen

Hello expert,

My question is about EIGVEC function

Why for the same Matrix : M

in SAS  IML

H=eigvec(M) gives this error:

ERROR :Floating zero divide

In R software

if we write

eigen(V) gives the rusults.

We do not get an error.

So, why we have an error in sas, but we do not have an orror in R

Thank you

Super User
Posts: 23,316

## Re: SAS function EIGVEC and R software function eigen

Not to sound like a broken record, but please post data so we can replicate your issue.

SAS Super FREQ
Posts: 4,172

## Re: SAS function EIGVEC and R software function eigen

Eigenvectors are not unique, so in general you shouldn't expect that two software packages will compute the same set of eigenvectors.

However, it is interesting that one package stops with an error.

There are several reasons why SAS/IML could fail to give an answer, but it is impossible to guess without seeing the data. If you think the computation is incorrect, please open a track with SAS technical support and provide your version of SAS, the data, and the program.

Super Contributor
Posts: 376

## Re: SAS function EIGVEC and R software function eigen

thank that s very kind from you.
please,can you give somme of them

SAS Super FREQ
Posts: 4,172

## Re: SAS function EIGVEC and R software function eigen

Anything I say would be purely conjecture. The reasons are typically related to the data (matrix). Numerical linear algebra computations are sensitive to the condition number of a matrix. So, for example, if your matrix is ill conditioned then numerical computations could be unstable and small roundoff errors could  accumulate.

Super Contributor
Posts: 376

## Re: SAS function EIGVEC and R software function eigen

[ Edited ]

Thank you.

SAS still usually uses this method to calculate eigvec , in page 518 ?

http://www.okstate.edu/sas/v7/saspdf/iml/chap17.pdf

For dbbeugging the IML program,

when I make call for eigvec(A)

I will possible to have somme options in sas 9.2 under unix to do this:

- stop running after the error message.

-debeugging the call of eigvec or making a break point

SAS Super FREQ
Posts: 4,172