Automatic judgment of ordinal scale and nominal scale and calculation of p-value from association.
Automatic judgment of ordinal scale and nominal scale and calculation of p-value from association. Calculate the relationship between all order scales and nominal scales for explanatory variables specified in formula form and calculate p-values.
You can install from R console.
If devtools is not installed on your PC, install devtools with Internet connection.
install.packages("devtools")
Install from GitHub using devtools.
library(devtools)
install_github("ToshihiroIguchi/calcor")
Load the elasticnet package and attach it.
library(calcor)
We will explain with Fisher's iris as an example. For Sepal.Length that can be treated as an order scale, calculate the p-value of each item from the relation of other items.
result1 <- calcor(Sepal.Length ~ ., iris)
Display a list of p-values calculated by each method. Also, items that could not be calculated are also displayed.
summary(result1)
A bar graph of p-value is displayed by the plot function.
plot(result1)
The correlation is shown in slide show in ascending order of p-value.
slideshow(result1)
For Species that can be treated as an nominal scale, calculate the p-value of each item from the relation of other items.
result2 <- calcor(Species ~ ., iris)
MIT
Toshihiro Iguchi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.