lm
,
bdLm
, and
upper
.
kappa(z) kappa.default(z) kappa.lm(z) kappa.upper(z)
The condition number itself is the ratio of the largest to the smallest
non-zero singular value of the matrix.
Methods for
kappa
generally use a cheap approximation to this.
This may underestimate the condition number, but rarely by more than
a factor of 5 or so, which in most applications is within the
range of vagueness in applying the condition number anyway.
lmfuel <- lm(Fuel ~ Weight + Disp., data=fuel.frame) kappa(lmfuel) # Same value as the above: kappa(cbind(1, fuel.frame$Weight, fuel.frame$Disp.))