describe: Univariate summary of a variable for each level of a factor...

Description Usage Arguments

Description

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.

Usage

1
2
3
describe(x, by = NULL, xlabel = NULL, bylabel = NULL, plot = FALSE,
  report = "auto", showDescriptives = TRUE, pctBycol = TRUE, title = "",
  digits = 2)

Arguments

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


angeloSdP/ULPGCmisc documentation built on May 10, 2019, 11:47 a.m.