numerical.predictive.power | R Documentation |
Function that graphs the density of individuals and shows their category according to a numerical variable.
numerical.predictive.power(
data,
predict.variable,
variable.to.compare,
ylab = "",
xlab = "",
main = paste("Variable Density", variable.to.compare, "according to", predict.variable),
col = NA
)
data |
A data frame. |
predict.variable |
Character type. The name of the variable to predict. This name must be part of the columns of the data frame. |
variable.to.compare |
Character type. The name of the numeric variable to compare. This name must be part of the columns of the data frame. |
ylab |
A character string that describes the y-axis on the graph. |
xlab |
A character string that describes the x-axis on the graph. |
main |
Character type. The main title of the chart. |
col |
A vector that specifies the colors of the categories of the variable to predict. |
A ggplot object.
With this function we can analyze the predictive power of a numerical variable.
ggplot
numerical.predictive.power(iris,"Species","Sepal.Length")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.