View source: R/helper.functions.r
lambda | R Documentation |
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.
lambda(tab, digits = 3, detailed = FALSE)
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). |
Returns the value of Lambda.
library(RCPA3)
conditional.frequencies <- table(dv=states$lgbtq.equality.3cat, iv=states$religiosity3)
lambda(tab=conditional.frequencies, detailed=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.