R/cond.index.R

Defines functions cond.index

Documented in cond.index

cond.index <- function(formula, data, ...)
{
reg<-lm(formula, data, x=TRUE, ...)
x.scale <- reg$x%*%diag(1/sqrt(colSums(reg$x^2)))
x.scale.svd<- svd(t(x.scale)%*%x.scale)
ci <- sqrt(max(x.scale.svd$d)/x.scale.svd$d)
return(ci)
}

Try the klaR package in your browser

Any scripts or data that you put into this service are public.

klaR documentation built on May 29, 2024, 5:20 a.m.