On Mon, 18 Feb 2008, Talha Yalta wrote:
While preparing the notes for my econometrics class, I noticed that
for Table_10.5.gdt from the Gujarati dataset, Gujarati reports that
the Condition Index is found by SAS as \sqrt{3.0/0.00002422} (the
squareroot of the biggest eigenvalue divided by the smallest)
When I choose from the menu: View--Principal components, I see the
eigen values reported as 2.9720 and 0.0009 (instead of 0.00002422)
Can this be due to an accuracy error?
First, it seems you have run principal components on Y, X2 and X3, while
the condition number is computed on the X matrix (therefore, on a matrix
whose columns should be const, X2 and X3, suitably scaled).
Second, I don't know how SAS computes the condition number or if Gujarati
reports approximate figures, but there must be something wrong in
Gujarati's computations: if the eigenvalues refer to the X matrix with
columns scaled to have Euclidean norm 1, then the its cross-product matrix
must have ones on the diagonal and be positive (semi)definite. This means
that its trace is 3. Since all eigenvalues are non-negative and their sum
must be 3 (\sum_{i=1}^n \lambda_i = trace), it's impossible that the
largest eigenvalue is exactly 3 and the smallest one is positive.
Or maybe, the definition of condition number is something different. In
this case, I apologise.
<script>
open Table_10.5.gdt
matrix X = { const X2 X3 }
l = sqrt(diag(X'X))
matrix X = X ./ l'
XX = X'X
print XX
l = eigensym(XX, null)
print l
CN = maxc(l)/minc(l)
printf "CN = %g, (square root = %g)\n", CN, sqrt(CN)
</script>
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti