lambda {RCPA3} | R Documentation |
Calculates Lambda, a measure of association for a cross-tabulation.
Description
Given a table of conditional frequencies, the lambda function calculates and returns Lambda, a measure of association between two categorical variables (factors). Lambda is equal to the proportion of errors reduced by knowledge of the independent variable.
Usage
lambda(tab, digits = 3, detailed = FALSE)
Arguments
tab |
The conditional frequencies of a cross-tabulation. The dependent variable should correspond to rows and the independent variable, to columns. |
digits |
Number of decimal places of Lambda reported (defaults to 3). |
detailed |
Do you want detailed report on how lambda value calculated? (default is FALSE). |
Value
Returns the value of Lambda.
Examples
library(RCPA3)
conditional.frequencies <- table(dv=states$lgbtq.equality.3cat, iv=states$religiosity3)
lambda(tab=conditional.frequencies, detailed=TRUE)
[Package RCPA3 version 1.3.1 Index]