Computes descriptive statistics for a numeric variable x
grouped by a categorical variable g.
Arguments
- x
a numeric variable
- digits
number of digits used to format relative frequencies
- ...
further arguments, currently unused
- main
main title for the plot; defaults to the title stored in
x$meta$main- which
integer vector selecting which plots to draw. See Details.
NULL(default) selects plots automatically based onverbose.- g
a categorical grouping variable (factor or coercible to factor)
Value
an object of class c("Desc.nq", "Desc") with components:
tabgroup-wise summary table
testresult of the Kruskal-Wallis test
vtestresult of Levene's test
etaeffect size
Details
The function summarizes the distribution of x across levels of
g and performs nonparametric tests of group differences.
Computed statistics
Group-wise descriptive statistics (mean, median, SD, IQR, counts)
Kruskal-Wallis test
Effect size (\(\eta^2\)) based on the Kruskal-Wallis statistic
Levene's test for homogeneity of variance
Interpretation
The Kruskal-Wallis test evaluates whether the distribution of x
differs between groups defined by g. The effect size \(\eta^2\)
provides a standardized measure of group differences.
