Epi Info™ User Guide

Command Reference

Analysis Commands: MEANS

This command is used to compute descriptive statistics for a continuous (numeric) variable. When used with a cross-tabulation variable, it also computes statistics showing the likelihood that the means of the groups are equal. The mean of a yes-no variable is the proportion of respondents answering yes.

MEANS <variable 1> {<variable 2>} {STRATAVAR=<variable(s)>} {WEIGHTVAR=<variable>} {OUTTABLE=<tablename>}

  • <variable 1> represents a numeric variable to be used to calculate means (or * for all numeric variables).
  • <variable 2> represents any variable used for cross-tabulation (optional).
  • <variable(s)> represent variable(s) to be used for stratified analysis.
  • <variable> represents a variable containing the frequency for the event.
  • <tablename> represents a name for a table to be created.

The MEANS command has two formats. If only one variable is supplied, the program produces a table similar to one produced by FREQUENCIES, plus descriptive statistics. If two variables are supplied, the first is a numeric variable containing data to be analyzed and the second is a variable that indicates how groups will be distinguished. The output of this format is a table similar to one produced by TABLES, plus descriptive statistics of the numeric variable for each value of the group variable.

Multiline (memo) variables cannot be used in MEANS. To use a Multiline variable, define a new variable and assign to it the value SUBSTRING(<old variable>,1,255) and use it in the means.

The f-test which is generated from MEANS is a generalization of the t-test. The t-test only works with two groups while the f-test works with any number of groups.

MEANS produces the following statistical tests:

  • Parametric
  • ANOVA (for two or more samples)
  • Student’s t-test (for two samples)
  • Non-parametric
  • Kruskal-Wallis one-way analysis of variance (for two or more samples)
  • Mann-Whitney U = Wilcoxon Rank Sum Test (for two samples)

Example 1: Descriptive statistics for the age variable are displayed, including the number of observations, the total, the mean, variance, standard deviation, 25%, median, 75%, maximum, minimum, and mode.

READ {.\Projects\Sample\Sample.prj}:Oswego 

Example 2: The MEANS command is used to compare two means. An independent t-test and one-way analysis of variance (ANOVA) is performed.

READ {.\Projects\Sample\Sample.prj}:EvansCounty 

Example 3: The average number of cigarettes smoked between males and females is determined.

READ {.\Projects\Sample\Sample.prj}:Smoke