Description Usage Arguments Value Examples
Measuring relative information between factors and output variable
1 2 | factor.penal.info.to.output(data, var.output, vars.list, alpha = 2,
return.list = FALSE)
|
data |
A data frame |
var.output |
The name of the variable output |
vars.list |
(optional) A list of pairs (variable.name,variable.type) such as those produced by |
alpha |
(defaults to 2) The penalty |
return.list |
(defaults to TRUE) If |
A data frame with three columns: variable names, the number of active levels, and their penalized relative information to the output variable
1 2 3 4 5 6 | X <- data.frame(a = factor(sample(1:3,100,TRUE)),
b = factor(sample(1:5,100,TRUE)),
c = factor(sample(letters[1:5],100,TRUE)))
factor.penal.info.to.output(X, "a", alpha = 2)
list_ <- list(c("vs","factor"),c("am","factor"),c("gear","factor"))
factor.penal.info.to.output(mtcars, "cyl", vars.list = list_, alpha = 1.5, return.list = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.