calc_kappa: Calculate condition number kappa

View source: R/calc_kappa.R

calc_kappaR Documentation

Calculate condition number kappa

Description

Calculates the condition number with the intercept included, following Belsley, Kuh and Welsch (1980).

Usage

calc_kappa(mod, data = NULL)

Arguments

mod

a model object created by lm, glm, lmer, glmer

Details

Adapted from the collin.fnc function in the languageR package.

Value

the condition number

Author(s)

F.J. Tweedie; Jason Grafmiller

References

Belsley, D. A. and Kuh, E. and Welsch, R. E. (1980) Regression Diagnostics. Identifying Influential Data and Sources of Collinearity, Wiley Series in Probability and Mathematical Statistics, New York.

Examples

## Not run: 
set.seed(1)
x1 <- rnorm(100)
x2 <- x1+.1*rnorm(100)
x3 <- x2 + .5*rnorm(100)
y  <- sample(0:1, 100, TRUE)
f  <- glm(y ~ x1 + x2 + x3, family = binomial, x = TRUE)
calc_kappa(f)

## End(Not run)

jasongraf1/VADIS documentation built on July 19, 2023, 10:26 p.m.