Learn R Programming

rapport (version 0.3)

lambda.test: Goodman and Kruskal's lambda

Description

Computes Goodman and Kruskal's lambda for given table.

Usage

lambda.test(table, direction = 0)

Arguments

table
a table of two variables
direction
numeric value of c(0,1,2) where 1 means the lambda value computed for row, 2 for columns and 0 for both

Value

  • computed lambda value(s) for row/col of given table

Examples

Run this code
lambda.test(table(mtcars$am, mtcars$gear))
lambda.test(table(mtcars$am, mtcars$gear), 1)
lambda.test(table(mtcars$am, mtcars$gear), 2)

Run the code above in your browser using DataLab