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?
--- rongguiwong <0034058 at fudan.edu.cn> wrote:> is there any existing function for computing condition index?I've written a function called "colldiag" that calculates condition indexes and variance decomposition proportions. It's available at http://www.xs4all.nl/~jhckx/R/perturb/. I plan to add some features to the "perturb" and "reclassify" functions, then upload the package to CRAN. Until then, it's only available from my website. Good luck, John Hendrickx __________________________________
rongguiwong wrote:>is there any existing function for computing condition index? > >See ?kappa Kjetil>" 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? > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > > >-- Kjetil Halvorsen. Peace is the most effective weapon of mass construction. -- Mahdi Elmandjra