Re: [R] understanding eigen(): getting non-normalized eigenvectors

2003-06-10 Thread Prof Brian Ripley
Eigenvectors are defined only up to a scalar constant (assuming distinct 
eigenvalues).  However, your `by hand' answer does not pass the simple 
test Av = lambda v for some lambda.  So you cannot reproduce incorrect
answers in R!

Your example is unusual: A is of rank 1.

On 9 Jun 2003, Christoph Lehmann wrote:

 Hi, dear R pros
 
 I try to understand eigen(). I have seen, that eigen() gives the
 eigenvectors normalized to unit length.
 
 What shall I do to get the eigenvectors not normalized to unit length?

Multiply them by any randomly chosen non-zero scalar!

 E.g. take the example:
 
  A
  
[,1]   [,2]
   V1  0.7714286 -0.2571429
   V2 -0.4224490  0.1408163
 
 Calculating eigen(A) by hand gives the eigenvectors (example from
 Backhaus, multivariate analysis):
 
  0.77143  and 0.25714
 -0.42245  0.14082

The second is not an eigenvector of A: try it!  They look like rounded
versions of A with a sign error.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] understanding eigen(): getting non-normalized eigenvectors

2003-06-09 Thread Christoph Lehmann
Hi, dear R pros

I try to understand eigen(). I have seen, that eigen() gives the
eigenvectors normalized to unit length.

What shall I do to get the eigenvectors not normalized to unit length?

E.g. take the example:

 A
 
   [,1]   [,2]
  V1  0.7714286 -0.2571429
  V2 -0.4224490  0.1408163

Calculating eigen(A) by hand gives the eigenvectors (example from
Backhaus, multivariate analysis):

 0.77143  and 0.25714
-0.42245  0.14082


but even eigen(solve(Derror)%*%Dtreat, symmetric = FALSE, EISPACK =TRUE)
which according to ?eigen should not necessarily give the normalized
eigenvectors give the vectors (such as eigen()):

$vectors
   [,1]  [,2]
[1,]  0.8770963 0.3162278
[2,] -0.4803146 0.9486833


- how can I replicate the result we get by hand (I ask because for
students it is nice to see the same results with R as the results
written in textbooks, derived manually?

Thanks a lot
Christoph

-- 
Christoph Lehmann [EMAIL PROTECTED]
University Hospital of Clinical Psychiatry

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help