Description Usage Arguments Examples
View source: R/GenerateCrossTables.R
This function generates cross tables for the columns of covariates in a data.table in relation to a binary dependent variable. It returns a list containing the cross tables
1 | GenerateCrossTables(Target, Covariate, DT, Groups, UseLogit = T)
|
Target |
The name of the binary dependent variable. |
Covariate |
The name of the covariates for which the cross tables will be generated on. |
DT |
A data.table which contains the covariates and the binary dependent variable. |
Groups |
If the covariate is numeric, how many roughly equal-sized groups should they be divided into. This can be a vector of values. The highest value will first be attempted. If roughly equal-sized groups cannot be created, the second highest value will be attempted. If roughly equal-sized groups cannot be created from the lowest value, the covariate will be treated as categorical with each distinct value being a category. |
UseLogit |
Argument for NumericalTable()/ CategoricalTable(). If the value is TRUE, Log Odds will be generated. Otherwise, a set of score derived from Log Odds, scaled from 0 to 100, will be generated. |
1 2 | TableList <- GenerateCrossTables(Target = "am",
Covariate = c("mpg", "cyl", "hp"), Groups = c(3, 4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.