[R] how to compute condition index?

rongguiwong 0034058 at fudan.edu.cn
Wed Nov 3 13:12:02 CET 2004


is there any existing function for computing condition index?
" analysing multivariate data" say that we can use condition index to check 
multicollinearity.saying that we can get it via SVD. The elements of the 
diagnoal matrix are the standard deviations of the uncorrelated vectors. the 
condition index is the ratio of the largest of these numbers to the smallest.
so if i have a data frame a,containg variables x,y,z.
my model is :
model<-lm(y~x+z,data=a)
so use the following to compute the condition index,but it seems wrong.

temp<-svd(model.matrix(model))$d
max(temp)/min(temp)

is it wrong?




More information about the R-help mailing list