Description Usage Arguments Details Value Author(s) References See Also Examples
Compute some common descriptives statistics of variables
1 2 3 |
vars |
a vector of quoted strings with the variables names or a formula, e.g. |
by |
a factor variable for subset analysis.It will be coerced to a factor. Default is |
stats |
a vector of quoted strings with the statistics to be computed. See Details |
probs |
a vector of probabilities for the quantiles computation |
labels |
a vector of quoted strings with alternate labels for the variables. If omitted |
print |
a logical indicating whether the statistics should be printed |
digits |
an integer indicating the number of decimal places to print. Default is given by the system option |
... |
further arguments for |
By default, this function computes the following statistics: n: number of observations, na: number of missing values, mean: variable means, sd: standard deviation, min: minimum value; max: maximum value, and centiles: quantiles controlled by the vector probs
. Any subset of these statistics can be selected. However, if other than these is indicated it will throw an error. The statistics in stats
are not case sensitive.
If the argument by
is set, the statistics are computed for each subset defined by the supplied vector.
These statistics are frequently found on publications regarding air pollution and health effects.
The function invisibly returns a data frame with a variable per line and a statistic per column.
Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br
Schwartz, J., Spix, C., Touloumi, G. et al. (1996) Methodological issues in studies of air pollution and daily counts of deaths or hospital admissions. J Epidemiol. Community Health 50 (suppl 1), S12–S18.
Whetherill, G. B. Elementary Statistical Methods. 2 ed. Chapman and Hall.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.