describe makes a simple description of a variable 'x' in one or more groups defined by the factor 'by'. If 'x' is a factor, frequency tables and (optionally) barplots are shown. If 'x' is a numeric variable, the variable is summarized in mean and sd in each group if 'x' is normal. In other case it is summarized in median and percentiles (by default 25 and 75 percentiles). A comparison betweed two groups is made by a t.test in the normal case and by a wilcoxon test in other case. When there are more than two groups, anova F-test and Kruskal-Wallis test are used. Optionally histograms and boxplots are printed.
1 2 3 |
x |
variable to be summarized. |
by |
variable for identifying groups, interpreted as factor |
xlabel |
Label of the variable x, to be used in figures and tables. |
bylabel |
Label of the variable by, to be used in figures and tables. |
plot |
Logical. If TRUE a plot is printed |
pctBycol |
Logical. If TRUE, relative frequencies in crosstabs are computed by columns else by rows. |
report. |
If "auto" a Shapiro test is made; only mean and sd (if variable can be assumed to be |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.