nice_var | R Documentation |
Obtain variance per group as well as check for the rule of thumb of one group having variance four times bigger than any of the other groups. Variance ratio is calculated as Max / Min.
nice_var(data, variable, group, criteria = 4)
data |
The data frame |
variable |
The dependent variable to be plotted. |
group |
The group by which to plot the variable. |
criteria |
Desired threshold if one wants something different than four times the variance. |
A dataframe, with the values of the selected variables for each group, their max variance ratio (maximum variance divided by the minimum variance), the selected decision criterion, and whether the data are considered heteroscedastic according to the decision criterion.
Other functions useful in assumption testing:
nice_assumptions
, nice_density
,
nice_normality
, nice_qq
,
nice_varplot
. Tutorial:
https://rempsyc.remi-theriault.com/articles/assumptions
# Make the basic table
nice_var(
data = iris,
variable = "Sepal.Length",
group = "Species"
)
# Try on multiple variables
nice_var(
data = iris,
variable = names(iris[1:4]),
group = "Species"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.