EI Intro

Introduction to Epi Info

Epi Info is a series of freely distributable tools and utilities for Microsoft Windows for use by public health professionals in conducting outbreak investigations, managing databases for public health surveillance and other tasks, and general database and statistics applications. With Epi Info and a personal computer, physicians, epidemiologists, and other public health and medical workers can rapidly develop a questionnaire or form, customize the data entry process, and enter and analyze data.

Epi Info contains a set of tools and utilities which can be installed individually or collectively. Epi Info is free and can be downloaded from the Centers for Disease Control and Prevention (CDC) website at http://www.cdc.gov/epiinfo.

Epi Info Tools

  • MakeView - Create the questionnaire, form, or View to collect and view data

  • Enter - Enter data and show existing records in the View

  • Analysis - Run statistical analyses, lists, tables, graphs, charts, etc.

  • Epi Map - Create maps or view data geospatially

  • Epi Report - Create reports or templates for future reports as data are revised

  • Menu - Choreograph all the Epi Info tools and programs to create an application

Additional Utilities

  • Compact - Reclaim unused space in the database

  • NutStat - Nutritional Anthropometry using WHO and CDC growth charts

  • Translation - Use the Epi Info tools in languages other than English

  • Data Compare - Check and reconcile discrepancies from double-data entry

  • Epi Lock - Compress Epi Info data and protect it with up to 128-bit encryption

  • StatCalc - Epidemiologic calculators for statistics of summary data

  • VisData - Examine Epi Info data tables "behind the scenes"

  • Table-to-View - Create an Epi Info View from a data table

Epi Info Tools Overview

MakeView

MakeView is used to place prompts and data entry fields on one or many pages of a View. Since this process also defines the database(s) that are created, MakeView can be regarded as both the form designer and the database design environment.

The Check Code editor within MakeView is used to customize the data entry experience providing many commands, functions, and operators to validate data as they are entered, auto-calculated fields, provide skip patterns, and messages to the data entry user. For more about MakeView, see the topic Introduction to MakeView.

Enter

Enter displays the View that was constructed in MakeView. It constructs a data table if necessary; controls the data entry process using the settings and check code that was specified in MakeView; and provides a search function so that records can be located that match values specified for any combination of variables or fields on the View. In Enter, the cursor moves from field to field and from page to page automatically, saving data as necessary. Navigation buttons provide access to new, previous, next, first, and last records, and to their related tables. For more about Enter, see the topic Introduction to Enter.

Analysis

Analysis is the Epi Info tool used for analyzing data. These data may have been collected using Epi Info or another type of database. Analysis can read many common data formats such as DBase, FoxPro, Excel and others. Analysis offers simple and intuitive tools for producing many forms of statistics useful for epidemiologists and other public health professionals. In addition, Analysis produces graphs and interacts easily with Epi Map for displaying geographic data. For more about Analysis, see the topic Introduction to Analysis.

Epi Map

Epi Map, the mapping component of Epi Info, is built around MapObjects software from ESRI, the makers of ArcView and ArcInfo, popular Geographic Information System (GIS) tools. Epi Map displays shapefiles from these two systems, and thus can use the enormous reservoir of map boundaries and geographic data available on the Internet in ESRI-compatible formats.

Epi Map is designed to show data from Epi Info files by relating data fields to shapefiles containing the geographic boundaries. Shapefiles also can contain data on population or other variables, and can therefore provide numeric data that become part of the display either as numerator or denominator. Numeric data can be displayed either as color/pattern (choropleth) maps or as dot density maps with the dots randomly distributed within geographic regions. For more about Epi Map, see the topic Introduction to Epi Map.

Epi Report

Epi Report is used to design and generate various reports. An end user can include various elements in the reports generated, and these elements can be bound to various data sources. Record lists, cell replacement, groups, fragments from Analysis XML can be included in the report. Data analysis through a pivot table is also provided. Apart from these, system variables and permanent variables (variables created by Epi Info) can also be included. For more about Epi Report, see the topic Introduction to Epi Report.

Menu

Menu provides a way to orchestrate all of the Epi Info tools and programs (PGMs) written in Analysis and other Menu scripts. Menu is a general purpose, configurable menu system that can be used in Windows 98, NT, 2000, XP, Vista, or 7 to offer menu items and command buttons that lead to other programs, functions, images, and text to create a theme. By choosing menu items or buttons on a menu, the user can run other programs or any function for which a Windows or DOS program is available. A command called EXECUTE can be used to allow Windows to determine from the file extension (.htm or .txt, for example) which program should be used to display the file. Because Menu can run DOS batch commands, a series of operations can be specified from a menu choice or button. This makes more complex and repetative tasks, such as copying files for backup or transmission to another destination, as easy as just one or two mouse clicks. For more about Menu, see the topic Introduction to Menu.

Epi Info Utilities Overview

Compact

Compact is an Epi Info utility for compacting Microsoft Access database files. As fields are added to and deleted from the project (.mdb), the space saved by deleted fields can be reclaimed using Compact. For more about Compact, see the topic Use Compact.

NutStat

NutStat is a program for recording and evaluating measurements of length, stature, weight, head circumference and arm circumference for children and adolescents. It can be run as a standalone program or linked to an Epi Info View.

The program calculates percentiles, number of standard deviations from the mean (z-scores), and in some cases, percent of median, using the following references:

  • The sex specific 1978 CDC/WHO normalized version of the 1977 NCHS reference curves for height-for-age, weight-for-age, and weight-for-height.

  • WHO reference data for arm circumference-for-age and arm circumference-for-height.

  • The sex specific 2000 CDC reference curves for head circumference-for-age, length-for-age, weight-for-length, weight-for-age, stature-for-age, weight-for-stature, and body mass index (BMI)-for-age.

For more about NutStat, see the topic Introduction to NutStat.

Translation

Translation of the Epi Info tools and utilities, help files, and exercises into non-English languages is made by placing all English phrases used in Epi Info into a database called LANGUAGE.MDB. This database is located in the ENGLISH sub-folder under the main directory of Epi Info (usually C:\Epi_Info). Help files and exercises are also contained in the ENGLISH directory or its sub-folders. Translated phrases, help files, and exercises are placed in similar directories named after its respective language. For example, the Spanish translation would be in a folder named SPANISH. Hence, translation can be done without changing the names of files. Individual translations can be installed or uninstalled without affecting the main programs. Switching from one language to another can be done from the main Epi Info Menu, and is mediated through setting the LANGUAGE variable in the file EpiInfo.ini file. For more about Translation, see the topic Translation Features.

Data Compare

Data Compare is an application for finding the differences between two tables. It is useful for checking the accuracy of double key entry database creation. It can also be used to easily find changes in a database updated by more than one organization.

Data Compare supports Access 97, Access 2000, and Access 2003 databases in the following Microsoft Windows platforms: Windows 98, NT, 2000, XP, Vista, and 7.

Data Compare can be run either from a new script or an existing script. The output of Data Compare includes screen display on a “Differences” Tab and an “Unmatched Records” Tab and printable reports, “Table Structure Report (in Text file format)” and an HTML Report. For more about Data Compare, see the topic Introduction to Data Compare.

Epi Lock

Epi Lock provides encryption to control access to data files and compression to facilitate both transmission and making backup copies. Using Epi Lock, files can be encrypted with a password to prevent unauthorized access to the data. The encryption mechanism also provides some assurance that the files have not been altered in transmission, since they will not decrypt properly if altered. Epi Lock also performs the function of properly deleting the unencrypted version (“clear text”) version of the file after testing to make sure that the encrypted version can be decrypted to produce the identical result. For more about Epi Lock, see the topic Introduction to Epi Lock.

StatCalc

StatCalc is an epidemiologic calculator that produces statistics from summary data entered on the screen. Three types of calculations are offered: Statistics from 2-by-2 to 2-by-n tables; Sample Size Calculations; and Chi Square for Trend. For more about StatCalc, see the topic Introduction to StatCalc.

VisData

VisData is a utility program supplied by Microsoft with Visual Basic for reading data files and examining and changing their properties. VisData can be used to examine the fields and properties in a variety of data file types; to display the data in spreadsheet (grid) format; and to edit or delete data items, rows, or columns. Utility functions are offered to compact or repair data files. Compact does not perform compression, but will reorganize files in which a great deal of editing has been done so that they require less disk space. The Repair feature examines damaged files and repairs the damage if possible. For more about VisData, see the topic Introduction to VisData.

Table-to-View

Table-To-View is an Epi Info utility that can create a simple View (questionnaire) from an existing data table. Fields are arranged in a single column, but they can be moved around and the esthetics improved in MakeView. For more about Table-To-View, see the topic Use Table-To-View.


Help File Conventions

Conventions Used in this Help File

This section describes typographic conventions used in this document.

Example of Convention

Explanation

Boldface type

Boldface type is used to emphasize heading levels and column headings, as well as the following literals when writing procedures:

  • Names of options and elements that appear on screens

  • Keys on the keyboard

  • User input for procedures

Italic type

Italic type is used to accentuate words or phrases that have special meaning or are being defined.

Courier New

The Courier New typeface is used for code samples.

Hyperlink

A hyperlink provides quick and easy access to topics that are cross-referenced. Hyperlinks are highlighted in blue and may be underlined.

File > Print...

The sequence used to identify menu choice and command selection.

Syntax Notations

The following rules apply when reading this document and using syntax:

Syntax | Explanation
ALL CAPITALS | Epi Info commands and reserved words are shown in all capital letters.
<parameter> | A parameter is information to be supplied to a command or function. Parameters are enclosed with less-than and greater-than symbols. Each valid parameter is described following the statement of syntax for the command. Parameters are required by the command unless they are enclosed in braces { }. Do not include the < > or { } symbols in the code.
[<variable(s)>] | Brackets [ ] around a parameter indicate that there can be potentially more than one parameter.
{<parameter>} | Braces { } around a parameter indicate that the parameter is optional. Do not include the { } symbols in the code.
| | The pipe symbol '|' is used to denote a choice and is usually used with optional parameters. An example of this is seen in the LIST command. You can use either the GRIDTABLE option or the UPDATE option, but not both. The syntax appears as follows with the pipe symbol between the two options: LIST {* EXCEPT} [<variable(s)>] {GRIDTABLE | UPDATE}
* | An asterisk in the beginning of a line of code, as shown in some code examples, indicates a comment. Comments are skipped when a program is run.
" " | Quotation marks must surround all text values. DIALOG "Notice: Date of birth is invalid."
\ | A backslash symbol is used to indicate that a long command continues to the next line. LIST PatientID FirstName LastName Age Weight \ Height Ill Food GRIDTABLE

Epi Info™

Version 3.5.3

January 26, 2011

Epi Info for Windows Icon


User Requirements

System Requirements

Windows 98, NT 4.0, 2000 Requirements

  • A 200-megahertz (MHz) processor (Pentium compatible or greater)

  • 32 MB of Random Access Memory.

  • 64 MB for Windows NT 4.0 and 2000

  • At least 260 megabytes of free hard disk space to install; 130 megabytes after installation.

Windows XP Requirements

  • Pentium 300 megahertz (MHz) processor or faster (300 MHz is recommended)

  • At least 260 megabytes of free hard disk space to install; 130 megabytes after installation.

NOTES

  • To install Epi Info, administrative or power user rights to the computer are required.

  • Users must be able to read and write to the Epi Info installation directory.

  • Epi Info should be installed locally on each user’s machine. Multiple users sharing the same machine can share the same installation of Epi Info.

  • Installation to a network drive is not supported.

  • In order to run the Epi Report module, Internet Explorer 5.0 or above is required. The Print Preview feature of Epi Report requires Internet Explorer 5.5 or above.

  • For additional limitations based on the Windows© environment, see Epi Info limitations.


Navigate Epi Info

Epi Info modules can be opened individually by accessing the Windows Start > All Programs > Epi Info menu. When the application is installed an Epi Info icon is placed on the desktop. Double clicking the icon opens the Epi Info main menu where all programs and utilities can be accessed as well as the options to create and customize your own menu items. The Epi Info main menu also provides the Epi Info version number and application date information, which is needed when contacting technical support.

Selecting from the navigation menu opens modules and provides access to Utilities and custom settings.

  • Programs allows you to access the main Epi Info modules: Make View, Enter, Analysis, Epi Map, Epi Report, and NutStat. The application can also be closed from the Programs drop down menu.

  • Edit allows you to customize the current menu by providing access to Picture, Edit this Menu, Buttons On or Off, and Move/Resize Buttons.

  • Settings provides access to the following translation and language options: Choose Language, Install Language, Merge Language. Settings also provides the ability to Choose Epi Info Database Version, Choose Import Year and SplitYear, Set Working Directory, and Set INI File Directory.

  • Utilities provides access to StatCalc, Data Compare, Table-to-View, Visualize Data, Epi Lock, Compact, and Word Processor.

  • Help provides access to the online help table of contents, Translations help, How to Edit a Menu help, What is New, About Epi Info and the Tutorials.

Clicking the menu buttons allow easy access to the most used modules: Make View, Enter, Analysis, Epi Map, Epi Report, the Epi Info website (requires internet connection) and the ability to exit the application.


Tech Support and Contact Information

The Centers for Disease Control and Prevention (CDC) provides funding for the Epi Info Help Desk, which offers free technical support to all Epi Info users during normal eastern standard time working hours of 8:30 am to 4:30 pm.

If you have any questions or issues with the Epi Info 3.5.3 system, contact the Epi Info Help Desk:

Epi Info Help Desk Phone Number: | 404-498-6190
Epi Info E-mail: | epiinfo@cdc.gov

Website

The latest version of the Epi Info software, as well as shapefiles for Epi Map, comprehensive tutorials, and translations can be downloaded from the Epi Info website.

WebBoard

The Epi Info WebBoard provides a forum for user questions and answers. Join the group by creating a user account at http://www.phconnect.org/group/epiinfo following the instructions for joining.


Acknowledgements

A Database and Statistics Program for Public Health Professionals

CDC Core Team (in alphabetical order):

  • José Aponte

  • Harold Collins

  • Mohammad Islam

  • Erik Knudsen

  • Roger Mir

  • David Nitschke

Key Contributors (in alphabetical order):

José Aponte, Tom Arner, David Brown, Karl Brendel, Gerald Bryant, Chuck Burris, Eirik Collins, Harold Collins, Trellis Crawford, Patrick Cronin, Kimberly Dalbey, Donna Davis, Andy Dean, Karen DeRosa, Robert Fagan, Eric Fontaine, Nicholas Fontaine, Roger Friedman, George Fuller, Jr., Zack Gao, Michael Graham, Jeremy Grecco, James Haines, Anthony Houston, Justin Hsu, Mohammad Islam, Estrelita Jones, Shannon Jones, Shekeita Chavis Jones, Smita Kakaraddi, Erik Knudsen, Matthew Lantinga, Kishore Meduri, Roger Mir, Chelsea Navo, Enrique Nieves, David Nitschke, Sireesha Sangam, Meng Hua (Michael) Shu, D. Chris Smith, Kevin Sullivan, Godha Sunki, Andre Swoope, Thomasine Thomas, Amy Thompson, Aree Tyson, Shirley Wallace, Juan Carlos Zubieta.

Special thanks to past CDC sponsors:

  • Andy Dean

  • Robert Fagan

  • Enrique Nieves

Suggested citation: Dean AG, Arner TG, Sunki GG, Friedman R, Lantinga M, Sangam S, Zubieta JC, Sullivan KM, Brendel KA, Gao Z, Fontaine N, Shu M, Fuller G, Smith DC, Nitschke DA, and Fagan RF. Epi Info™, a database and statistics program for public health professionals. Centers for Disease Control and Prevention, Atlanta, Georgia, USA, 2007.

Previous versions produced in collaboration with the World Health Organization (WHO), Geneva, Switzerland, by Andrew G. Dean, Jeffrey A. Dean, Denis Coulombier, Anthony H. Burton, Karl A. Brendel, Donald C. Smith, Richard C. Dicker, Kevin M. Sullivan, Thomas G. Arner and Robert F. Fagan.

  • Program design by Andrew G. Dean and Thomas G. Arner (Epi Map).

  • Manual by Andrew G. Dean, Juan Carlos Zubieta, Kevin M. Sullivan, Cecile Delhumeau, Ralph H. Lord, Jr., Shonna Luten and Shannon Jones.

  • Programming by Godha Sunki, Thomas G. Arner, Roger Friedman, Matthew Lantinga, Andrew G. Dean, Sireesha Sangam, Saliil Diskalkar, Karl A. Brendel, Nicholas Fontaine, Zack Gao, George W. Fuller, Jr., Meng Hua Shu, Eric Fontaine, Chris Smith and David Nitschke.

  • Tutorial exercises by Juan Carlos Zubieta, Consuelo M. Beck-Sagué, G. Allen Tindol, Karen DeRosa, Jinghong Ma and Shannon Jones.

Division of Epidemiology and Analytic Methods

Epidemiology and Analysis Program Office

Office of Surveillance, Epidemiology, and Laboratory Services

Centers for Disease Control and Prevention (CDC)

1600 Clifton Road, (Mail Stop E-33)

Atlanta, Georgia 30333

This manual and the programs are in the public domain and may be freely copied, translated, and distributed. They are available on the Internet at www.cdc.gov/epiinfo.

Epi Info Hotline for Technical Assistance

epiinfo@cdc.gov

(404) 498-6190 voice

Additional Acknowledgements

Environmental Systems Research Institute, Inc., the publishers of ArcView and ArcInfo, provided a special waiver for royalty-free distribution of the MapObjects mapping engine contained in Epi Map, on condition that Epi Map is distributed only with Epi Info. Robert K. Jung, ARJ Software, Norwood, Massachusetts, gave permission for use of ARJ compression programs used in distributing translations. Dr. David Martin, Brookline, Massachusetts, and A. Ray Simons, Atlanta, Georgia, provided Turbo Pascal procedures for exact confidence limits. The programs for logistic regression and Kaplan-Meier survival analysis are based on the MULTLR and KMSURV programs of Eduardo Franco, PhD, and Nelson Campos-Filho, with their kind permission and collaboration. We thank the many beta testers who provided feedback and suggestions.

Equations Acknowledgements

We wish to thank Drs. David Martin and Harland Austin for use of their source code for computing exact and mid-p exact statistical tests and confidence intervals for the odds ratio and for the rate ratio. Thanks to those who reviewed this chapter and provided comments, and to those who tested the software.

NutStat Acknowledgements

Special thanks to Kevin Sullivan, Ph.D., Department of Pediatrics, School of Medicine and Department of Epidemiology, Rollins School of Public Health, Emory University, Atlanta, Georgia; Nathan Gorstein, World Health Organization; Phillip Neibrug, M.D., M.P.H., Norman Staehling, M.S., Ronald Fichtner, Ph.D., and Frederick Trowbridge, M.D., Centers for Disease Control and Prevention, for their assistance in preparing the Epi Info™ 6 manual upon which portions of this manual are based.

Notes

These programs are provided in the public domain to promote public health. Please give copies of the programs and the manual to friends and colleagues. The programs may be freely translated, copied, distributed, or even sold without restriction except as noted below. No warranty is made or implied for use of the software for any particular purpose.

"Epi Info" is a trademark of the Centers for Disease Control and Prevention (CDC). Please observe the following requests:

When distributing more than 10 copies of Epi Info, please report to the Epi Info Help Line the number of copies distributed, the countries to or in which they were distributed, and whether the distribution was by Internet or CD-ROM.

The programs can be translated and the examples altered for regional use, but the programs must be distributed in essentially the form supplied by CDC. Epi Map cannot be distributed separately from Epi Info. Pegrp32a.dll, Pe3do32a.ocx, Pesgo32a.ocx, Pepso32a.ocx, Pepco32a.ocx and Pego32a.ocx cannot be distributed separately from Epi Info™.

Epi Info is written in Visual Basic, Version 6, from Microsoft, Inc. The HTML Help files were converted, edited and compiled using RoboHelp. The cover art is by Pete Seidel, Public Health Practice Program Office, CDC, and Dr. John Snow, London. The master disks were tested for computer viruses with the Symantec AntiVirus virus-detection software.

Microsoft, Windows, Word, and Visual Basic are registered trademarks of Microsoft Corporation and ArcView and ArcInfo of Environmental Systems Research Institute, Inc., (ESRI). Trade names are used for identification only or for examples; no endorsement of particular products is intended or implied. The use of trade names or trademarks in this manual does not imply that such names, as understood by the Trade Marks and Merchandise Marks Act, may be used freely by anyone.

Technical Support

For new versions of the software and answers to commonly asked questions, please visit the Epi Info Web site at http://www.cdc.gov/epiinfo. Technical assistance is provided by e-mail or telephone. Information for obtaining Epi Info technical assistance is given on the title page.

The Epi Info WebBoard provides a forum for user questions and answers. Join the group by creating a user account at http://phconnect.org/group/epiinfo and following the instructions for joining.

Contact Us

Please send comments and suggestions for future versions to:

Epi Info Hotline

epiinfo@cdc.gov

(404) 498-6190 voice


What's New in Epi Info 3.5.3

Below is a brief list of some of the most important changes and enhancements that went into this release. For a comprehensive list of all changes, enhancements and bug fixes, see the ReadMe.txt file.

  1. Compatibility with the Windows 7 operating system

  2. When inserting or moving fields in MakeView, the order in which the cursor visits fields (tab order) can now be locked to preserve the original order.

  3. Included a sample prerelease version of Epi Info 7.

  4. The OpenEpi suite of statistical calculators (www.openepi.com) is included in the installation and can be accessed from the Utility section of the main menu.

  5. Globally unique identifiers (GUIDs) can be assigned in check code using a registered Windows Scripting Component (.WSC) in MakeView. GUIDs are large, random combinations of letters and numbers that are guaranteed not to repeat or overlap with those of other datasets.

  6. Extensive updates to the help documentation, including more examples in the Command Reference

  7. Updates to the standard vocabulary database made available through the Public Health Information Network (PHIN) Vocabulary Access and Dissemination System (VADS). For more information on PHIN VADS, visit http://phinvads.cdc.gov.


Introduction to MakeView

Epi Info uses the Microsoft Access data format to create Projects, files, or MDBs. Each Project contains a View and a Data Table. The View contains information about the screen appearance, how the survey looks, and how data are entered into the data table. The MakeView program is used to place prompts and data entry fields on one or many pages of a View. Since this process also defines the database(s) that are created, MakeView can be regarded as both the form designer and the database design environment.

The View and the data table live inside a Project or MDB. There can be up to 1,000 Views inside a project. Each text field can contain 128 characters. When data are entered into the project through the Enter module, it will populate the MDB. data tables that contain the actual values. Views are paired with data tables that contain the actual values.

Inside each View, fields (called variables in Analysis) are created to hold data. Variables can be stored on many pages inside a View. Use the Program Editor component of MakeView to add Check Code to variables. Check Code represents a series of rules applied to data. Functions are provided for importing files from Epi Info for DOS, aligning fields, and placing a layout grid on the workspace. Fields can also be grouped for display and used in Analysis.


Navigate the MakeView Workspace

Open MakeView by clicking MakeView from the Epi Info main menu or by selecting Programs > MakeView (Questionnaire) from the main page navigation menu.

Make View workspace

The MakeView Page panel allows for the insertion of pages into a View and provides access to the Check Code Program Editor.

The Make/Edit View window is the form, survey, or questionnaire design space. Fields are created, edited, and designed from this area of the application using the Field Definition dialog box. The workspace can be customized by selecting font, colors, and grid options. Surveys can be customized by creating code tables or Check Code.


Available Field or Variable Types

The following explains the field and variable types that are available in MakeView. Field or variable types can be created using the Field Definition dialog box. To open the Field Definition dialog box, right click in a View. Each field or variable has its own properties available when selected; however, some options may not be shown or may be disabled (grayed out) depending on the variable or field type selected. Field or Variable Type Properties can also be selected from the Field Definition dialog box.

Field Definition dialog box

  • The Text variable field is an alphanumeric field that holds 255 characters. A maximum field size can be set in order to save space. If the size will be greater than five, the value must be typed in.

  • The Label/Title field contains the name of the label or title for the question or prompt on the View. This field does not have Check Code, is not searchable, and is not in the tab order list.

  • The Text[Uppercase] field is a forced uppercase field. All information typed in this field will appear in uppercase. A maximum field size can be set in order to save space. If the size will be greater than five, the value must be typed in.

  • The Multiline field is an alphanumeric field that has the capacity to store up to 1 gigabyte of information in the field or approximately two million characters.

  • The Number field is a numeric field that has six predefined value patterns. A new pattern can be created by simply typing the pattern into the Pattern field.

  • The PhoneNumber field is a pre-determined mask field for phone numbers only. Phone extensions or international numbers cannot currently be used in this field.

  • The Date field is an alphanumeric field with pre-set date patterns that are selected from the pattern drop-down list. This field cannot be altered.

  • The Time field is an alphanumeric field with pre-set time patterns that are selected from the pattern drop-down list. This field cannot be altered.

  • The Date/Time field is an alphanumeric field with pre-set date/time patterns that are selected from the pattern drop-down list. This field cannot be altered.

  • The Yes/No field is a pre-determined field in which the only values that can be selected are yes or no. The yes or no answer is stored in the database as a 1 or 0. 1 = Yes and 0 = No. When performing Check Code use the (+) or (–) to register a yes or no response. (+) = Yes and (–) = No. Note that a Yes/No field can also store a missing value, represented by (.).

  • The Checkbox field is treated like a Yes/No field. When using the Checkbox field, there is no missing variable; it has only two values.

  • The Option field is a variable type that creates radio button selection fields for the View. The Option field is for mutually exclusive choices; only one choice can be made. If more than one choice is needed use the Checkbox option.

  • The Command Button variable type allows for the creation of an executable button on the View. For example, execute Analysis or another program such as Microsoft Excel.

  • The Image field allows an image to be inserted per record (i.e., patient, rash or bacteria picture). The image file types that are accepted are: Graphics Interchange Format (.GIF), Joint Photographic Expert Group (.JPG or .JPEG), Windows Bitmap Format (.BMP), Windows Icon File Format (.ICO), Windows Metafile Format (.WMF) and Enhanced Metafile Format (.EMF).

  • The Mirror type field only works with multiple pages in a View. For example, if a Patient ID is on page one, the value of Patient ID can be echoed or mirrored onto another page using the mirror field. Note that the mirror field will be Read Only.

  • The Grid (Table) field type creates a related table that can be inserted into a questionnaire or View to track specific information (i.e., child’s measurements).

  • The Relate field creates relationships between your main View (or "parent" View) with sub Views (or "child" Views) ONLY within the same .MDB.

Related Views are relationships between the main or parent View with sub or child Views. Related Views are linked to a parent View automatically by unique keys generated by the application. Related Views are made accessible through buttons in the View. Buttons can be created on a conditional basis so that they become available only under specified conditions, for example, when additional information is needed about a particular disease.


Available Field or Variable Properties

The following explains the field and variable properties that are available in MakeView. To open the Field Definition dialog box, right click in a View. Each field or variable has its own properties available when selected; however, some options may not be shown or may be disabled (grayed out) depending on the variable or field type selected.

  • The Repeat Last property causes the value of the same field in the last record accessed to become the default value for the designated field in the current record. Repeat Last is meant to save keystrokes during data entry for fields where a value seldom changes.

    • Example: A county or state name is often the same for each record in a given locality. Setting the REPEAT property for a field will automatically assign that field the last value entered for each new record. For the few records where the correct response may be another state or county, the value can easily be changed before the record is saved.

  • A Required field is a mandatory field. Required cannot be used in combination with Read Only since the properties are mutually exclusive. If a page contains a Required variable, the Enter module will not allow further page navigation until a value has been entered. Use this property sparingly to avoid gridlock.

  • A Read Only field does not allow the placement of the cursor in the field or the entering of data. It is particularly useful for calculated fields that are not to be changed directly. Read Only cannot be used in combination with Required since those properties are mutually exclusive.

  • Soundex is a property that is used in combination with Search and allows the finding of exact names, but also those with similar pronunciation. If a value is changed from the List Update option from Analysis, the Soundex property can still be applied. Soundex works only with English last names.

    • Example: "Smith" and "Smyth" are both converted to the same SOUNDEX code so that subsequent searches will find both names.

  • Retain Image Size maintains the size of the original image and does not alter the size to fit the image box in the View.

  • The Range property can be applied to Number or Date variable types. Range allows for a specified value between one setting and another. Values falling outside a specified range will prompt the user with a warning message in the Enter module. Missing values are accepted unless the field is also designated Required.


Navigate the MakeView Program Editor

To navigate to the MakeView Program Editor, click the blue Program button on the Page Panel or select View > Check Code from the MakeView navigation menu. The Make/Edit View: Check Commands window contains three working areas:

  • Check Command Tree

  • Make/Edit View: Check Commands window

  • Program Editor

The Program Editor can be closed and the View opened by clicking OK, CANCEL, or the close X button.

Make View Program Editor

The Check Commands Tree displays all of the available Check Commands used in the MakeView program. The Check Command Tree is not visible until you select a variable from the drop-down list.

The Program Editor window displays the code generated by the commands created from the Check Command Tree or Check Commands window. Code can also be typed directly into the Program Editor and saved.

The Make/Edit View: Check Commands window allows the selection of fields and sets when the actions designated by the Check Commands will occur during data entry. Check Commands can also be accessed in this area from the Check Commands Tab Selector.


Create a Project

Create a New Project or View

  1. From the Epi Info main menu, select MakeView or select Programs > MakeView (Questionnaire). The Make/Edit View window opens.

  2. Select File > New. The Create or Open Project window opens.

  3. Type a File Name.

  4. Click Open. The Name the View window opens.

  5. Type a name for the new View.

  • Use only letters and numbers.

  • Do not start a View name with a number.

  • Do not use any spaces.

  6. Click OK. The Make/Edit View page appears with the new View name at the top of the page.

  7. Right click in the View to open the Field Definition dialog box and begin creating fields.

Create a New View in an Existing Project

  1. Select File > New. The Name the View dialog box opens.

  • Click Change Project to navigate to another project.

  2. Type a View name.

  3. Click OK. The new View appears in the workspace.

  • A new View is created in the existing project.


Create Fields

Create Fields in a View

  1. Right click in the Make/Edit View window. The Field Definition dialog box opens.

  2. Enter the data collection information in the Question or Prompt field.

  • The Question or Prompt box allows the user to create a long question without regard to numbers, symbols or spaces.

  • To change the font name or style, click Font for Prompt.

  3. Select a Field or Variable Type from the drop-down list.

  4. Enter a Field Name or accept the default name.

  • Field Name is the name of the field that is being created from the Field Dialog box. It is stored in the View table and the data table when it is created. The Field Name is the name that will be referenced when the View data table is used in the Analysis module. If a data table exists for the View, prompts can still be changed using the Field Definition dialog box.

  • The Field Name will take part of the Question or Prompt and automatically create its own short name. Because a Field Name cannot begin with numbers, if a number is the first character in the Question or Prompt, an ‘N’ will precede the rest of the Field Name.

  • Field Name length is limited to 64 characters and cannot have spaces or punctuation, although upper and lower case are fine.

  • Once the data table contains entries, the field name cannot be changed, but the field type may be changed. MakeView will attempt to transfer the data into the new type, but in some cases it will discard incompatible data items. Changing the type of a Text field to a Numeric field will transfer numeric data, but MakeView cannot handle a number like ‘M0111’, and it will assign a missing value. A text field can safely be changed to a multiline field since both contain text. A Date only field or a Time only field can easily convert to a Date/Time field with no loss of data. However, converting a Date/Time field to a Date Field would lose the time portion of the data.

  5. Click OK. The field appears in the View.

  • To edit a field, right click on the prompt and the Field Definition dialog box appears for that field/variable.

  • If a data table has not yet been created in MakeView or there are no records in the data table you can use the Field Definition dialog box to change the following items: names, field types, and patterns.

Tip: Epi Info attempts to create a useful field name based on the question or prompt that you enter. Depending on how you structure the question, sometimes the suggested field name is awkward to use.

For example, for a question such as "What is the primary symptom?" Epi Info will suggest the field name "Whatistheprimarysymptom." For a question such as "What is the primary physicians name?" Epi Info will suggest the field name "Whatistheprimaryphysiciansname." These field names will be difficult to use and may lead to misinterpretation or other errors.

After a field name is visible in the Field Definition dialog box, you can change it by double-clicking on the words in the prompt. Using the first example, double-clicking the word "symptom" within the Question or Prompt box would cause "Symptom" to be inserted as the field name. Note that once a data table has been created for the View, field names cannot be changed.

Delete a Field

  1. Right click or double-click a prompt. The Field Definition dialog box opens.

  2. Click Delete. The field is removed from the View.

Warning: The field is deleted from the View only. Any data that may have been collected with the field is retained in the data table, but is not accessible through Enter. Deletions occur immediately. There is no prompt to verify the deletion before it occurs and there is no “undo” feature.

Recover a Field

To “recover” a deleted field used to enter data, create a new field with the same name as the field that was deleted. Then, MakeView will offer to connect the new field to the pre-existing data.


Edit a Field

Edit a Field in a View

  • To edit a field, right click on the prompt and the Field Definition dialog box appears for that field/variable.

  • If a data table has not been created in MakeView or there are no records in the data table you can use the Field Definition dialog box to change the following items: names, field types, and patterns.

  • Once the data table contains entries, the field name cannot be changed, but the field type may be changed. MakeView will attempt to transfer the data into the new type, but in some cases it will discard incompatible data items. Changing the type of a Text field to a Numeric field will transfer numeric data, but MakeView cannot handle a number like "M0111," and it will assign a missing value. A text field can safely be changed to a multi-line field since both contain text.

Delete an Existing Data Table without Deleting the View

  1. From the MakeView navigation menu, select Tools > Delete Data Table. The MakeView warning message appears.

  2. Click OK.

  • If the data table is deleted, any entered data associated with the View is deleted from the project. Be absolutely sure that records are not needed before accepting the warning.

  3. Click OK. The data table associated with your View is deleted. The View remains intact and a new data table will be made next time you use it in Enter.


Resize a Field

Epi Info sets a default size for each field at the time the field is created. If the default size is too small or too big, the field can be re-sized using the following steps:

  1. Press the ALT key, then left-click on the field box to adjust. Or, click on the input portion of the field to set the cursor inside the gray part of the box, then press the Alt key. Either way, the blue resizing handles appear at the four corners of the box.

  2. Click and drag any of the blue resizing handles to stretch the box to its desired size.

Resizing restrictions

Several restrictions are placed on how fields may be resized depending on the field type:

  1. Only multiline, option, image, grid, command button and relate button fields may be resized vertically.

  2. Fields with patterns (such as date fields and numeric fields) are automatically sized according to their pattern and may not be manually resized by the user.

  3. Yes/No fields are automatically sized according to the values selected to represent Yes and No.


Set a Font for Prompt

Default fonts can be overwritten using Font for Prompt in the Field Definition dialog box. Font for Prompts are applied per field. To apply fonts to future fields, set a default font for the project.

  1. From the Field Definition dialog box, click Font for Prompt. The Font dialog box opens.

  2. Select a Font, Font Style, and Size.

  3. Click OK. The Field Definition dialog box appears.

  4. Click OK. The Font is applied to the question/prompt field.


Change Settings

Change Workspace Settings

Use the Settings options to customize the MakeView workspace.

  1. From the Make Edit/View navigation menu, select Format > Settings. The Snap to Grid dialog box opens.

  2. Customize the workspace by altering the grid settings.

  • Check the Snap to Grid On box to force fields in the View to snap to the left side of the grid nearest the field edge.

  • Check the Visible Grid On box to see the grid as the workspace background.

  • Use the up and down arrows in the Character widths between grid lines field to alter the displayed widths between grid lines.

  • Select one of the Snap to Grid options from the following radio buttons: Snap left side of prompt to grid or Snap left side of entry field to grid depending on whether you want prompts aligned or fields aligned.

  3. Click OK. The Make/Edit View page appears with the new settings applied.


Set the Tab Order

Initially, the order in which the cursor visits fields is set automatically based on each field’s position in order from right to left, then top to bottom. When Automatic Tab Ordering is used, each time a field is moved, even slightly, the tab order for that field is updated. If some other tab order is desired, as when fields are arranged in vertical columns, use the “Order of Field Entry” dialog box to customize the tab order.

Tab Order dialog box

Manually Change the Tab Order

  1. Click Edit > Order of Field Entry (TabOrder). The Order of Field Entry dialog box opens.

  2. From the Page Controls list, select a Prompt.

  3. Click the Up or Down button to move the Prompt in the list. The ‘Always Use Automatic Tab Ordering’ checkbox will be unchecked to preserve the custom tab order.

  4. Click OK. The new tab order is set.

Always Use Automatic Tab Ordering

When the “Always Use Automatic Tab Ordering” checkbox is checked, the tab order for a field is set automatically when the field is first defined and whenever the field is repositioned on the View. Automatic tab ordering is useful for rapid questionnaire development.

If the tab order is customized using the Up or Down buttons and the “Always Use Automatic Tab Ordering” checkbox is checked, then the custom tab order may be lost when a field is moved on the View. To prevent this and preserve the custom tab order, uncheck the “Always Use Automatic Tab Ordering” checkbox.

Note: The value of the “Always Use Automatic Tab Ordering” checkbox is stored in the EpiInfo.ini file as the variable, “AutoTabOrder”. It is not specific for each View or project. It is possible to check the “Always Use Automatic Tab Ordering” checkbox for a new View assigning tab stops automatically, then open another View having a custom tab order and inadvertently cause tab stops to be reset by moving fields on the MakeView canvas.

Auto Order Tabs

If fields on the View were added or repositioned while the “Always Use Automatic Tab Ordering” feature is unchecked, the tab order of the fields may not be in an ideal order. Click the “Auto Order Tabs” button to automatically reset the tab order for all fields on the View.


Set a Default Font

Default fonts facilitate a consistent look to your fields if set prior to creating the fields on the View.

  1. From the MakeView navigation bar, select Format > Set Default Font. The Font dialog box opens.

  2. Select a new Font, Font Style, or Font Size.

  3. Click OK. A new default font is set for the project.

  • The default font settings affect new Prompts created using the Field Definition box and not update any existing field fonts in the View.

  • The default font is set at the MakeView level, and not just the View level. The default font will appear in all Views/fields created with MakeView.

  • Default fonts can be overwritten using Font for Prompt option in the Field Definition dialog box.


Copy Fields

Copy, Cut, and Paste Fields

  1. Left click, hold, and drag a rectangle around the fields to be copied or cut.

  2. From the MakeView navigation menu, select Edit > Copy or Edit > Cut from the drop-down list.

  3. Click in new section of the View or select a new page in the Project.

  4. Select Edit > Paste. The copied fields appear in the View.

Note: If copied to the same page, the copied fields will be placed directly over the original fields. Drag the new fields to a new position on the page. The new field will have the same name as the original with a number '1' after the name.


Align Fields

Fields can be aligned vertically or horizontally.

  1. Click and hold the left mouse button to draw a rectangle around the fields to be aligned.

  2. Select Format > Alignment > Vertical or Format > Alignment > Horizontal. The selected fields align based on the selection.


Insert an Image

Insert a Background Image or Color

Insert a Background Image on a View

  1. From the MakeView navigation menu, select Format > Background. The Background dialog box opens.

  2. From the Background Image section, click Choose Image. The Background Image box opens.

  3. Locate the image file and click Open. The selected image appears in the Background Image dialog box. Image formats include bitmap (.bmp), picture (.ico) and JPEG (.jpg).

  4. Use the radio buttons to apply the image as Multiple images to fill screen or one Image to the upper left corner.

  5. From the Image and Color section, use the radio buttons to Apply to all pages or Apply to the current page only.

  6. Click OK. The image appears in the View.

  • To remove the image, select Clear Image from the Background Image box.

Insert a Background Color to a View

  1. From the MakeView navigation menu, select Format > Background. The Background dialog box opens.

  2. From the Background Image section, click Change Color. The Color dialog box opens.

  3. Select a background color from the palette or select Define Custom Colors to enter a more specific color request.

  4. Click OK. The selected color previews in the Background box.

  5. From the Image and Color section, use the radio buttons to Apply to all pages or Apply to the current page only.

  6. Click OK. The color appears in the View as a background.

  • To remove the color, select Clear Color from the Background Color box.


Work with Pages

Work with Pages in a View

Add a New Page

From the Page Names window, click Add Page. The page appears in the Make/Edit View window and at the end of the existing pages listed in the Page Names window.

Note: You must add at least one field to the page before leaving the new page or the empty page will be deleted.

Insert a New Page

From the Page Names window, click Insert Page. The page appears in the Make/Edit View window. The page is inserted above the selected page in the Page panel.

Delete a Page

  1. From the Page Names window, click Delete Page. The Confirming Deletion pop-up opens.

  2. Click OK. The page is deleted from the list.

Name a Page

  1. Right click the Page from the Page Names window. The Pagename dialog box opens.

  2. Type a name in the Pagename field.

  3. Click OK. The page name appears in the list of pages.


Reorder Pages

Reorder Pages in a View

To reorder the pages in a View, take the following steps:

  1. Open the page you want to move.

  2. Left click, hold and drag a rectangle around all fields and prompts.

  3. Select Edit > Cut. The fields will disappear from the page and are temporarily stored on the clipboard.

  4. In the Page Names window, click the page below where you want the previous page moved. The message ‘Empty page will be deleted’ displays.

  5. Click OK. The page below where you want the previous page moved displays.

  6. Click Insert Page.

  7. Select Edit > Paste. The cut fields from the previous page are copied from the clipboard and appear on the page.


View a Data Dictionary

The Data Dictionary displays View variables and defined variables for an open or specified project. Fields or variables are sorted and displayed by page number in the View with defined variables appearing at the end of the listing. Information pulled from the View includes Page Number, Prompt, Field Name, Variable Type, Format, and Special Info.

  1. From the MakeView navigation menu, select Tools > Display Data Dictionary. The Variables in View window opens. The project file name and directory location appear at the top of the window.

  • Page Number values are developed each time a page is added from the MakeView Page panel.

  • Column values for Prompt, Field Name, and Variable Type are developed when fields are created from the Field Definition dialog box.

  • Format column values include selected patterns for number and date fields and Sorted for combo boxes. For Related fields, the Format column contains information on the condition required to be true for the related View to be active.

  • Special Info column values include all properties available from the Field Definition dialog box. Properties include Read Only, Legal Value, Repeat Last, Code Table, Groups, Required, Range, Soundex, and Image Size. The Special Info column also holds the defined variables values of Standard, Global, or Permanent. The Special Info column includes information on related fields to indicate whether they contain One Record or an Unlimited number of records. This is developed when the related field is created. The default is Unlimited Records. If the Return to the Parent Form after One Record has been Entered box is checked then the format will appear as One Record.

  2. To open the Data Dictionary as an HTML page inside the browser window, click View/Print as HTML.

Note: From the browser, the data can be printed with File > Print or saved with File > Save As.

  3. Click Select a View/Grid. The Select a View dialog box appears.

  4. Select a data table or grid from the list and click OK.

Note: To see a data table located in another project, do the following:

  1. Click Change Project. The Select Project window opens.

  2. Locate and select a new project file. Then, click Open.

  3. Select a data table from the list. Then, click OK. The Data Dictionary for the selected project opens. Note that only the Data Dictionary for the project opens, not the View.

  5. Click Close to exit the Data Dictionary.


Create a Group

In the Analysis module, statistics can be run on the group as a whole or on the individual variables inside the group.

  1. Left click, hold, and drag a rectangle around the fields that are to be grouped. A dashed line rectangle appears around the selected fields.

  2. From the MakeView navigation menu, select Insert > Group. The group dialog box appears.

  3. Type a name in the Group Description field.

  4. Click Set Color. The Color window opens.

  5. Select a color from the Basic Color palette or use the Define Custom Color option.

  6. Click OK to select the color.

  7. Click OK to accept the group options. The fields appear grouped in the selected color box.

  • Move the group by clicking and holding the group name with the mouse.

  • Resize the group box by double clicking inside the group to change the cursor to the resize arrows. If the new size includes additional fields, these additional fields are now members of the group.

Edit a Group

Take the following steps to delete the group, change the group color, ungroup variables, or change the group name:

  1. Right click on the group name. The Edit Group window opens.

  2. Do one of the following:

  • Change the Group Name by typing a new name in the Group Name field.

  • Click Edit Color to select a new group color block.

  • Click the Ungroup Variables box to keep the variables but remove the grouping.

  • Click the Delete Group and all Variables box to remove the group and all the grouped variables.

Warning! Be sure you want to delete the group and the variables as you will not be asked to confirm the deletion or be able to undo it.

  3. Click OK. The group appears with the selected edits.


Mirror Fields

Create a Mirror Field

A mirror field is used to mirror or echo data from another field onto one or more pages of a project. Mirror fields can be used across pages, but cannot be included in Related Views.

To create a mirror field, take the following steps:

  1. Open a project that contains two pages and one field that needs to appear on both pages.

  2. From the page that requires a mirror field, right click in the View. The Field Definition dialog box opens.

  3. Enter the Question or Prompt name.

  4. Select Mirror as the Field or Variable type.

  5. Click OK. The Assign Variable to Mirror Field dialog box opens.

  6. Select a field to mirror from the list.

  7. Click OK. The new variable appears on the current page.

  • Mirror fields are Read Only.

  • When data are entered into the original field, the value of that field will be reflected in the newly created mirror field.

  • Mirror fields can be copied and pasted to subsequent pages.

  • Grid fields and command buttons cannot be selected as source fields to mirror.


Option Box

Create an Option Box

Option boxes should be used when the choices presented to the user are mutually exclusive. If more than one choice can be made, use checkboxes instead. Once an option box has been created, it cannot be modified.

To create an option box, take the following steps:

  1. Right click in the View. The Field Definition dialog box appears.

  2. Enter a new Question or Prompt.

  3. From the Field or Variable Type drop-down list, select Option.

  4. Optional. In the Field Name field, modify the new Field Name.

  5. Click OK. The Settings for Option Variable dialog box appears.

  6. Select Right or Left for the placement of the Option box (radio button).

  7. In the Number of Choices field, enter a number.

  8. Press the Enter key. The option boxes appear.

  9. Type the option information in each field.

  • To delete a box from the option list, place the cursor in the last field and press the Delete key.

  • To add a box to the option list, place the cursor in the last field and press the Enter key.

  10. Click OK. The Option box appears in the View.


Create Legal Values (drop-down lists)

Create Legal Values

A Legal Values field is a drop-down list of choices on the questionnaire. These items cannot be altered by the person entering data. The only values that are legal for entry are the ones in the list.

To create legal values, take the following steps:

  1. Right click in the View. The Field Definition dialog box opens.

  2. Enter a new Question or Prompt.

  3. From the Field or Variable Type drop-down list, select Text.

  4. Optional. Create a new Field Name.

  5. From the Code Tables section, click Legal Values. The Set Up Legal Value Links dialog box appears.

  6. Click Create New. The Legal Values for dialog box opens.

  • Existing Tables can also be used to create Legal Values.

  7. Enter the values in the Legal Values for column.

  • If the values should appear in the order they were entered and not alphabetically, click Do Not Sort.

Set Up Code/Legal Links dialog box

  8. Click OK.

  9. From the Field Definition box, click OK. The new field appears in the View as a drop-down list of values.


Set Legal Value Order

To set legal values to the order entered, select the Do not sort checkbox from the Legal Values dialog box.


Comment Legal

Create a Comment Legal

Comment Legal variables are similar to Legal Values. Comment Legal fields are text fields with a number typed in front of text (with a hyphen) so that in populating fields, the number is entered instead of the text. In the Analysis module, the statistics are displayed with the numbers only.

To create comment legal variables, take the following steps:

  1. Right click in the View. The Field Definition dialog box opens.

  2. Enter a new Question or Prompt.

  3. From the Field or Variable Type drop-down list, select Text.

  4. Optional. In the Field Name field, modify the new Field Name.

  5. From the Code Tables section, click Comment Legal. The Set Up Comment Legal Value Links dialog box opens.

  6. Click Create New. The Comment Legal Values for (separate with hyphen): field opens.

  7. Enter the first value. For example, 1- Yes.

  8. Press the Enter key on the keyboard to advance to the next field.

  9. Enter the second value. For example, 2- No.

  • Click Do Not Sort to set values to appear in the order entered and not alphabetically.

Set Up Code/Legal Links dialog box

  10. Click OK.

  11. From the Field Definition box, click OK. The new field appears as a drop-down list of values.


Create Code Tables

Codes

Codes allow you to choose a value from a drop-down list, and based on that choice, another field or fields is populated with predetermined values. At least two fields must exist; one which holds the selection code and one which receives the value of the code. The first field holds the selection code in a drop-down list, and the second (or third, etc.) is a Read Only field which populates based on assignments set in the code table.

Create a New Code Table

Code Tables allow you to select a value from a drop-down list and based on that choice, another field populates from a set of predetermined values. At least two fields must exist. The first field is the original or main code, which will be a drop-down box, and the second (or third, etc.) will be treated as 'Read Only' and will populate based on what is assigned from the first field.

New code tables can be created or existing code tables can be used in the creation of code table selections. When a list of values is specified, an entry must match one of a specified list of values, or it will be rejected.

To create a new code table, take the following steps:

  1. Open or create a View.

  2. Ensure that there are at least two text fields on the View.

  3. Select a field from the View.

  4. Right click the prompt of the field to be the selection code. The Field Definition dialog opens for the field.

  5. Click Codes. The Set Up Code Links dialog box opens.

  • The Code Legal table list box displays the prompt of the field name you clicked for the selection code.

  • The Select field(s) to be linked to above field list box displays all of the available Text type fields on the View, which can receive codes based on the value of the selection code field.

  6. Select the field or fields to be linked from the Select field(s) to be linked to above field list box.

  • To select multiple fields, hold down the CTRL key and click each field.

  7. Click Create New. A spreadsheet opens for you to enter the Codes for Field.

  • The left-most column displays the selection field you chose in Step 4.

  • Each column to the right lists the field(s) to receive the codes based on the value of the selection field.

  8. Enter the codes for each field.

  • Press Enter to move to the next field or to the next row if at the end of a row.

  9. Click OK to accept the codes for each field.

  10. Click OK to close the Field Definition dialog box and place the fields in the View.

  • To test the code table, open the Enter module and verify that both fields populate based on the drop-down list selection.


Create Codes with Existing Table

A code table can be used for more than one field in a View; for example, with values of ‘agree’ and ‘disagree.’ When selecting the Codes button, a Codes with Existing dialog box displays combo boxes of current View field variables and the existing table list of variables.

  1. Open or create a View. Make sure that the View has at least two text fields.

  2. Select a variable from the list that you want to add codes to. Right-click on it to get the Field Definition dialog box. For example, Hospital Name is the Table Name.

  3. From the Code Tables section, click Codes. The Set Up Code Links dialog box opens.

  4. Your table name is displayed in the Code Legal table box. Select a field(s) that you want to link to the variable. These fields will be associated with the table name in a drop-down list.

  • Click Do Not Sort if the values should appear in the order they were entered and not alphabetically.

  • To select multiple fields, press and hold the CTRL key while clicking the fields.

  5. Click Use Existing Table. The Tables dialog box opens.

  6. Select a table from the list and click OK.

  7. Follow the instructions to make the associations in the Match Fields section.

Epi Info™

Version 3.4


Match Fields

The fields displayed on this dialog are the text fields created from your View. From the right-hand side of the screen, select a value from the drop-down list. At least two fields must exist; one which holds the selection code and one or more which receives the value of the code(s). The first field holds the selection code in a drop-down menu, and the second (or third, etc.) is a Read Only field which populates based on assignments set in the code table.

  1. Select the required drop-down field to be linked to the code table.

  • Once a link is selected, the OK button becomes active.

  2. Click Preview Table to look at the link association. The preview allows you to see the table and determine whether you want to keep your selection. Select Back to return to the Match Fields dialog box.

  3. Create additional links using the View Fields and Table Fields drop-down lists.

  4. Click Link to add the matches to the Associated Link Fields list box.

  • Links can be deleted by selecting from the list and clicking Unlink.

  • Fields removed from the Link list box return to the View Fields and Table Fields drop-down lists.

  5. Click OK to accept the Match Field selection. The Code Table selection appears in a grid format for review.

  6. Click OK to accept the selection or click Back to return to the Match Field dialog box and edit the code table selections.


Create a Grid

Grids are used for small groups of repeating information. For example, children’s names and ages on a parents form.

  1. Right click in the View to open the Field Definition dialog box.

  2. Enter a Prompt in the Question or Prompt field. This will be the name of the grid.

  3. From the Create section, click Grid. Alternatively, from the Field or Variable section, select Grid from the Type drop-down list. The Enter Columns for Grid dialog box opens.

Enter the Columns for Grid dialog box

  4. In the Enter Column Name for Grid field, type a column name.

  5. Click Save Column. The First column in the set-up grid populates.

  • To edit a column, click the Column Name.

  • Use the Field or Variable Type drop-down list to select different field types. Available types include Text, Number, Phone Number, and Date. Select Size and Pattern as necessary.

  • Property options, such as Required or Read Only, can also be applied to columns.

  • Code Tables, such as Legal Values and Comment Legal Values, can also be set for columns.

  6. Enter all the necessary columns, clicking Save Column for each.

  7. Click Done. The grid appears in the View.

  • Grids can be resized by selecting the grid and dragging the blue bounding boxes.

  • Columns can be resized by hovering the mouse over a column border until the mouse turns into horizontal arrows and then use the click, hold, and drag method to resize the column.

  • Grid columns cannot be deleted and cannot have check code.


Insert a Line

Insert a Line as an Image

  1. Open the Field Definition dialog box.

  2. Hold the SHIFT key and type an underscore in the Question or Prompt field to create a line.

  3. Click Font for Prompt. The Font dialog box opens.

  4. Select a Font Size and Bold.

  5. Click OK.

  6. Select Label/Title as the Field or Variable Type.

  7. Create a Field Name for the variable.

  8. Click OK. The line appears in the View.


Insert an Image on a Record

  1. From the Field Definition dialog box, enter a Question or Prompt.

  2. From the Field or Variable Type drop-down list, select Image.

  • If the image should not be resized to fit the image box, click the Retain Image Size checkbox.

  3. Click OK. The Image box appears in the View.

  • Image boxes can be resized by selecting the grid and dragging the blue bounding boxes.

Example of Image from Make View

Note: The Image is entered into the record from the Enter Data module during the data entry process.

  4. From the MakeView navigation menu, select File > Enter Data. In the Enter Data window, the newly created image field displays.

  5. Click the Image Field. The Select the Picture File dialog box opens.

  6. Select an image file.

  7. Click Open. The selected image appears in the field.

Example of Image from Enter Data

Warning: The location of the image is stored in the .MDB, not the image itself. Therefore, if the data are copied to another computer, be sure to include the images and place them in the same directory relative to the .MDB.


Copy a View

MakeView allows a View to be copied with or without the associated data table. Copy options include Copy a View with the Current Data Table, Copy a View and Data Table, or Make a New View with an Empty Data Table.

Copy a View with the Current Data Table

  1. Open a View containing a data table.

  • If the View was just created, a data table does not exist. Exit MakeView to create a new data table, or refer to the “Make a New View Without a Data Table” section.

  2. From the MakeView navigation bar, select File > Copy View. The Copy View as dialog box opens.

  3. Select the Make Another View of Current Data Table radio button.

  • A new data table will not be made.

  • All grid tables and relates will be copied with references to the original code tables and connect to the data table.

Copy View dialog box

  4. Click OK. The Destination File window opens.

  5. In the File Name field, type a new project name.

  6. Click Open. The Copy Rename Tables dialog box opens.

Copy Rename Tables dialog box

  7. Accept the current table names or edit the current table names by typing in the New Table Name column.

  8. Click OK. MakeView opens to the original project file.

  • To open the copied project, select File > Open. The Select a View dialog box opens.

  • Click Change Project.

  • Locate and select the new project that received the copied View.

  • Click Open. The Select a View dialog box opens.

  • Select a View from the list.

  • Click OK. The copied View opens.

Copy a View and Data Table

  1. Open a View which has a data table.

  • If the View was just created, then a data table does not exist.

  2. From the MakeView navigation bar, select File > Copy View. The Copy View as dialog box opens.

  3. Select the Copy Both View and Data Table radio button.

  • Grids and Relates will be copied into a new data table.

  4. Select a Code Option.

  • Convert Codes (Combobox) to Textbox Type Field

  • Reference Original Code Tables

  • Copy Code Tables

  5. Click OK. The Destination File window opens.

  6. In the File Name Field, type a new project name.

  7. Click Open. The Copy Rename Tables dialog box opens.

  8. Accept the current table names or edit the current table names by typing in the New Table Name column.

  9. Click OK. MakeView opens to the original project file.

  4. To open the copied project, select File > Open. The Select a View dialog box opens.

  5. Click Change Project.

  6. Locate and select the copied project.

  7. Click Open. The Select a View dialog box opens.

  8. Select a View from the list.

  9. Click OK. The copied View opens.

Make a New View Without a Data Table

  1. From the MakeView navigation bar, select File > Copy View. The Copy View as dialog box opens.

  2. Select the Make New View Only radio button.

  • Grids and Relates will be copied.

  • A new empty data table will be made during the first data entry.

  3. Select a Code Option.

  4. Convert Codes (Combobox) to Textbox Type Field

  5. Reference Original Code Tables

  6. Copy Code Tables

  4. Click OK. The Destination File window opens.

  5. In the File Name Field, type a new project name.

  6. Click Open. The Copy Rename Tables dialog box opens.

  7. Accept the current table names or edit the current table names by typing in the New Table Name column.

  8. Click OK. MakeView opens to the original project file.

  4. To open the copied project, select File > Open. The Select a View dialog box opens.

  5. Click Change Project.

  6. Locate and select the copied project.

  7. Click Open. The Select a View dialog box opens.

  8. Select a View from the list.

  9. Click OK. The copied View opens.


Create a View from an Existing Data Table

Different Views can be created from one data table. To create a View from an existing data table, take the following steps:

  1. Open an existing project that contains a View with a data table.

  2. From the MakeView tool bar, select Tools > MakeView from Data Table. The Select One Table dialog box opens.

Select One Table dialog box

  3. Select a table from the list. Click Change Project to locate a table in another project.

  • Selecting Change Project will cause the current project to change to a different project selected. The new View will be saved to the current project after a Change Project is complete.

  4. Click OK. The Table-to-View dialog box opens.

Table-to-View dialog box

  5. Enter a new View Name or keep the default name.

  • Click Change Table if the opened View does not contain the fields needed.

  6. Select fields from the Table Fields list and click the single forward arrow to move fields individually to the View Fields list.

  • Click the double forward arrow to move all the fields.

  • Fields can be removed from the View Fields list using the back single or double arrows.

  • If any of the field names happen to be reserved words in Epi Info, the field name is changed by adding a suffix ‘_RW’ after the field name. Each change is shown in the Field Name Change dialog box.

  7. Click Save. The View appears in the MakeView window.

  • You can also create a View from an existing data table using Table-to-View.


Create a Related View

Related Views are relationships between the main or parent View with sub or child Views. They are used for one-to-many relationships, as in Patient record/visit records. Related Views are linked to a parent View automatically by unique keys generated by the application. Related Views are made accessible through buttons in the View. Buttons can be created on a conditional basis so that they become available only under specified conditions; for example, to show a special form for a particular disease.

  1. From the main View, right-click to open the Field Definition dialog box.

  2. Enter a Question or Prompt.

  3. Enter a Field Name to change the suggested name, if needed.

  4. Click Related View from the Create section, or select Relate from the Field or Variable Type drop-down list and click OK. The Conditions for Related Form to be Active dialog box opens.

  5. From the Form Should be Accessible section, select Anytime or Only When Certain Conditions Are True.

  • Select Anytime to create a related button in the View that is active at all times during data entry. Selecting Anytime provides the option of relating to a new or existing View. Select Create a New Related View to create a new View or select Relate to Existing View to choose a View that already exists. If Relate to Existing View is selected, the Select a View dialog box opens. Select a View to relate from the list and click OK.

  • Select Only When Certain Conditions are True to create a related button in the View that is active based on a conditional statement created using Check Code Functions and Operators. When Only When Certain Conditions are True is selected, new dialog options open for the creation of the conditional statement. For example, if an individual answers yes to a disease, a relate button for that disease could be created, and selecting it during data entry provides the option to enter details specific to that disease. To see an example in MakeView and Enter, open the Sample.MDB and select the View Surveillance. Condition Variables and Relates do not have to be on the same page of the View.

  • Select Return to the Parent Form after One Record has been Entered to allow only one record to be entered in the related table and return the cursor to the parent form after it is entered.

  6. Click OK. The Related View button appears on the Parent View.

  • Press Alt+Click to resize the related button.

  • Press Shift+Left Click to move the button.

  • Press Shift+Right Click to edit the relate options.

  7. Ctrl+Click on the new related button to open the related View.

  8. Add fields or edit the related View as necessary.

  9. Click the Home or Back button to return to the Parent View.

Change a Related (or Child) View to a parent

  1. From the Child View, select Tools > Convert Child to Parent.

  • The connection between the two Views is deleted.

  • The Related button in the parent still exists, but the association between child and parent no longer exists.

  2. Delete the Related button from the Parent View.

  • Access the former child View by selecting File > Open and selecting the View.

Try It

  1. Open MakeView and select File > New.

  2. Create a new project called FamilyRelate.

  3. Name the new View House.

  4. Right-click in the View and open the Field Definition dialog box.

  5. Create a survey that contains the following fields:

Prompt | Variable Type | Pattern
House ID | Number | ###
Address | Text |
Any Children? | Yes/No |
Children | Relate |

  6. From the Form Should be Accessible section, select Only When Certain Conditions Are True.

  7. From the Available Variables drop-down list, select AnyChildren.

  8. Click =.

  9. Click "Yes". The syntax should appear as AnyChildren=(+).

  10. Click OK.

  11. Select the radio button for Create a New Related View.

  12. Click OK. A button called Children appears in the survey.

  13. Open the related View by pressing the CTRL button on the keyboard and left-clicking Children. The related View opens.

  14. Create a new page that contains the following fields:

Prompt | Variable Type | Pattern
Name | Text |
Age | Number | ##
Sport | Legal Value | Baseball, Soccer, Football, Tennis, Swimming, Other

  15. Click Back to return to the parent View.

  16. Select File > Enter Data to open the Enter Data program and test the code.

  17. Enter the following record:

House ID | 01
Address | Maple Street
Any Children | Yes

  18. Click Children to open the related View.

  • Since the answer to children was Yes the related button activates.

  19. Enter the following records in the related View:

Name | John
Age | 7
Sport | Baseball
Name | Carol
Age | 8
Sport | Soccer

  20. Click Back to return to the parent View.

  21. Enter a new record in the House View and select No for Children. The related button should not activate.


Related Field Buttons

The following buttons can be used in related Views:

  • Press Alt+click to resize a related button.

  • Press Shift+left click to move a related button.

  • Press Shift+right click to edit a relate options.

  • Press Ctrl+click to open a related View.


Move Between Parent and Related Forms

Move Between Parent and Related Views

The Home Home button and Back Back button buttons can be used to move to and from parent and related forms. These buttons are only visible from a Related View.

  • Home returns you to the main View.

  • Back returns you to the parent View.

  • In a two-level, hierarchy, both buttons return you to the parent View.

  • In a three-level View, Home returns to the main View and Back moves up one level to the immediate parent.


Delete an Existing Data Table

Delete an Existing Data Table without Deleting the View

To delete an existing data table without deleting the View, take the following steps:

  1. From the MakeView navigation menu, select Tools > Delete Data Table. The MakeView warning message appears.

  2. Click OK.

  • If the data table is deleted, any entered data associated with the View are deleted from the project. Be absolutely sure that records are not needed before accepting the warning.

  3. Click OK. The data table associated with your View is deleted. The View remains intact and a new data table will be made next time you use it in Enter.

WARNING!

This function shoud be used only if you want to discard the data. All the data will be deleted.


Create a Globally Unique ID (GUID)

Globally Unique IDs, or GUIDs, are large, random combinations of letters and numbers that are guaranteed not to repeat or overlap with those of other datasets. An example of a GUID is {056FC3AD-995E-4696-B164-03B56AA514A0}. GUIDs are ideally suited for linking records from one table to another in a relational database. Epi Info supplies a Windows Scripting Component (WSC) that creates GUIDs, GetGlobalUniqueID.wsc. This component contains a method also named GetGlobalUniqueID() that performs the function of getting the GUID. In Epi Info, to use an external DLL object or a Windows Scripting Component, it must first be defined as a special DLLObject type of variable. Then the method within the DLL or WSC is called using its given variable name. The result is assigned to a text field or another variable. This topic describes how to use the GetGlobalUniqueID.wsc to create GUIDs and assign them to a text field.

Defining the Windows Scripting Component

In order to use the GetGlobalUniqueID.wsc, it must be defined in the project using the DEFINE DLLOBJECT command in Check Code. For more information on DEFINE DLLOBJECT, see the Command Reference topic titled "Define DLLObject Command."

  1. Open the Check Code editor by clicking the blue Program button on the left side of the screen in the Page Names window.

  2. From the Choose Field Where Action Will Occur drop-down list, select DEFINEDVARIABLES.

  3. Use the following syntax to define a variable as a DLL Object linked to the GetGlobalUniqueID component. In this example, the variable named "Global_ID" is defined.

DEFINE Global_ID DLLOBJECT "GetGlobalUniqueID.WSC"

  4. Click Save to validate the syntax and save the Check Code.

Assign a GUID to a Text Field

After the GetGlobalUniqueID.wsc component is defined as a DLL Object, call the method of the component that gets the globally unique ID. In the case of the GetGlobalUniqueID.wsc, the method that gets the GUID is also called "GetGlobalUniqueID". Methods are called by specifying the variable name separated by an exclamation point or bang "!" and followed by parentheses "( )". The GetGlobalUniqueID method does not take any parameter information, so it is followed by empty parentheses, "()".

In this example, the ASSIGN command is placed in the RECORD section of Check Code, rather than in a section for a specific field. Alternatively, the command could be placed in a data field's block or in a CommandButton block, if needed.

  1. Open the Check Code editor by clicking the blue Program button on the left side of the screen in the Page Names window.

  2. From the Choose Field Where Action Will Occur drop-down list, select RECORD.

  3. Use the following syntax to assign the result of the GetGlobalUniqueID() method to the Record_ID field.

ASSIGN Record_ID = Global_ID!GetGlobalUniqueID()

  4. To prevent the Record_ID from being overwritten, use an IF-THEN / END command block to perform the ASSIGN only if Record_ID is missing (.) or Record_ID is empty "". The syntax should look like this:

IF Record_ID = (.) OR Record_ID = "" THEN
ASSIGN Record_ID = Global_ID!GetGlobalUniqueID()
END

  5. To force the assign command to create the GUID for new records as well as existing records, wrap the command block within an ALWAYS / END block. The syntax should look like this:

ALWAYS
IF Record_ID = (.) OR Record_ID = "" THEN
ASSIGN Record_ID = Global_ID!GetGlobalUniqueID()
END
END

  6. At the top of the Check Code editor, click the Before radio button to insert the ENDBEFORE command. This will ensure the Check Code is used before any data are entered into the record. The syntax should look like this:

ALWAYS
IF Record_ID = (.) OR Record_ID = "" THEN
ASSIGN Record_ID = Global_ID!GetGlobalUniqueID()
END
END
ENDBEFORE

See also: How To Copy the Value of a Field which describes the steps to copy the GUID field value from a Parent View to a Child View.


Import an Epi 6 REC File

Import an Epi 6 REC File to MakeView

To import an Epi 6 REC file to MakeView, take the following steps:

  1. From the MakeView navigation menu, click Tools > Import Epi 6 REC File. The Select File to Import (Epi 6) window opens.

  2. Select a REC file.

  3. Click Open. The Destination File-MDB window opens.

  4. Select an existing project (MDB) or create a new project location for the REC file and click Open. The Create and Save Data Table dialog box opens.

  5. Rename the data table or keep the current name.

  6. Click OK.

  • The REC file becomes a View based on the variables created in Epi 6.

  • The Epi 6 Check Code (CHK) associated with the REC file may also be imported.


Check Code Overview

To create Check Code, open the Program Editor by selecting the blue Program button located in the Page Names window or by selecting View > Check Code from the MakeView navigation menu.

Check Code is used to validate data entry and to make the process of entering data faster and more accurate. With some advance planning, code can be created that will do calculations, skip questions based on prior answers, prompt the user with dialog boxes, and populate fields across pages and records. In its most basic form, Check Code is a set of rules for the person entering data to follow. Check Code helps to eliminate errors that can occur when entering large amounts of information. Check Code is created using the MakeView Program Editor.

  • Check Commands must be placed in a block of commands corresponding to a variable in the database. Special sections are provided to execute commands either before or after a View, Page, or Record is displayed.

  • Comments, preceded by an asterisk ("*"), may be placed within blocks of commands. For commands not having a “Command…End” structure, the line continuation character (“\” at the end of the line) is used to indicate that a command continues on the next line.

  • Commands in a block are activated either before or after an entry is made in the field. By default, commands are performed after an entry has been completed with <Enter>, <PgUp>, <PgDn>, or <Tab>, or another command causes the cursor to leave the field, such as GOTO.

  • Check commands for each field are stored in the View in a record associated with a particular field.

  • Commands are inserted automatically through interaction with the dialog boxes. Text versions of the commands appear in the Program Editor as they are generated by the dialogs and may be edited and saved there also.

  • Commands to be executed before data entry into the View, Page, record, or field must appear above an ENDBEFORE command. All commands below ENDBEFORE are executed after data entry when the cursor leaves the View, page, record, or field.


Delete a Row of Code from the Program Editor

To delete a row from the Program Editor, take the following steps:

  1. Highlight the text in the Program Editor.

  2. Press Delete on the keyboard, press Shift+F9, or select Edit > Delete Line.

  3. From the Program Editor menu bar, click Save.

  • Be sure of all deletions. There is no confirmation prompt prior to deletion and there is no undo button


Create a Skip Pattern with GOTO

Skip patterns can be created by changing the tab order and setting a new cursor sequence through a questionnaire, or as described here, by creating Check Code using the GOTO command. Skip patterns can also be created based on the answers to questions using an IF/THEN statement.

  1. Open a View that contains at least three fields.

  2. Click Program. The Make/Edit View: Check Commands tab selector opens.

  3. Select the first field from the Choose Field Where Action Will Occur drop-down list.

  4. Select After from the Before or After Section. This creates code that will run after the first field is entered and accepted.

  5. Click GoTo. The GOTO dialog box opens.

  6. Select a field for the cursor to jump to after the first field is entered. The code will run when the cursor leaves the field.

  7. Click OK. The code appears in the Program Editor.

  8. Click Save.

  9. Click OK. The View appears.

  • To test the skip pattern, open the View in the Enter module. Use the tab key to ensure that upon leaving the field with the GOTO command, the cursor goes to the specified field.

Create a Skip Pattern using IF/THEN and GoTo

Use IF/THEN statements to create skip patterns based on the answers to questions in the survey or questionnaire. This example creates code that states that if the person answered Yes (+) to being ill then the cursor jumps to a field that asks for the diagnosis, else if the person answered No (-) to being ill then the cursor jumps to (or skips) to the field for vaccination information.

  1. Click Program from the Page Names window. The Make/Edit View: Check Commands tab selector opens.

  2. From the Choose Field Where Action Will Occur drop-down, select the field which contains the action, in this example Ill.

  • The action needs to occur After data are entered into the Ill field. Accept the default of After in the Before or After section.

  3. From the Records Tab or the Check Command Tree, select If. The IF dialog box opens.

  4. From the Available Variables drop-down list, select the field to contain the action, in this example, Ill. The selected variable appears in the If Condition field.

  5. From the Operators, click =.

  6. From the Operators, click "Yes".

  • The If Condition field will read Ill=(+)

  7. Click Then. The tab selector appears. The Check Command Tree is not active.

  8. From the Fields Tab, select GoTo. The GOTO dialog box opens.

  9. Select the field for the cursor to jump to based on a Yes answer from the list of variables, in this example, Diagnosis.

  10. In the GOTO dialog box, click OK. The IF dialog box opens.

  11. Click Else. The dialog box disappears.

  12. From the Fields Tab, select GOTO. The GOTO dialog box opens.

  13. Select the field for the cursor to jump to based on a No answer from the list of variables, in this example, Vaccinated.

  14. Click OK. The IF dialog box opens.

  15. Click OK. The code appears in the Program Editor. The example code appears as:

IF Ill = (+) THEN
GOTO Diagnosis
ELSE
GOTO Vaccinated
END

  16. Click Save from the Program Editor.


Assign a Date

To program a mathematical function, use the Program Editor and the ASSIGN command. Check Code can be created to calculate and enter the age of a respondent based on the date of birth and the date the survey was completed or the system date of the computer when the data was entered.

This example uses a field called DateOfBirth and a field called Age to demonstrate the use of the ASSIGN command and the function YEARS.

  1. From the MakeView, click Program or select View > Check Code. The Program Editor opens.

  2. From the Choose Field Where Action Will Occur drop-down, select the DateOfBirth field. The Check Command Tree opens.

  • After is the default setting for when all actions will occur. The calculation needs to run after information is entered into the DateOfBirth field.

  3. From the Variables Tab or the Check Command Tree, click Assign. The ASSIGN dialog box opens.

  4. From the Assign Variable drop-down, select the field where the calculated value should appear. For this example, select the Age field.

  5. In the = Expression field, type the function YEARS.

  6. Type or click the left parenthesis '('. Do not put a space before it.

  • Statements of a function must be enclosed in parentheses. Use the Operator buttons or type them in from your keyboard.

  7. From the Available Variables drop-down list, select the DateOfBirth field.

  8. Type a comma.

  9. Type the survey date in a MM/DD/YYYY format or type the function SYSTEMDATE to calculate using the computer clock.

  10. Type or click the right parenthesis ')'.

  11. Click OK. The Check Code appears in the Program Editor.

ASSIGN Age = YEARS(DateOfBirth, 06/21/2010)

or

ASSIGN Age = YEARS(DateOfBirth, SYSTEMDATE)

  12. Click the Save button in the Program Editor.

  • Always save Check Code. Code will not update unless it is saved. The Save feature also verifies syntax.


Create a Dialog

The DIALOG command provides interaction with data entry personnel from within a program. Dialogs can display information, ask for and receive input, and offer lists for making choices.

In this example, the DIALOG command is used to create a reminder that all fields on page two of the survey must be completed.

  1. From the View, click Program or select View > Check Code. The Program Editor opens.

  2. From the Choose Field Where Action Will Occur drop-down, select Page 2.

  • The action should occur After the cursor leaves the page.

  3. From the User Interaction Tab or the Check Command Tree, select Dialog. The DIALOG box opens.

  4. In the Title field, type Page Two.

  • The Dialog Type radio button should be Simple.

  5. In the Prompt field, type All fields on page two must be completed.

  6. Click OK. The code appears in the Program Editor.

DIALOG "All fields on page two must be completed." TITLETEXT="Page Two"

  7. Click Save in the Program Editor.


Use Autosearch

Fields with Autosearch Check Code are automatically searched for one or more matching records during data entry. If a match is found, it can be displayed and edited or the match can be ignored and data entry can continue on the current record. Autosearch is used as an alert to potential duplicate records. Autosearch does not prevent the entering of duplicate records.

  1. Open a View and click Program. The Program Editor opens.

  2. From the Choose Field Where Action Will Occur drop-down list, select the field to be searched.

  3. Click Autosearch. The Autosearch window opens.

  4. Select the variable(s) to be searched during data entry. This selection should match the variable selected from the Choose Field Where Action Will Occur drop-down list.

  5. Click OK. The code appears in the Program Editor window.

  6. Click Save.

  7. From the Check Commands window, click OK.

  • When a duplicate record is entered from the Enter module, the Autosearch dialog box opens with all the matching records listed.

  • View the potential duplicate record, by double clicking the arrow that appears next to the record. The field where the potential duplicate was entered is cleared.

  • Alternatively, you can click Cancel to remain on the current record and accept the duplicate value.

Note: For more information on using Autosearch, please see the Autosearch topic in the Command Reference.


Set a European Date Format

  • Date literals in Check Code and Analysis Programs (.PGMs) must use 4-digit years. Failure to do so will result in an error message once per session.

  • Date literals with 2-digit years are treated according to the computer's local settings.

  • During an Epi 6 import, if not specified, the import YEAR defaults to the current year and the SPLITYEAR defaults to the locale setting; if a locale setting does not exist, the system defaults to 1930 (Windows 2000 default).


Copy the Value of a Field

Copy the Value of a Field from a Main View to a Related View

In order for a value from a field in the main View to appear in a related View, Check Code must be created. For example, there may be an ID Number or Name that needs to be visible in the Parent and Child Views.

The following instructions assume the Parent and Child Views already exist. The field to be copied needs to exist in the main View or be created in the main View prior to beginning.

There are five steps to this task. They are:

  • Step One- Use Define to create a new global variable.

  • Step Two- Assign a field value to the new global variable.

  • Step Three- Copy code to the page and record level.

  • Step Four- Add the global variable to a field on the child View.

  • Step Five- Copy code to the page and record level.

Step One – Use Define to create a new global variable

A new global variable will be created using the DEFINE command. It will be available in the Parent View and the Child View and can pass values between the two Views.

  1. From the Parent View, click Program. The Program Editor opens.

  2. From the Choose Field Where Action Will Occur drop-down list, select DEFINEDVARIABLES. This sets the location of the command to be created in the DEFINEDVARIABLES section. The Check Code Command tree opens.

  3. Click Define. The DEFINE dialog box opens.

  4. Type a new Variable Name.

  5. From the Scope section, select Global.

  6. Click OK. The code appears in the Program Editor.

  7. Click Save from the Program Editor.

  • If the chosen name variable name already exists, a message will display.

Step Two – Assign a field value to the new global variable

Select the variable that contains the value to be copied to the Child View and assign it the new global variable using the ASSIGN command.

  1. From the Choose Field Where Action Will Occur drop-down, select the variable you would like to see repeated in the Child View.

  2. Verify the After radio button is selected.

  • The global variable should populate after data has been entered into the main variable.

  3. Click Assign. The ASSIGN dialog box appears.

  4. From the Assign Variable drop-down list, select the new global variable.

  • The global variable will appear in ALL UPPERCASE.

  5. From the Available Variables drop-down list, select the variable to be copied to the global variable.

  6. Click OK. The code you created appears in the Program Editor. The code should read:

  • ASSIGN GlobalVariableName = ParentViewVariable.

  7. Click Save from the Program Editor.

Step Three – Copy code to the page and record level

The newly coded variable needs to function at the field level, page level, and record level so that it populates with the various types of navigation. The new code needs to be copied to each level and the ALWAYS command must be added. The ALWAYS command states that the global variable will always populate if there is a value assigned.

  1. Select the Assigned code just created in the Program Editor and copy it.

  2. From the Choose Field Where Action Will Occur drop-down list, select Page.

  • If there are many pages, select the page where the original variable is located.

  3. Type into the Program Editor the command ALWAYS.

  4. Press Enter.

  5. Paste the Assign code.

  6. Press Enter.

  7. Type END. This is to End the ALWAYS command.

  8. Press Enter.

  9. Type ENDBEFORE or click the Before radio button in the Before or After section. The ENDBEFORE command allows the code to run before accessing a View, Page, or Record field. The Program Editor should read:

ALWAYS
ASSIGN GlobalVariableName = ParentViewField
END
ENDBEFORE

  10. Click Save.

  11. Highlight and copy the Check Code.

  12. From the Choose Field Where Action Will Occur drop-down list, select Record.

  13. Paste the code in the Program Editor.

  14. Click Save.

  15. Click OK to return to MakeView.

Step Four – Add the global variable to a field on the Child View

  1. Open the Child View.

  2. Open the Field Definition dialog box and create a new field.

  • The new field must be the same field type as the field being copied from the Parent View.

  3. Select the Read Only option.

  4. Click OK. The new variable appears in the View.

  • This is the variable where the global values will be assigned and will appear in data entry.

  5. Click Program. The Program Editor appears.

  6. From the Choose Field Where Action Will Occur drop-down list, select the variable just created in the Child View.

  7. Verify that the Before radio button is selected.

  • Set the action to occur before data entry into the field. The ENDBEFORE statement appears in the Program Editor.

  8. Click Assign. The ASSIGN dialog box appears.

  9. From the Assign Variable drop-down list, select the new variable.

  10. From the Available Variables drop-down list, select the global variable created in the Parent View.

  11. Click OK. The code appears in the Program Editor.

  12. Click Save.

Step Five – Copy code to the page and record level

The newly coded variable needs to function at the field level, page level, and record level so that it populates with the various types of navigation. The new code needs to be copied to each level and the ALWAYS command must be added. The ALWAYS command states that the global variable will always populate if there is a value assigned.

  1. Select the Assigned code just created in the Program Editor and copy it.

  • ASSIGN NewField = GlobalVariableName

  2. From the Choose Field Where Action Will Occur drop-down list, select Page.

  • If there are many pages, this is the page where the original variable is located.

  3. In the Program Editor, type the ALWAYS command.

  4. Press Enter.

  5. Paste the Assign code.

  6. Press Enter.

  7. Type END. This is to End the ALWAYS command.

  8. Press Enter.

  9. Type ENDBEFORE or click the Before radio button in Before or After section. The ENDBEFORE command allows the code to run before accessing a View, Page, or Record field. The Program Editor should read:

ALWAYS
ASSIGN NewField = GlobalVariableName
END
ENDBEFORE

  10. Click Save.

  11. Highlight and copy the Check Code.

  12. From the Choose Field Where Action Will Occur drop-down list, select Record.

  13. Paste the code in the Program Editor.

  14. Click Save.

  15. Click OK to return to MakeView. The value of the field should now appear in the Parent and Child View.


Concatenate Fields

There are two ways to concatenate or join variables into one variable from the MakeView Program Editor using Check Code. The Substring function or the Format function can be used.

When writing this code in MakeView, future records will be programmed. The code will not go back and populate previously entered data. If previously entered data need to be concatenated, open the Analysis module and use the Format function.

Concatenate Fields with the Ampersand '&' Operator

This example illustrates how to join the data from two fields and assign the data into a third field using the ‘&’ operator. In this case, Patient Full Name will be assigned the concatenation of First Name and Last Name.

  1. From MakeView, click Program. The Make/Edit View: Check Commands tab selector opens.

  2. From the Choose Field Where Action Will Occur drop-down list, select the field that the code should run after. The Check Command Tree opens.

  • In this example, the code needs to run after the Last Name field is completed.

  3. Click Assign. The ASSIGN dialog opens.

  4. From the Assign Variable drop-down list, select the field to contain the concatenated value.

  5. Create the = Expression using the '&' operator.

  • ASSIGN TargetField = FieldA & FieldB & … & FieldZ

  • In this example, ASSIGN PatientFullName = FirstName & LastName

  • If in Enter, FirstName was entered the name "Carl" and LastName was entered the name "Gao", the result of PatientFullName would be "CarlGao." Notice there are no spaces between the names. To add a space between the names, simply modify the ASSIGN statement by adding a blank space in quotes between the first and last names as in the following statement:

ASSIGN PatientFullName = FirstName & " " & LastName

Concatenate Fields with the Substring Function

This example illustrates how to join parts of two variables to create a unique text ID. In this case, a Patient ID will be created that is made up of parts of the patient's last name and first name. The ampersand (&) operator is used to join the two parts together.

  1. From MakeView, click Program. The Make/Edit View: Check Commands tab selector opens.

  2. From the Choose Field Where Action Will Occur drop-down list, select the field the code should run After. The Check Command Tree opens.

  • In this example, the code needs to run after the first name variable is entered.

  3. Click Assign. The ASSIGN dialog box opens.

  4. From the Assign Variable drop-down list, select the field to contain the concatenated value.

  5. Create the =Expression using the SUBSTRING syntax.

  • SUBSTRING(<variable>, position #, character #)

<variable> is the field or variable.

position # is the position of the first character to be extracted from the variable.

character # is the number of characters to extract.

  • In this example, the ID variable contains a combination of the first position and four characters of the last name plus the first position and three characters of the first name.

ASSIGN ID = SUBSTRING(LName, 1, 4) & SUBSTRING(FName, 1, 3)

Assign dialog box: Substring Example

  6. Click OK. The code appears in the Program Editor window.

  7. Click Save.

  8. Click OK in the Check Commands window.

  9. Test the code in the Enter Data module.

  • The example functions as such:

Last Name: Smith

First Name: Meg

Patient ID: SmitMeg

  • The Patient ID field being calculated is Read Only.

Substring Data Entry example

Convert Fields to Lower Case with the Format Function

The format function is normally used to convert fields of various types to a string or text type. However, there are many other uses of the format function. See the command reference for a more complete explanation of the format function.

  1. From the MakeView Page Names window, click Program. The Make/Edit View: Check Commands tab selector opens.

  2. From the Choose Field Where Action Will Occur drop-down list, select the variable the code should run After. The Check Command Tree opens.

  • In the following examples the Patient ID field will be populated from the information added to the first name and last name fields.

  3. Click Assign. The ASSIGN dialog box opens.

  4. From the Assign Variable drop-down list, select the variable to contain the concatenated value.

  5. Create the =Expression using the Format syntax.

  • FORMAT(<variable>, ["Format specification"])

  • To add spaces between the fields write the code using a blank space in quotes and concatenate this into the middle using the ampersand & operator as in FName & " " & LName.

  • Using the '<' less than symbols creates a lower case value and '>' greater than creates an upper case value. Mixed case values are created using the <> symbols together.

  • In this example, the ID variable contains a combination of the first and last names in lower case with a space between the names.

ASSIGN ID = FORMAT(FName, "<") & " " & FORMAT(LName, "<")

Concatenate using the FORMAT function example

  6. Click OK. The Assign code appears in the Program Editor window.

  7. Click Save in the Program Editor. If the code is written properly it will turn green.

  8. Click OK in the Make/Edit View: Check Commands tab selector. The Make/Edit View page appears.

  9. Test the code in the Enter module.

  • The example functions as such:

Last Name: Smith

First Name: Meg

Patient ID: meg smith

  • The Patient ID field being calculated is Read Only.

Concatenate with FORMAT example


Copy the Unique Key

Copy the Unique Key to a Field

Each data table created contains a UniqueKey. Uniquekey values can be copied and made to appear in a View by using the MakeView Program Editor and creating Check Code. In order for the UniqueKey to appear across records and pages, it must be assigned and be coded to use the ALWAYS command on the Page and the record level. UniqueKeys can be assigned to a field or variable.

Add the UniqueKey to a Page or Record

  1. Open a new or existing View.

  2. Click Program. The Program Editor opens.

  3. From the Choose Field Where Action Will Occur drop-down list, select the Page where the field is located to populate with the UniqueKey.

  4. From the Program Editor, type in the command ALWAYS.

  5. Press Enter.

  6. Type in the command ASSIGN Fieldname = UniqueKey

  7. Press Enter.

  8. Type END.

  9. Press Enter.

  10. Type ENDBEFORE.

  11. Click Save. The command should read

ALWAYS
ASSIGN Fieldname = UniqueKey
END
ENDBEFORE

  12. Highlight and copy the code from the Program Editor.

  13. From the Choose Field Where Action Will Occur drop-down list, select Record.

  14. Paste the Check Code into the Program Editor.

  15. Click Save.

Add the UniqueKey to a Field

  1. Open a new or existing View.

  • The UniqueKey can be assigned to an existing field in the View, or a new field can be created and designated as Read Only.

  2. Click Program. The Program Editor opens.

  3. From the Choose Field Where Action Will Occur drop-down list, select the Field to populate with the UniqueKey.

  4. From the Program Editor, type in the command ALWAYS.

  5. Press Enter.

  6. Type in the command ASSIGN Fieldname = UniqueKey

  7. Press Enter.

  8. Type END.

  9. Press Enter.

  10. Type ENDBEFORE.

  11. Click Save. The command should read

ALWAYS
ASSIGN Fieldname = UniqueKey
END
ENDBEFORE


Assign Random Numbers

Assign Random Numbers Using the Program Editor

To assign random numbers in MakeView, use the RND function from the Program Editor.

The RND function generates a random number between <min> and <max>. The <min> and <max> values can be variables that store the random values or numeric literals. Each time the random variable is used, each record contains a different random value depending on the minimum and maximum values identified in the code.

The code appears in the Program Editor as

ASSIGN Random1 = RND(<min>, <max>)

Note: The random number is not guaranteed to be unique, but you can use Autosearch to be sure that it is. Random1 is the variable created in the View or defined in the Program Editor.

Try It

Create the following example using the project Sample.MDB and the viewOswego. Code can be typed directly into the Program Editor or the Command Tree can be used.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Random1
ASSIGN Random1 = RND(1, 100)
SELECT Random1 > 50
LIST Random1

  • If this program is run more than once, the output will always be different because the value of Random1 is recomputed each time it is used.

  • There may be values of Random1 below 50 because there are two uses of Random1 -- once in SELECT and again in LIST.

  • To create permanent or consistent changes between uses, use the WRITE command to create a secondary table.


Create Check Code for Option Box Fields

Any form of Check Code can be added to option box variables. Code can be added to any line/choice present in the option boxes. Use the MakeView Program Editor to create complex Check Code for option box variables.

For this example, the check code created uses the GOTO command. Check Code was used to create the following scenario. If the answer to TestOptions is choice 1, the cursor will jump to Question 2. If the answer to TestOptions is choice 2 or 3 the cursor will jump to Question 1. Check the tab order before creating the Check Code to ensure that the tab order is correct.

Adding Check Code to Option Boxes example

  1. Use the Field Definition dialog box to create an Option Box. Note the name of the variable.

  • Here the variable is named TestOptions.

  • Each text line that represents a choice in the View represents a numeric position in the Program Editor. Since the positions are text values, they must be enclosed in quotes.

  • For example, in the variable TestOptions there are 3 lines/choices that can be made. In the Program Editor the choices are numeric, choice 1= position '1', choice 2= position '2', and choice 3= position '3'.

  2. Open the Program Editor.

  3. From the Choose Field Where Action Will Occur drop-down list, select TestOptions.

  4. From the Command Tree, select If. The IF dialog box opens.

  5. In the If Condition field, type Test Options = ‘1’.

  • Remember that the number 1 in this instance represents a text value called choice 1, therefore the ‘1’ must be enclosed in quotes.

  6. Click Then. The Check Commands dialog box opens. The Command Tree is not active.

  7. From the Fields tab, click GoTo. The GOTO Selection box appears.

  8. Select Question 2.

  9. Click OK. The IF dialog box appears.

IF dialog box

  10. Click Else. The Check Commands tab selector opens. The Command Tree is not active.

  11. From the Fields Tab, click GoTo. The GOTO selection box appears.

  12. Select Question 1.

  13. Click OK. The IF dialog opens.

  14. Click OK. The code appears in the Program Editor.


Use the EpiWeek External DLL

How to use EpiWeek External DLL

Epi Info allows the use of Windows Dynamic Link Library (DLL) files in check and program code. DLLs contain two types of routines called properties and methods. Properties represent values that stay the same until explicitly changed. Methods perform calculations or other functions when executed.

The following is an example of using a DLL with the Epiweek DLL. The Epiweek DLL is an illustrative DLL that calculates the epidemiologic week.

  1. Define a DLL object

  2. Set any required properties

  3. Invoke any desired methods

  • There is an Analysis limitation in that DLLs cannot be used with field or standard variables.

  1. Declare a DLL

The Epiweek DLL must be declared in the DEFINED VARIABLES section of Check Code before it can be used.

To define a new DLL use the following syntax:

DEFINE <variable> DLLOBJECT "<ActiveX name>.<class>"

  • <variable>

Is any valid EpiInfo variable name you wish. For this example, the variable name is MyTest.

  • <ActiveX name>

Refers to the internal ActiveX project name. In this case the internal name is “EIEpiwk”.

  • <class>

Refers to the class inside the DLL to be created. The Epiweek DLL contains only one class and it is called "Epiweek".

The resulting code to activate the DLL in Enter should be:

DEFINE Mytest DLLOBJECT "EIEpiwk.Epiweek"

  2. Set the Required Properties

Epidemiological weeks are usually complete weeks. The ministry of health of the country defines the day of the week to be considered the first epidemiologic day. As a result, some countries may consider the first day of the week Sunday while others may consider the first day of the week Saturday or Monday.

The EpiFirstDaySetting property allows you to decide which day of the week is considered to be the beginning of the epidemiologic week.

Using the following Check Code will set the first day settings:

<variable>!<property> = <expression>

  • <variable>

Is the name of a DLLOBJECT variable previously defined. (Example: MyTest)

  • <property>

Is the name of a property defined in the DLL. In this case the property name is "EpiFirstDay".

  • <expression>

The value to which the property is set. It must be the type expected by the DLL. In this case, it expects a day number where Sunday=1.

The default value for this property is 1. It means that if you do not set this property, the DLL will consider that the epidemiologic week starts on Sunday by assigning the value of 1 by default.

Since we wish to start our epidemiologic weeks on Sunday, we can set the property as follows:

ASSIGN Mytest!EpiFirstDaySetting = 1

EpiFirstWeekSetting

Some countries may define the first week of the epidemiologic year as the week which includes January first. Other countries may consider the first epidemiologic week of the year the first full seven-day week. It is possible to change the definition for the first week of the year by setting a property called EpiFirstWeek.

<variable>!EpiFirstWeekSetting = <number>

  • <variable>

Is the name that you assigned to the DLL in the defined variables area

  • <number>

The number you can store determines on what type of week you wish to use. In this case, 1 will set the first epidemiologic week as the week that includes Jan 1st, 2 defines the first epidemiologic week as the first week with four or more days, and 3 will define week number 1 as the first seven-day week of the year. If no value is set, EpiFirstweek will assume that the first week of the year is the first week with four or more days (default value is 2).

  3. Invoke Methods

As explained above, methods usually perform some calculations and return a value. Usually methods need some parameters to perform the computations. The parameter to be passed to the method should be included in parentheses. If no parameters are needed, you should include the parentheses anyway. The general syntax for executing DLL methods which return results is as follows:

{<variable> =} <DllVarName>!<method>(<expression>, ...)

  • <variable>

Is the name of a variable to receive the result of the method. Not used if no result returned.

  • <DLLVarName>

Is the name of a DLLOBJECT variable previously defined. (Example: MyTest)

  • <method>

Is the name of a method defined in the DLL. In this case the method name is "EpiYearWeek".

  • <expression>

Is a parameter of the type expected by the DLL. If no expression is applied, then use empty parentheses. If multiple, separate by commas. In this case, it expects a date.

Epidate=Mytest!EpiYearWeek(OnsetDate)

Methods which do not return results are executed using the following syntax:

<variable>!<method>(<variable2[, variable3,...]>)

Note: You do not need to include the call in an ASSIGN statement if it does not return any value.

Version

Version is the first method. It takes no parameters and returns no results; it only displays a message box with the date of the DLL. We can invoke the method through the following code:

Mytest!version()

EpiYearWeek

In contrast to the previous method, Epiyearweek takes one parameter and returns a string representing the epidemiological week as YYYY:WW. Remember that you will receive from the DLL a string; therefore, you cannot assign this method to a numeric variable. In the example below, TEXT1 will receive the value corresponding to the year and epidemiological week of the onset date.

ASSIGN TEXT1 = MyTest!EpiYearWeek(OnsetDate)

Epiweek

If the year of occurrence is not relevant, you can use the Epiweek method instead. The advantage of using Epiweek is that the value is returned as a number and it can be stored in a numeric field. Epiweek takes one required parameter that must be a date. The week is calculated relative to the year of the date provided. We calculated the Epidemiological week using the following code:

ASSIGN week = Mytest!EpiWeek(OnsetDate)

An optional numeric parameter allows the week to be computed relative to a specified year. Passing two parameters is useful to create histograms because the week numbers are sequential across multiple years. An alternative syntax to calculate the epidemiological week for an outbreak starting in September 1, 2001 could be:

ASSIGN OutbreakWk = Mytest!Epiweek(OnsetDate, 2001) - Mytest!Epiweek(9/1/2001) + 1


Introduction to Enter Data

The Enter program displays Views constructed in MakeView, constructs data tables, and controls the data entry process using settings and Check Code specified in MakeView. Use Enter to enter new data, modify existing data, or search for records. When data are entered into a View, the data table inside the project (.mdb) is populated. The Find function allows records to be located based on a series of matched variables. As data are entered, the cursor moves from field to field, page to page, and saves data. Navigation is provided for New, Next, Previous, First, and Last records and through related tables.


Navigate Enter Data

Navigate Enter DataWorkspace

Open Enter by clicking Enter Data from the Epi Info main menu or by selecting Programs > Enter Data from the main page navigation menu. Use the Enter workspace to navigate Related Views during data entry.

Enter Data workspace

The Page panel contains page and record information. Use the Page Panel to navigate pages in the View, access the Find feature, and Save Data.

The Enter window provides data entry capability for the form, survey, or questionnaire created in MakeView. Data are entered into the individual records and Check Code is run through the Enter program.


Enter Data in a View

  1. From the Enter window, select File > Open. The Select the Project dialog box opens.

  2. Locate and select a project.

  3. Click Open. The Select a Table dialog box opens.

  4. Select a table from the list and click OK. The View opens.

  • In the case of related Views, child Views can only be accessed by opening the parent View first.

  5. Place the cursor in the first data entry field.

  6. Enter data into each field, using the Tab key or the Enter key to move to the next field. As you move from one field to another, any Check Code associated with the field executes.

  • As the cursor moves from field to field and from page to page, data are saved automatically.

  • At the completion of the last field on a page, the cursor automatically jumps to the next page in the sequence.

  • Field properties that were defined in MakeView such as Repeat, Read Only, and Required are enforced during data entry.

  • Drop-down lists and code tables created in MakeView are enforced.

  • Multiline Fields automatically scroll when filled with text to hold up to 1 gigabyte of information.

  • Plain text fields automatically scroll when filled with text to hold up to 128 characters per field.

Warning! Using the mouse to move through the fields will result in the Check Code not executing.

Note: The Tab key will not move the cursor out of a grid field. To move the cursor out of a grid, use the Esc key.


Save a Page or Record

The Enter module saves data and pages automatically as you move from record to record or page to page. You can move through a record by tabbing or you can move through a record by clicking New from the Page View window and opening a new record.

There are three ways to save the current record manually:

  • Click Save Data from the Page View window.

  • Select File > Save from the navigation bar.

  • Press Ctrl+S from the keyboard.

Saving a record manually is necessary only if you want to leave a record or the screen with part of the data filled in.


Define Yes/No Fields

Define Yes or No Fields

The values of Yes and No can be changed to True and False or anything you like from the Enter module.

  1. From the Enter window, select Options > Yes/No Fields. The Setting for Yes/No Fields dialog box opens.

  2. Use the drop-down boxes to change Yes and No to True and False, Si and No, Oui and Non, and so forth.

  3. Click OK. The Yes as and No as fields will now only accept True/False answers during data entry.

  • Return the values to Yes or No at any time in the data entry process by returning the Setting for Yes/No Fields dialog box.


Find Records

Find can search for a record matching any field value or combination of field values. If a View has more than 255 fields and therefore more than one associated data table, only the first data table will be used for the FIND. As a result, only the fields in the first table will be listed in the field list and only the field values in the first table will be displayed in the results grid. Advanced search features can also be used in the Find Records window.

  • When using Find from the Enter module, date fields can only be searched with the date format MM/DD/YYYY.

  • Find is linked to the process setting for including deleted or undeleted records in the Analysis module. Find will include both deleted and undeleted records when the statement SET PROCESS = BOTH is issued in Analysis; Deleted records only for SET PROCESS = DELETED; and Undeleted records only for SET PROCESS = UNDELETED.

To Find Records Matching a Specified Criteria

  1. From the Enter window, select Edit > Find or click Find from the Enter Page panel. The Find Record window opens.

  2. Select one or more field names from the Choose Search Fields section. Blank search field(s) open for each selected field name.

  3. Enter search criteria and click OK. Results appear in a grid in the Find window.

    • Click Reset to begin a new search. Note that more than one field can be searched at a time.

    • Click Back to return to the Enter workspace.

  4. Open a record by double-clicking the arrow on the chosen row. The record displays in the Enter workspace.

  5. Click Find from the Enter workspace to return to the list of found records.


Advanced Searches

Enhance Searches with Find

  • When searching a numeric or date field, the accepted search format for the field is displayed to the right of the entry field.

  • Embedded text items in multiline and text fields can be found by searching for *word* where "word" is the text string being sought. This type of search is called a Wild Card Search. In a Wild Card search, the asterisk is used to represent any letter or string of letters. For example, a search for DIAGNOSES *heart* would identify all records for a large text field called DIAGNOSES which contained the word "heart."

  • Dates and numeric fields can be searched using less than or greater than values (<>).

  • OR can be used to search for matches based on more than one criteria.

  • ? can be used to search for a single unknown character.

  • If a field is declared as a SOUNDEX field, a checkbox appears to the right of the search field. Click the checkbox to search using the SOUNDEX property. The SOUNDEX property is set during questionnaire design in Make View.

  • Use the LIKE operator to search for a broad range of matches.

  • Searches are not case sensitive and are designed to be more inclusive than exclusive. Spelling variations are automatically accommodated.

  • For automatic searching to eliminate duplicates, use the AUTOSEARCH command in Check Code.


Compact Databases

Compact a Database from Enter

When objects or data are deleted from a project, the file can become fragmented and use disk space inefficiently. Compacting the project makes a copy of the file and rearranges how the file is stored on the disk. Compacting optimizes the performance of both databases and projects. The Compact Utility can be accessed from the Enter Module or from the Epi Info main menu.

The project to be compacted must be closed prior to using the Compact Utility.

  1. From the Enter window, select File > Compact Database. The Compact dialog box opens.

Compact dialog box

  2. Use the MDB File to Compact Browse button to select a project and to populate the MDB File to Compact field. The Name of Compacted MDB File field populates with the same file name.

  3. Use the Name of Compacted MDB File Browse button to select a different or new file name for the compacted project.

  • Assign a password, if necessary.

  4. Click OK. The Compact Done dialog box opens.

  5. Click OK to close the dialog box.

  6. Click Exit to close Compact. You can check the size of the .MDB File in windows.


Introduction to Analysis

Analysis is a program for manipulating, managing, and analyzing data. Analysis acts as a statistical toolbox providing many ways to transform data and perform statistical analysis. Data can be selected, sorted, listed, or manipulated with a series of commands, functions, and operators. Available statistics include frequencies and means as well as more advanced processes including Kaplan-Meier Survival Analysis and Logistic Regression. Analysis can be accessed by clicking Analyze Data from the Epi Info™ main window or by selecting Programs > Analyze Data. Analysis reads data files created in MakeView and other types of databases such as Access, DBase, FoxPro, and Microsoft Excel. Graphs and maps can be produced from Analysis to present graphic representations of data.


Navigate the Analysis Workspace

The Analysis module contains three working areas: the Analysis Command Tree, the Program Editor, and the analysis Output window. Analysis provides access to existing data either directly or through Views created in MakeView. Analysis reads data from files and tables created in Epi Info, Microsoft Access, Microsoft Excel, FoxPro, dBase, and many others. Analysis can access any format for which an ODBC driver is available. Most other programs can produce one of the supported formats, or a fixed-field or delimited text file that can be read by Analysis. Analysis can also read HTML tables which allows data to be extracted directly from web pages.

The Analysis Command Tree contains a list of available commands separated into folders by command type. Commands are generated, edited and executed in Analysis. Selecting a command opens the corresponding dialog box for that command, function, or statistic to run.

The Program Editor displays the commands and code created using the Analysis Command Tree. Commands can also be typed directly into the Program Editor. Programs or .PGM files written in Analysis can be stored in the current .MDB or as text files. Saved programs can be run against new data, or shared with others.

The Analysis Output window acts as a browser and displays information generated from the commands run in the Program Editor. The Analysis Output window buttons allow you to navigate through program scripts that have run and display in the output screen.


Use the READ Command

In order to analyze data, the data must be read or imported into a project in Analysis. The READ command allows the selection of a project and a data table on which to run statistics. The READ command is used almost every time Analysis is opened.

Syntax

READ <table specification> LINKNAME=<linktable name>
FILESPEC HDR=["YES" | "NO"]
 FMT="<file
 format>" UID="<username>" PWD="<password>" END

Note: For every View, there are two tables in the database. The table with the ‘view’ prefix, as in ‘viewSurveillance’, contains information about the View used by MakeView and Enter to display the View properly and to execute the Check Code. The table without the 'view' prefix as in ‘Surveillance’ is the table that holds the actual data entered with the Enter module. READ will always read the actual data table whether the TableSpecification in the command has the ‘view’ prefix or not.

Warning! Never manipulate the View table in a software application outside of Epi Info or the database may become corrupt and render the View unusable.

READ Command Generator

READ Command Reference

  1. From the Analysis Command Tree Data folder, click Read (Import). The READ dialog box opens.

READ dialog box

  • The Current Project field indicates the database file (.MDB) which is the current default source of data. Output files created from these data are stored in this destination folder, unless otherwise specified.

  • It is recommended that the Current Project and the Data Source match if they are MDBs. Having the same Project and Data Source allows all data and tables to remain together. If they do not match, click Change Project. The selected project appears as the Current Project and Data Source.

  • If READ is used and the Current Project and Data Source do not match, a linked table is created. Data sources other than the current project are accessed through link tables located in the current project. Linked files are references to data tables, and not the actual data, so if files are moved to a new location, the links will be broken. For most purposes you do not need to give names to the link files.

  • From the Data Formats drop-down list, specify the data format for the data to be read, for example MS Excel. To read in an Epi Info MDB file, the setting should remain at the default Epi 2000.

  2. From the Show section, select the Views radio button to see the available view in the project or select the All radio button to see all the tables in the project.

  3. From the Views section, select a data table.

  4. Click OK. The READ command is saved in the Program Editor and Run at the same time. The Current View file location, Record Count, and Date appear in the Analysis Output window and the READ command appears in the Program Editor.

  • Click Save Only to save the command in the Program Editor. The command does not run and the Record Count is not displayed.


Read a Microsoft Excel File

  1. From the Analysis Command Tree, click Read (Import). The READ dialog box opens.

  2. From the Data Formats drop-down list, select Excel 8.0.

  3. Verify the Current Project. If it is not the project the .XLS data should be imported into, click Change Project and select the appropriate file.

  4. In the Data Source field, click the Browse button to locate and select the workbook (.xls) to import into Analysis.

  5. Click Open. The READ dialog box opens.

  6. From the Show section, select the Worksheet or Named Range radio button.

  7. Select a Worksheet or a Named Range from the list provided.

  8. Click OK. The FILESPEC dialog box opens.

  • First Row Contains Field Names is checked by default. If the first row of the spreadsheet does not contain field names, deselect the checkbox.

  9. Click OK. The Record Count and file information appear in the Analysis Output window.

Write the Excel data to a new project file

In order to analyze data from an Excel file, use the WRITE command and create an MDB file.

  1. From the Analysis Command Tree, click Write (Export). The WRITE dialog box opens.

WRITE dialog box

  2. Keep the default setting All (*) selected to write all the Excel data to a new file.

  3. From the Output Mode section, select the Replace radio button.

  4. Keep the default Output Format selection of Epi 2000.

  5. In the File Name field, click the Browse button.

  6. Create and Save a new project to store the data table.

  7. In the Data Table field, type a name.

  8. Click OK.

  • In order to see the data, use the READ command to open the newly created project.


Read a Text File

  1. From the Analysis Command Tree, click Read (Import). The READ dialog box opens.

  2. From the Data Formats drop-down list, select Text.

  • Verify the Current Project. If it is not the project the .TXT data should imported into, click Change Project and select the appropriate file. (The text file is not in the .MDB until it is written.)

  3. In the Data Source field, click the Browse button to locate and select the file to import into Analysis.

  4. Click Open. Notepad opens and displays the file.

  5. Click the close X button in Notepad.

  6. From the Show section, select the Text Files radio button.

  7. Select a Text File or Table from the list provided.

  8. Click OK. The FILESPEC dialog box opens.

FILESPEC dialog box

Note: There are two forms of text files. Both forms have only one table per file, so there is no need to specify a table. Both forms put the data for one record on a single line. The difference is in how the fields are indicated.

FILESPEC for Delimited Text Files

Delimited text files use designated characters to separate fields, such as a comma or tab.

  1. In the File Format section, click the Delimited radio button.

  2. From the Field drop-down list, specify whether fields are separated by a comma or tab.

  3. From the Text drop-down list, specify if fields are surrounded by double quotes.

  4. Select or de-select the First Row Contains Field Names checkbox depending on the file.

  5. Click OK. The Record Count and file information appear in the Analysis Output window.

FILESPEC for Fixed Width Text Files

Fixed Width specifies that each field occupies the same positions in each line. All character positions through the last field must be accounted for, even if they do not contain useful data (the command generator automatically generates filler fields as required). Even if the first line of the file contains field names, the names specified in field definitions are used.

  1. From the File Format section, click the Fixed Width radio button.

  2. Select or de-select the First Row Contains Field Names checkbox depending on the file. The FILESPEC dialog box opens.

FILESPEC dialog box

  3. Enter information in the following columns: Field Name, Data Type, Start and End.

  • Start is the beginning column number of the field and should be one greater than the End column of the previous field.

  • End is the ending column number for the field.

  • Total column widths (field length) cannot be over 80 characters. Column width is the difference between Start and End columns for a given field.

  • Columns should be sequential to avoid insertion of blank columns. For example, if the first field starts at column 1 and ends at column 10, then the second field should start at 11 which does not skip any columns.

  • The Start and End positions need to be as accurate as possible to include all data in the columns and to avoid overlap with neighboring fields. For a proper import, it may be necessary to count the length of the columns inside the text file prior to importing the file.

  4. Click OK. The Record Count and file information appear in the Analysis Output window.

Write the Text data to a new project file

In order to analyze data from a text file, use the WRITE command and create an MDB file.

  1. From the Analysis Command Tree, click Write (Export). The WRITE dialog box opens.

WRITE dialog box

  2. Keep the default setting All (*) selected to write all the variables to a new file.

  3. From the Output Mode section, select the Replace radio button.

  4. Keep the default Output Format selection of Epi 2000.

  5. In the File Name field, click the Browse button.

  6. Create and Save a new project to store the data table.

  7. In the Data Table field, type a name.

  8. Click OK.

  • In order to see the data, use the READ command to open the newly created project.


Read an Epi 6 REC File

  1. From the Analysis Command Tree, click Read (Import). The READ dialog box opens.

  2. From the Data Formats drop-down list, select Epi 6.

  • Verify the Current Project. If it is not the project the .REC data should imported into, click Change Project and select the appropriate file.

  3. In the Data Source field, click the Browse button to locate and select the file to import into Analysis.

  4. Click Open. The READ dialog box opens.

  5. From the Show section, select the Data Files radio button.

  6. Select a Data File or Table from the list provided.

  7. Click OK. The Record Count and file information appear in the Analysis Output window.

Write the Epi 6 data to a new project file

In order to analyze data from an Epi 6 file, use the WRITE command and create an MDB file.

  1. From the Analysis Command Tree, click Write (Export). The WRITE dialog box opens.

  2. Keep the default setting All (*) selected to write all the data to a new file.

  3. From the Output Mode section, select the Replace radio button.

  4. Keep the default Output Format selection of Epi 2000.

  5. In the File Name field, click the Browse button.

  6. Create and Save a new project to store the data table.

  7. In the Data Table field, type a name.

  8. Click OK.

  • In order to see the data, use the READ command to open the newly created project.


Read a dBASE (.DBF) File

  1. From the Analysis Command Tree, click Read (Import). The READ dialog box opens.

  2. From the Data Formats drop-down list, select dBASE IV.

  • Verify the Current Project. If it is not the project the .DBF data should imported into, click Change Project and select the appropriate file.

  3. In the Data Source field, click the Browse button.

  4. From the available files, locate and select the file to import into Analysis.

  5. Click Open. The READ dialog box opens.

  • When the following message appears, click OK: File names for this data format must be in the old 8.3 style.

  6. From the Show section, select the Data Files radio button.

  7. Select a Data File or Table from the list provided.

  8. Click OK. The Record Count and file information appear in the Analysis Output window.

Write the DBF data to a new project file

In order to analyze data from a DBF file, use the WRITE command and create an MDB file.

  1. From the Analysis Command Tree, click Write (Export). The WRITE dialog box opens.

WRITE dialog box

  2. Keep the default setting All (*) selected to write all the data to a new file.

  3. From the Output Mode section, select the Replace radio button.

  4. Keep the default Output Format selection of Epi 2000.

  5. In the File Name field, click the Browse button.

  6. Create and Save a new project to store the data table.

  7. In the Data Table field, type a name.

  8. Click OK.

  • In order to see the data, use the READ command to open the newly created project.


Read a Paradox File

  1. From the Analysis Command Tree, click Read (Import). The READ dialog box opens.

  2. From the Data Formats drop-down list, select Paradox 5.x.

  • Verify the Current Project. If it is not the project the Paradox data should imported into, click Change Project and select the appropriate file.

  3. In the Data Source field, click the Browse button.

  4. From the available files, locate and select the file to import into Analysis.

  5. Click Open. The READ dialog box opens.

  6. From the Show section of the dialog box, select the Data Files radio button.

  7. Select a Data File or Table from the list provided.

  8. Click OK. The Record Count and file information appear in the Analysis Output window.

Write the Paradox data to a new project file

In order to analyze data from a Paradox file, use the WRITE command and create an MDB file.

  1. From the Analysis Command Tree, click Write (Export). The WRITE dialog box opens.

WRITE dialog box

  2. Keep the default setting All (*) selected to write all the data to a new file.

  3. From the Output Mode section, select the Replace radio button.

  4. Keep the default Output Format selection of Epi 2000.

  5. In the File Name field, click the Browse button.

  6. Create and Save a new project to store the data table.

  7. In the Data Table field, type a name.

  8. Click OK.

  • In order to see the data, use the READ command to open the newly created project.


Read with an ODBC Connection

EpiDSN is an ActiveX .dll for development use of Epi Info. The client program can either show its user interface to the user or call the functions of the .dll directly. EpiDSN can create any ODBC database type Data Source Name (DSN), as long as an ODBC driver has been installed on the computer being used. Data from databases such as SQL Server, Oracle or MySQL can be read using an ODBC connection. Although there may be restrictions on the type of access provided to particular tables or fields, analysis of an ODBC data source should otherwise be similar to working with a native Epi Info/Access dataset.

Creating SQL DSN

Microsoft Limitation

The DLL used in EpiDSN to obtain the SQL Server List works with the NT family.

  • Windows 9x cannot use this DLL.

Below is an explanation from Microsoft regarding the DLL:

Client: Requires Windows XP, Windows 2000 Professional, or Windows NT workstation.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server.

Possible Solution

In Windows 9x, users cannot obtain the server and database list. However, they are still able to create a DSN. The user needs to know which server and which database to search for. Type in the server name and database name in the boxes, and then click OK on the DSN screen. A new DSN should be created; after the DSN is created, it is then editable.

  1. From the Analysis Command Tree Data folder, click Read (Import). The READ dialog box opens.

  2. From the Data Formats drop-down list, select ODBC.

  3. In the Data Source field, click the Browse button. The Select DSN dialog box opens.

Select DSN dialog box

  4. Click Create New DSN. The Create New DSN dialog box opens.

  5. In the Data Source Name field, type a name.

  6. In the Description field, type data information.

  7. In the User ID field, type a user id. The User ID field must be completed at each log-in.

  8. In the Password field, type a password. The Password field must be completed at each log-in.

  9. From the ODBC Driver section, select a connection type.

  • If Epi 6 is selected, a Database drop-down list and Browse button appear. Use the drop-down list to select an existing connection or click the Browse button to locate a new .REC file. Then, click OK.

  • If SQL Server is selected, the Server and Database drop-down list appear. Use the drop-down lists to select the connections. Then, click OK.

  • If Other is selected, use the drop-down list from the ODBC Driver section to select a connection type and click OK. The Set-up dialog box for the connection type opens. For more instruction on creating specific types of connections, click Help from the set-up dialog.

  10. Click OK. The Select DSN dialog box opens.

  11. Click OK. The READ dialog box opens.

  12. Select a table or query from the list of data tables.

  13. Click OK. The READ Link dialog box opens.

  14. To make a temporary link or type a name in the field to create a permanent link, click OK.

  15. Click OK. The Record Count and File Information appears in the Output window.

  • Depending on the type of connection made, a Log In dialog box may appear and request re-entry of the User Name and Password owing to file password protection. Use the hourglass cursor to select a field, enter the connection User Name and Password, and click OK.

If a connection has been made to a DSN, you should take the following steps:

  1. From the Analysis Command Tree Data folder, click Read (Import). The READ dialog box opens.

  2. From the Data Formats drop-down list, select ODBC.

  3. In the Data Source field, click the Browse button. The Select DSN dialog box opens.

  4. In the Data Source Name and Description field, use the drop-down list to locate the connection. If changes to the connection are required, click Reconfigure DSN and follow the steps for creating a new DSN.

  5. In the User ID field, type a user id. The User ID field must be completed at each log-in.

  6. In the Password field, type a password. The Password field must be completed at each log-in.

  7. Click OK.


Use the WRITE Command

Use the WRITE command to create a new MDB file with selected variables.

Syntax

WRITE <METHOD> {<output type>} {<project>:}table {[<variable(s)>]}

WRITE <METHOD> {<output type>} {<project>:}table * EXCEPT {[<variable(s)>]}

WRITE Command Generator

WRITE Command Reference

To use the WRITE command, open a project using the READ command. Then, take the following steps:

  1. From the Analysis Command Tree, click Write (Export). The WRITE dialog box opens.

WRITE dialog box

  2. Keep the default setting All (*) selected to write all the variables to a new file.

Note: You can also choose individual variables from the file list or select All (*) Except to exclude variables.

  3. From the Output Mode section, select the Replace radio button.

  • Replace creates a new file and overwrites any existing variables and records. To overwrite or replace data in a table, use the Replace selection.

  • Append adds the new variables and records to the end of any existing data.

  4. Keep the default Output Format selection of Epi 2000.

  • Output formats available are the same as those that can be imported using the READ command. This includes Excel, Paradox, Text, HTML, etc.

  5. In the File Name field, click the Browse button.

  6. Create and Save a new project to store the data table.

  7. In the Data Table field, type a name.

  8. Click OK.

  • In order to see the data, use the READ command to open the newly created project.

  • The WRITE command will not create a view and cannot be used to create a data table that will work with a view. To preserve views, use the MERGE command.

  • Not all Output Formats support all possible input formats. For example, all Output types support text fields of 255 characters, while only Foxpro supports longer fields. Reading a Foxpro field of longer than 255 characters will result in errors when trying to write to dBase 5.0 format. Conversion of incompatible field types must be completed prior to using the WRITE command.


Use the ASSIGN Command

This command assigns the result of an expression or the value of a field to a variable. Variables are usually created with the DEFINE command and then assigned a value.

Syntax

ASSIGN <variable> = <expression>

<variable> = <expression>

ASSIGN Command Generator

ASSIGN Command Reference

  1. From the Analysis Command Tree, click Variables > Assign. The ASSIGN dialog box opens.

ASSIGN dialog box

  2. From the Assign Variable drop-down list, select the variable to have a value assigned.

  3. In the =Expression field, create the assignment syntax based on the needed data.

  4. Click OK. The code appears in the Program Editor.

Try It

In the following example, the zip code field is a number. In order to use the zip code in a map, a new zip code variable must be defined and assigned text values.

  1. From the Analysis Command Tree, use the READ command to open the Sample.MDB project.

  2. From the View section, click viewSurveillance. Then, click OK.

  3. Click Variables > Display. Then, click OK. The variables information appears.

  4. Click Variables > Define. The DEFINE dialog box opens.

  5. In the Variable Name field, create a new variable named Zip2.

  6. Click OK.

  7. From the Analysis Command Tree, click Variables > Assign. The ASSIGN dialog box opens.

  8. From the Assign Variable drop-down list, select Zip2.

  9. In the =Expression field, type the syntax FORMAT(ZipCode,"00000").

  • In this example, the FORMAT function is used to convert the format of the values of the variable ZipCode into the text format. Text values are always surrounded by double quotes. The text values are assigned to the new Zip2 variable.

  10. Click OK. The code appears in the Program Editor.

  11. Use the DISPLAY command to view variable information.


Use the REGRESS Command

The REGRESS command performs multivariate linear regression and contains support for automatic dummy variables and multiple interactions.

Neither logistic nor linear regression assigns any values. The predictor value is computed for each record and both the actual and the residual (actual minus predicted) is available in the out table (predictedactual+residual). Regression can then be run against the out table. The out table includes the uniquekey for Epi Info views; for non-Epi Info views, use the syntax OUTTABLE <tablename> KEYVARS <variable list> to include identifying variables. Then RELATE the out table to the original table, either on a uniquekey or the keyvars, and analyze the residuals as needed.

Syntax

REGRESS <dependent variable> = <independent variable(s)> [NOINTERCEPT] [OUTTABLE=<tablename>] [WEIGHTVAR=<weight variable>] [PVALUE=<PValue>]

Command Generator

Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Advanced Statistics > Linear Regression. The REGRESS dialog box opens.

REGRESS dialog box

  3. From the Outcome Variable drop-down list, select a variable to act as the dependent variable for regression.

  4. From the Other Variables drop-down list, select the variable(s) to act as the predictors.

  • Make Dummy is activated if one or more predictor variables are selected. If one predictor is selected, a numeric variable is treated as discrete rather than continuous; the variable is enclosed in parentheses to indicate that dummy variables are created. If a predictor variable enclosed in parentheses is selected in the list, the Make Dummy button changes to Make Continuous and selecting it results in the variable being treated as continuous. If more than one predictor variable is selected, the Make Dummy button changes to Make Interaction and selecting it results in all possible combinations of the selected variables being added to the regression as interaction terms.

  • Make Interaction appears if two or more variables are selected from the Other Variables list box. Interaction Terms are defined with the Make Interaction button. Click Make Interaction and the relationship populates the Interaction Terms list.

  • The Output to Table field identifies a table to receive output from the command. Results can be sent to an output table for graphing.

  • If No Intercept is selected, the regression is performed without a constant term, forcing the regression line through the origin.

  5. Click OK. Results appear in the Output window.

Try It

  1. Read in the project Sample.MDB and open viewBabyBloodPressure.

  2. Click Linear Regression. The REGRESS dialog box opens.

  3. From the Outcome Variable drop-down list, select SystolicBlood.

  4. From the Other Variables drop-down list, select AgeInDays.

  5. From the Other Variables drop-down list, select Birthweight.

  6. Click OK. Results appear in the Output window.

Linear Regression Results


Use the ROUTEOUT Command

The location of output can be specified using the ROUTEOUT command. If no directory is given, the file is placed in the directory of the current project. Results accumulate until a CLOSEOUT command is executed. Output files can be placed in any folder. The ROUTEOUT command allows for the selection of both a path and filename. If no output file is selected, Analysis uses the default value. In each folder Analysis creates a new index table that contains links to the files created.

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Output > RouteOut. The ROUTEOUT dialog box opens.

ROUTEOUT dialog box

  3. In the Output Filename field, enter a file name or click the Browse button to locate an existing file.

  • If needed, select Replace Existing File to write over any files with the same name.

  4. Click OK. Then, create Output on the existing project.

  • Notice the title bar contains the output filename specified in the ROUTEOUT command.

  • The new file is placed in the selected directory with the extension .HTM.

  5. From the Output window toolbar, click Open. The Browse dialog box opens.

  6. Locate and select the file created with ROUTEOUT and click Open. The Output appears in the Output window.

  • The saved Output file can be opened by any application that can read an HTML file.

To end the ROUTEOUT command, choose one of the following options.

  • From the Output folder, click Closeout.

  • READ in a new project.

  • Close Epi Info.


Use the CANCEL SORT Command

Syntax

SORT

CANCEL SORT Command Generator

CANCEL SORT Command Reference

  1. From the Analysis Command Tree, click Select/If > Cancel Sort. The CANCEL SORT dialog box opens.

  2. Click OK. The selection criteria is removed from the data and the original record count is restored.


Use the LOGISTIC Command

The Logistic Regression command performs conditional or unconditional multivariate logistic regression with automatic dummy variables and support for multiple interactions.

The dependent (Outcome) variable must have a Yes/No value. Records with missing values are excluded from the analyses.

Independent (Other Variables) can be numeric or Yes/No variables. Missing is interpreted as Missing, 0 is interpreted as False, and any other response is interpreted as True. Independent variables are controlled by the Include Missing setting; if Include Missing is true and there are missing values as well as true and false, then dummy variables are made automatically which represent the contribution of Yes versus Missing and No versus Missing. Independent variables of text type are automatically turned into dummy variables which represent the contribution of each value relative to the value lowest in the sort order. Independent variables of a date or numeric type are treated as continuous variables unless they are surrounded by parentheses in the command, in which case they are automatically turned into dummy variables which represent the contribution of each value relative to the lowest value.

Neither logistic nor linear regression assigns any values. The predictor value is computed for each record and both the actual and the residual (actual minus predicted) is available in the out table (predictedactual+residual). Regression can then be run against the out table. The out table includes the uniquekey for Epi Info views; for non-Epi Info views, use the syntax OUTTABLE <tablename> KEYVARS <variable list> to include identifying variables. Then RELATE the out table to the original table, either on a uniquekey or the keyvars, and analyze the residuals as needed.

Syntax

LOGISTIC <dependent variable> = <independent variable(s)> [MATCHVAR=<match variable>] [NOINTERCEPT] [OUTTABLE=<tablename>] [WEIGHTVAR=<weight variable>] [PVALUE=<PValue>]

Command Generator

Command Reference

Logistic Regression Overview

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Advanced Statistics > Logistic Regression. The LOGISTIC dialog box opens.

LOGISTIC dialog box

  3. From the Outcome Variable drop-down list, select a variable to act as the dependent variable for regression.

  4. From the Other Variables drop-down list, select the variable(s) to act as the predictors.

  • Make Dummy is activated if one or more predictor variables are selected. If one predictor is selected, a numeric variable is treated as discrete rather than continuous; the variable is enclosed in parentheses to indicate that dummy variables are created. If a predictor variable enclosed in parentheses is selected in the list, the Make Dummy button changes to Make Continuous and selecting it results in the variable being treated as continuous. If more than one predictor variable is selected, the Make Dummy button changes to Make Interaction and selecting it results in all possible combinations of the selected variables being added to the regression as interaction terms.

  • Make Interaction appears if two or more variables are selected from the Other Variables list box. Interaction Terms are defined with the Make Interaction button. Click Make Interaction and the relationship populates the Interaction Terms list.

  • Match Variable identifies the variable indicating the group membership of each record.

  • The Output to Table field identifies a table to receive output from the command. Results can be sent to an output table for graphing.

  • If No Intercept is selected, the regression is performed without a constant term, forcing the regression line through the origin.

  5. Click OK. Results appear in the Output window.

Try It

  1. Read in the project Sample.MDB and open viewOswego.

  2. Click Logistic Regression. The LOGISTIC dialog box opens.

  3. From the Outcome Variable drop-down list, select ILL.

  4. From the Other Variables drop-down list, select BROWNBREAD, CABBAGESAL, WATER, MILK, CHOCOLATE, and VANILLA.

  5. Click OK. Results appear in the Output window.

Logistic Regression Results


Use the MERGE Command

Use the MERGE command to join records. MERGE is only supported when the READ data source is an Epi Info or Access table. The MERGE data source can be of any type, for example, Excel. A merge requires a key that represents a matching variable inside both sets of data. Use the WRITE/APPEND command, if the data is from different datasets but contain the same file structures.

Syntax

MERGE <table specification> {LINKNAME=<text>} <key(s)> <type>

MERGE Command Generator

MERGE Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Data > Merge. The MERGE dialog box opens.

MERGE dialog box

  3. From the Data Formats drop-down list, specify the data format for the data to be read, for example MS Excel. The Data Source field clears, if a Format other than Epi 2000 is selected.

  4. In the Data Source field, click the Browse button. The Merge File Name dialog box opens.

  5. Select the file that contains the data to be merged.

  6. Click Open. The MERGE dialog box populates with the available tables or worksheets.

  7. Select a data table or worksheet to merge. The Build Key button activates.

  8. Click Build Key. The RELATE - BUILD KEY dialog box opens.

  • There must be a variable in the Current Table that corresponds to a variable in the Related Table. For example, Patient ID.

RELATE-BUILD KEY dialog box

  9. From the Available Variables drop-down list, select the current table merge variable.

  10. Click OK. The Current Table field shows the selection.

  11. From the Available Variables drop-down list, select the related table merge variable.

  12. Click OK. The Related Tables field shows the selection.

  13. Click OK to accept the Build Key designations. The MERGE dialog box opens.

  14. Make Update and the Append selections from the corresponding checkboxes.

  • For matching records, Update replaces the value of any field in the READ table whose build key matches the MERGE table.

  • For unmatched records, Append creates a new record in the READ table with values only for those fields that exist in the MERGE table.

  • For most merges, select Update and Append records. If both options are selected, records containing the same selected merge variables will be updated (overwritten) if there is new information, and all other records will be appended (added) to the end of the data table.

  15. From the Merge dialog box, click OK.

  • If the MERGE table is the same project as the READ table, then the Record Count in the Output window updates to reflect any new records added to the table.

  • If the MERGE table is from a spreadsheet, the FILESPEC dialog box opens. If the First Row Contains Field Names checkbox represents the spreadsheet, click OK. If the first row does not have field names, de-select the check box and click OK.

  • If the MERGE table is in a different project from the READ table, as when the Data Source and Current Project are different, or when merging from a spreadsheet, then the READ dialog box opens. To make a temporary link in the current project, click OK. To make a permanent link, enter a table name and click OK. The Record Count in the Output window updates to reflect any new records added to the table.


Use the DEFINE Command

This command creates new variables.

Syntax

DEFINE <variable> {<scope>} {<type indicator>} {("<prompt>")}

DEFINE Command Generator

DEFINE Command Reference

  1. From the Analysis Command Tree, click Variables > Define. The DEFINE dialog box opens.

DEFINE dialog box

  2. From the Scope section, select one of the following variables:

  • Standard variables stay in a current project and are considered as one variable in that view. They can assume new values with each record during a file query such as a LIST or FREQ.

  • Global variables persist for the duration of program execution. They are used to pass values from one view to a related view. They do not change during a file query.

  • Permanent variables are stored in the Epi Info.INI file or system registry and retain any value assigned until the value is changed by another assignment or until the variable is undefined. They are shared among Epi Info programs and persist even if the computer is shut down and restarted.

  3. From the Variable Type drop-down list, select one of the following types: Date, Numeric, Text, or Yes-No.

  4. Optional. In the Prompt field, enter a Prompt.

  • The Prompt field allows a description of the variable which can be displayed in place of the variable name by use of the SHOWPROMPTS setting.

  5. Click OK.

Define a Group

To define a group, take the following steps:

  1. From the Analysis Command Tree, click Variables > Define Group. The DEFINE GROUP dialog box opens.

  2. In the Group Variable field, type a name.

  3. From the Variables list box, select the variables to be included in the group.

  4. Click OK.


Use the DIALOG Command

The DIALOG command provides interaction with the user from within a program. Dialogs can display information, ask for and receive input, and offer lists for making choices.

Syntax

DIALOG "<prompt>" {TITLETEXT="<title>"}

DIALOG "<prompt>" <variable> <entry type> {TITLETEXT="<title>"}

DIALOG "<prompt>" <variable> "<value 1>", "<value 2>", "<value 3>", … ,"<value n>" {TITLETEXT="<title>"}

DIALOG "<file type selection>" <variable> READ {TITLETEXT="<title>"}

DIALOG "<file type selection>" <variable> WRITE {TITLETEXT="<title>"}

DIALOG "<prompt>" <variable> [<list type>] {TITLETEXT="<title>"}

DIALOG "<prompt>" <variable> DBVALUES <table name> {TITLETEXT="<title>"}

DIALOG Command Generator

DIALOG Command Reference

  1. From the Analysis Command Tree, click User Interaction > Dialog. The DIALOG dialog box opens.

  2. From the Dialog Type section, select one of the following types:

  • Simple allows the selection of a dialog title and prompt.

  • Get Variable requires the additional selection of an Input Variable and Variable Type. Additional selections for Numeric Pattern, Date Format or Text Length are also available. Yes-No-Cancel dialogs can also be created using the Get Variable options. The Variable Type defaults to any previously assigned type and cannot be changed from DIALOG.

  • List of Values requires the additional selection of an Input Variable, Variable Type, Show Table, and Show Variable.

  3. In the Title field, enter a Title to be displayed at the top of the dialog box.

  4. In the Prompt field, enter a Prompt for the dialog box being created.

  5. Click OK.

Try It

  1. Read in the project Sample.MDB and open the SohoDead table.

Hint: From the READ dialog box, select the All option from the Show group box to see all the available tables.

  2. Define a new variable called NewDialog.

  3. Click User Interaction > Dialog. The DIALOG dialog box opens.

  4. Select List of Values as the Dialog Type.

  5. Enter the Title text: Coordinates.

  6. Enter the Prompt text: Select Coordinates.

  7. From the Input Variable drop-down list, select NewDialog.

  8. From the Variable Type drop-down list, select Number.

  9. From the Show Table drop-down list, select SohoDead.

  10. From the Show Variable drop-down list, select X_COORD.

  11. Click OK. The code appears in the Program Editor.

DIALOG syntax example


Use the DISPLAY Command

This command allows the display of table, view, and database information.

Syntax

DISPLAY <option> [<sub-option>] [OUTTABLE=<tablename>]

DISPLAY Command Generator

DISPLAY Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  • If an .MDB file is not opened, only language is shown for Selected Variables.

  2. From the Analysis Command Tree, click Variables > Display. The DISPLAY dialog box opens.

DISPLAY dialog box

  3. From the Information For section, select one of the following view data options:

  • Variables allows for the display of information about all of the variables in the dataset, the defined variables, field variables, or selected variables.

  • Views allows for the display of the views in the current dataset or a selected dataset. Information about views and other Epi Info-specific tables is shown.

  • Tables allows for the display of information about tables in a database. Information about tables and other Epi Info-specific or generic tables is shown.

  4. Type an Output to Table name, if needed.

  5. Click OK. The information is displayed in the Output window.


Use the COXPH Command

The COXPH command performs Cox-Proportional Hazards and Extended Cox-Proportional Hazards survival analysis. This form of survival analysis relates covariates to failure through hazard ratios. A covariate with a hazard ratio greater than '1' causes failure for the treatment if the subject leaves the program. A covariate with a hazard ratio less than '1' improves survival for the treatment. Some of the subjects may become unavailable prior to the failure if they leave the treatment program before it is completed; the term "censored" is applied to them. COXPH is especially constructed to deal with this situation. Statistics showing the risk set by group and time can be written to an OUTTABLE for later formatting.

Syntax

COXPH <time variable>= <covariate(s)>[: <time function>:] * <censor variable> (<value>) [TIMEUNIT="<time unit>"] [OUTTABLE=<tablename>] [GRAPHTYPE="<graph type>"] [WEIGHTVAR=<weight variable>] [STRATAVAR=<strata variable(s)>] [GRAPH=<graph variable(s)>]

Command Generator

Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Advanced Statistics > Cox Proportional Hazards. The Cox Proportional Hazards dialog box opens.

Cox Proportional Hazards dialog box

  3. From the Censored Variable drop-down list, select the variable that indicates whether the case is a failure or a censored case.

  4. From the Value for Uncensored drop-down list, select the value of the censored variable that indicates a failure.

  5. From the Time Variable drop-down list, select the variable that indicates at which time the failure or censorship occurred.

  6. From the Time Unit drop-down list, select the unit in which the time variable is expressed, if needed.

  7. From the Group Variable drop-down list, select the discrete variable used to divide cases into groups.

  • In the Cox model, there is no essential difference between the group variable and other predictor terms, for this reason use of the group variable is optional.

  8. From the Other Variables drop-down list, select the predictor variables.

  • Make Dummy is activated if one or more predictor variables are selected. If one predictor is selected, a numeric variable is treated as discrete rather than continuous; the variable is enclosed in parentheses to indicate that dummy variables are created. If a predictor variable enclosed in parentheses is selected in the list, the Make Dummy button changes to Make Continuous and selecting it results in the variable being treated as continuous. If more than one predictor variable is selected, the Make Dummy button changes to Make Interaction and selecting it results in all possible combinations of the selected variables being added to the regression as interaction terms.

  • Make Extended Term is activated when a continuous predictor variable is selected. It is used to generate a time dependency function for use with the Extended Cox model.

  9. Click Graph Options. The Cox Graph Options dialog box opens.

  10. From the Plot Variables drop-down list, select a graph type.

  11. From the list box, select a variable(s) to graph.

  12. Clear the Customize Graph checkbox.

  13. Click OK. The Cox Proportional Hazards dialog box opens.

  14. Click OK. Results appear in the Output window.

Try It

  1. Read in the Sample.MDB project and open the Addicts table.

  2. Click Cox Proportional Hazards . The Cox Proportional Hazards dialog box opens.

  3. From the Censored Variable drop-down list, select Status.

  4. From the Value for Uncensored drop-down list, select 1.

  5. From the Time Variable drop-down list, select Survival_Time_Days.

  6. From the Group Variable drop-down list, select Clinic.

  7. From the Other Variables drop-down list, select Methadone_dose__mg_day and Prison_Record.

  8. Click Graph Options. The Cox Graph Options dialog box opens.

  9. From the Plot Variables drop-down list, select Survival Observed.

  10. From the list box, select Clinic.

  11. Clear the Customize Graph checkbox.

  12. Click OK. The Cox Proportional Hazards dialog box opens.

  13. Click OK. Results appear in the Output window.

The regressed curves do not match the observed curves. Compute a time dependent analysis separating clinic at 365 days with the STEP function.

  1. In the Program Editor, type DEFINE Clinic1.

  2. Click Run this Command.

  3. In the Program Editor, type ASSIGN Clinic1=Clinic.

  4. Click Run this Command.

  5. Click Cox Proportional Hazards . The Cox Proportional Hazards dialog box opens.

  6. From the Censored Variable drop-down list, select Status.

  7. From the Value for Uncensored drop-down list, select 1.

  8. From the Time Variable drop-down list, select Survival_Time_Days.

  9. From the Other Variables drop-down list, select Methadone_dose__mg_day, Prison_Record, Clinic1, and Clinic.

  10. From the list box, select Clinic. The Make Extended Term button activates.

  11. Click Make Extended Term. The Make Extended Cox Time Functions dialog box opens.

  12. In the =Expression field, create the syntax STEP(365,Survival_Time_Days).

Make Extended Cox Time Functions dialog box

  13. Click OK.

  14. From the list box, select Clinic1. The Make Extended Term button activates.

  15. Click Make Extended Term. The Make Extended Cox Time Functions dialog box opens.

  16. In the =Expression field, create the syntax 1-STEP(365,Survival_Time_Days).

  17. Click OK.

  18. Click Graph Options. The Cox Graph Options dialog box opens.

  19. From the Plot Variables drop-down list, select Survival Observed.

  20. From the list box, select Clinic.

  21. Clear the Customize Graph checkbox.

  22. Click OK.

  23. Click OK. Results appear in the Output window.


Use the LIST Command

The LIST command creates a line listing of the current dataset. Select specific variables from the Variables drop-down to narrow the list or select * (the Wild Card) to display all the variables. Check the All (*) Except box and select from the Variables drop-down to exclude variables from the list.

To navigate LIST * UPDATE and LIST * GRIDTABLE results use the Tab key on the keyboard to move forward one cell at a time and the Shift+Tab keys to move back one cell at a time. Navigate through the records and cells using the left, right, up, and down arrow keys on the keyboard.

Syntax

LIST {* EXCEPT} [<variable(s)>] {COLUMNSIZE=<num1>, <num2>, <num3>} {NOIMAGE} {NOWRAP} {LINENUMBERS}

LIST {* EXCEPT} [<variable(s)>] {GRIDTABLE | UPDATE}

LIST Command Generator

LIST Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > List. The LIST dialog box opens.

LIST dialog box

  3. Click OK to accept the default settings. The variables in the dataset appear in a grid table inside the Output Window.

  • Grid output is not embedded, so an Output file is not created.

Create a Web Format List

  1. From the Analysis Command Tree, click Statistics > List. The LIST dialog box opens.

  2. From the Display Mode section, select the Web (HTML) radio button. Optional page settings include:

  • Fields Per Page represents a number from 0 to 99 representing the number of columns to be displayed before splitting a table (default=6). If zero, all specified columns will be displayed without splitting the table.

  • Fields used per Image represents a number from 0 to 99 representing the number of columns to be allocated per image (default=0 for rendered images, 3 for unrendered images). If zero, each image column will allocated space based on its width in the view.

  • Fields used per Multiline represents a number from 0 to 99 representing the number of columns to be allocated per memo field (default=0). If zero, each memo column will be displayed separately.

  • Line Numbers causes line numbers to be displayed when automatic splitting is not being used.

  • No Line Wrap prevents line breaks from being inserted in to the text fields, so that columns are as wide as the longest line in the field.

  • Images as Filenames displays the image filename but not the image itself.

  3. Click OK. The List appears in the Output window in a web table format.

  • Web display mode creates an embedded Output file.

Use List Update

Use the LIST UPDATE command to make changes to the data table. Keep in mind that alterations made using this function are permanent. List update is a valuable option for correcting data entry errors.

  1. From the Analysis Command Tree, click Statistics > List. The LIST dialog box opens.

  2. From the Display Mode section, select the Allow Updates radio button.

  3. Click OK. The List appears in the Output window in a grid table format.

  4. Place the cursor in a data entry field to be updated and make corrections.

  • Edits take effect when the cursor is moved to a new table row or when the grid is closed.

Note: For List Update, Yes-No fields are displayed as ones and zeros. Where '1' equals Yes and '0' equals No.


Use the KMSURVIVAL Command

The KMSURVIVAL command performs Kaplan-Meier Survival Analysis and produces graphs and statistics for one or several groups of subjects being followed in a clinical study. This form of survival analysis relates covariates to failure through hazard ratios. A covariate with a hazard ratio greater than '1' causes failure for the treatment if the subject leaves the program. A covariate with a hazard ratio less than '1' improves survival for the treatment. Some of the subjects may become unavailable prior to the failure if they leave the treatment program before it is completed; the term "censored" is applied to them. COXPH is especially constructed to deal with this situation. Statistics showing the risk set by group and time can be written to an OUTTABLE for later formatting.

Syntax

KMSURVIVAL <TimeVar> = <GroupVar> * <CensorVar> (<Value>) [TIMEUNIT="<TimeUnit>"] [OUTTABLE=<TableName>] [GRAPHTYPE ="<GraphType>"] [WEIGHTVAR=<WeightVar>]

Command Generator

Command Reference

Kaplan-Meier Survival Analysis Overview

Computing KMSURVIVAL

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Advanced Statistics > Kaplan-Meier Survival. The Kaplan-Meier Survival dialog box opens.

Kaplan-Meier Survival dialog box

  3. From the Censored Variable drop-down list, select the variable that indicates whether the case is a failure or a censored case.

  4. From the Value for Uncensored drop-down list, select the value of the censored variable that indicates a failure.

  5. From the Time Variable drop-down list, select the variable that indicates at which time the failure or censorship occurred.

  6. From the Time Unit drop-down list, select the unit in which the time variable is expressed.

  7. From the Group Variable drop-down list, select the discrete variable used to divide cases into groups.

  8. Click OK. Results appear in the Output window.

  • A Survival Probability graph is produced by default. Use the Graph Type drop-down list to select the Log-Survival graph type or None to view the results in a table only.

  • Output can also be written to an Output Table and formatted or edited at a later time.

Try It

  1. Read in the Sample.MDB project and open the Addicts table.

  2. Click KAPLAN-MEIER SURVIVAL. The Kaplan-Meier Survival dialog box opens.

  3. From the Censored Variable drop-down list, select Status.

  4. From the Value for Uncensored drop-down list, select 1.

  5. From the Time Variable drop-down list, select Survival_Time_Days.

  6. From the Time Unit drop-down list, select Days.

  7. From the Group Variable drop-down list, select Clinic.

  8. Click OK. Results appear in the Output window.


Use the FREQ Command

The FREQ command produces a frequency table that shows how many records have a value for each variable, the percentage of the total, and a cumulative percentage. The command FREQ * creates a table for each variable in the current view other than unique identifiers. This command is often used to begin analyses on a new data set.

Syntax

FREQ [<variable(s)>] {<settings>}

FREQ * {EXCEPT [<variable(s)>]} {<settings>}

FREQ Command Generator

FREQ Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Frequencies. The FREQ dialog box opens.

FREQ dialog box

  3. From the Frequency of drop-down list, select a variable from the data table.

  • Click the All (*) Except checkbox to exclude variables.

  • Use the corresponding drop-down lists to select a Weight variable or a Stratify By variable from the data source.

  • Use the Output to Table field to specify a location for table results. The new table can be accessed using the READ command.

  4. Click OK. Results appear in the Output window.

Try It

For this example, use the Analysis Command Tree to generate the FREQ command.

  1. Read in the Sample.MDB project and open viewOswego. There should be 75 records listed in the Output window.

  2. Click Frequencies. The FREQ dialog opens.

  3. From the Frequency of drop-down list, select ILL.

  4. Click OK. Results appear in the Output window.

Frequency of Ill Results

  • The Frequency column gives the count of individuals that were ill and not ill. The Percent column indicates the percentage of the total number who were ill or not ill.

  • The 95% Confidence Limits are a range of values that indicates the likely location of the true value of a measure, meaning in this instance that the number of ill could be as low as 49.4% or as high as 72.4%. Note that the Yes Ill percentage of 61.3% falls within the 95% Confidence range of values based on the data.

Try It

For this example, use the Analysis Program Editor to create the code.

  1. Read in the Sample.MDB project and open viewOswego. There should be 75 records listed in the Output window.

  2. In the Program Editor window, place the cursor under the Read command created and type FREQ ill.

  • Do not press the Enter key on the keyboard. Leave the cursor on the line of code just created.

FREQ code in the Program Editor

  3. Click Run This Command from the Program Editor navigation menu. The code turns green indicating that it is being reviewed for syntax.

  • Results of the command appear in the Output window.

  • Results are the same as those created using the Command Tree dialog boxes.

Try It

A program or PGM can be saved and run repeatedly against a dataset for continuously updated statistics and analyses.

  1. Read in the Sample.MDB project and open viewOswego. There should be 75 records listed in the Output window.

  2. Click Open from the Program Editor. The Read Program dialog box opens.

  3. From the Program drop-down list, select Statistics.

  4. Click OK. The PGM opens in the Program Editor.

  5. Click Run. The Program Editor runs the code and output is placed in the Analysis Output window.

  • Use the scroll bar to review all the results computed to the Output window.


Use the TABLES Command

Use the Tables command to examine the relationship between two or more categorical values. For 2x2 tables, the Tables command produces odds ratios and risk ratios. A 2x2 table is created when each selected variable has a yes or no answer.

Syntax

TABLES <exposure> <outcome> {STRATAVAR=[<variable(s)>]}
 {WEIGHTVAR=<variable>} {PSUVAR=<variable>} {OUTTABLE=<table>} {COLUMNSIZE=<number>}
 {NOWRAP}

TABLES Command Generator

TABLES Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Tables. The TABLES dialog box opens.

TABLES dialog box

  3. From the Exposure Variable drop-down list, select a variable from the data to indicate the presence of a risk factor.

  4. From the Exposure Variable drop-down list, select a variable from the data to indicate the presence of an outcome.

  • Use the Stratify By drop-down list to select a variable to act as a grouping variable.

  • Use the Weight drop-down list to select a variable for weighted analysis.

  • Use the Output to Table field to specify a location for table results. The new table can be accessed using the READ command.

  5. Click OK. Results appear in the Output window.

  6. Scroll down to view the Single Table Analysis.

Try It

Create a 2x2 table using data from the Sample.MDB project.

  1. Read in the Sample.MDB project and open viewOswego. There should be 75 records listed in the Output window.

  2. Click Tables. The TABLES dialog box opens.

  3. From the Exposure Variable drop-down list, select Vanilla.

  4. From the Outcome Variable drop-down list, select ILL.

  5. Click OK. Results appear in the Output window.

Example of a 2x2 Table

  6. Scroll down to view the Single Table Analysis.

Example of Single Table Analysis

Try It

For this example, use the Analysis Program Editor to create the code.

  1. Read in the Sample.MDB project and open viewOswego.

  2. In the Program Editor window, place the cursor under the Read command created and type TABLES Chocolate ill.

  • Do not press the Enter key on the keyboard. Leave the cursor on the line of code just created.

TABLES Command in the Program Editor

  3. Click Run This Command from the Program Editor navigation menu. The code turns green to indicate that it is being reviewed for syntax.

  • Results of the command appear in the Output window.

  • Results are the same as those created using the Command Tree dialog boxes.

Try It

A program or PGM can be saved and run repeatedly against a dataset for continuously updated statistics and analyses.

  1. To see an example of a PGM, read in the Sample.MDB project and open the viewOswego.

  2. From the Program Editor, click Open. The Read Program dialog box opens.

  3. From the Program drop-down list, select Statistics.

  4. Click OK. The PGM opens in the Program Editor.

  5. Click Run. The Program Editor runs the code and output is placed in the Analysis Output window.

  • Use the scroll bar to review all the results computed to the Output window.


Use the MATCH Command

This command is for case control studies in which a case has one or more controls matched by; for example, age group, sex and income group. Each case control set is assigned an ID number so that case 1 and controls 1 are matched one and one. It also performs a matched analysis of the specified exposure and outcome variables, which are assumed to be yes/no variables. One table is produced for each number of cases in a match group. The first variable appears on the left margin and contains values from zero to the number of cases in the match group. The second variable appears on the top margin and contains values from zero to the number of cases in the match group. The cells contain the number of match groups showing the combination of positive exposures and positive outcomes shown in the margins.

Syntax

MATCH <exposure> <outcome> MATCHVAR=<variables> {WEIGHTVAR= <variable>} {OUTTABLE=<tablename>} {COLUMNSIZE=<number>} {NOWRAP}

MATCH Command Generator

MATCH Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Match. The MATCH dialog box opens.

MATCH dialog box

  3. From the Exposure Variable drop-down list, select a variable from the data table.

  4. From the Outcome Variable drop-down list, select a variable from the data table.

  • Use the Weight drop-down to select a variable for weighted analysis.

  5. From the Match Variables drop-down list, select a variable from the data table.

  6. Click OK. Results appear in the Output window.

  • Scroll down to view the Single Table Analysis.

Try It

  1. Read in the Sample.MDB project and open viewRely. There should be 56 records listed in the Output window.

  2. Click MATCH. The MATCH dialog box opens.

  3. From the Exposure Variable drop-down list, select Rely.

  4. From the Outcome Variable drop-down list, select Case.

  5. From the Match Variables drop-down list, select ID.

  6. Click OK. Results appear in the Output window.

  • Scroll down to view the Odds and Risk Ratios.

Try It

For this example, use the Analysis Program Editor to create the code.

  1. Read in the Sample.MDB project and open viewRely.

  2. In the Program Editor window, place the cursor under the Read command created and type MATCH RELY CASE MATCHVAR=ID.

  • Do not press the Enter key on the keyboard. Leave the cursor on the line of code you just created.

  3. Click Run This Command from the Program Editor navigation menu. The code turns green to indicate that it is being reviewed for syntax.

  • Results of the command appear in the Output window.

  • Results are the same as those created using the Command Tree dialog boxes.

Try It

A program or PGM can be saved and run repeatedly against a dataset for continuously updated statistics and analyses.

  1. To see an example of a PGM, read in the Sample.MDB project and open the viewOswego.

  2. From the Program Editor, click Open. The Read Program dialog box opens.

  3. From the Program drop-down list, select Statistics.

  4. Click OK. The PGM opens in the Program Editor.

  5. Click Run. The Program Editor runs the code and output is placed in the Analysis Output window.

  • Use the scroll bar to review all the results computed to the Output window.


Use the MEANS Command

The MEANS command can be used to get an average for a continuous numeric variable. The mean of a yes-no variable is the proportion of respondents answering yes, since Yes equals ‘1’ and No equals ‘0’. For this situation, the FREQ command would be more appropriate. The MEANS command has two formats. If only one variable is supplied, the program produces a table like that 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 like that produced by TABLES, plus descriptive statistics of the numeric variable for each value of the group variable.

Syntax

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

MEANS Command Generator

MEANS Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Means. The MEANS dialog box opens.

MEANS dialog box

  3. From the Means Of drop-down list, select a variable from the data source.

  • Use the Cross-Tabulate By Value of drop-down list to select a variable to help determine if the means of a group are equal.

  • Use the Stratify By drop-down list to select a variable to act as a grouping variable.

  • Use the Weight drop-down list to select a variable for weighted analysis.

  • Use the Output to Table field to specify a location for table results. The new table can be accessed using the READ command.

  4. Click OK. The Output window populates with the results.

  • Scroll down to see the Mean and Standard Deviation results.

Try It

Use the MEANS command to find the average for a continuous variable.

  1. Read in the Sample.MDB project and open viewOswego. There should be 75 records listed in the Output window.

  2. Click MEANS. The MEANS dialog box opens.

  3. From the Means of drop-down list, select Age.

  4. Click OK. Results appear in the Output window.

Means of Age Results

  5. To view the Descriptive Statistics, scroll down the Age listing.

  • Notice the Mean Age of individuals in the dataset is 36.8.

Descriptive Statistics for Means of Age

Try It

For this example, use a numeric variable and a Yes/No variable to determine the MEANS for a group.

  1. Read in the Sample.MDB project and open viewOswego.

  2. Click MEANS. The MEANS dialog box opens.

  3. From the Means of drop-down list, select Age.

  4. From the Cross-Tabulate by Value of drop-down list, select ILL.

  5. Click OK. Results appear in the Output window.

  6. To view the Descriptive Statistics, scroll down the Age listing.

  • Notice the Mean Age of those answering Yes to ill is 39.2 and those answering No to ill is 32.9.

Descriptive Statistics for MEANS with a Cross-Tab variable

Other available statistics include:

  • ANOVA, a Parametric Test for Inequality of Population Means

  • Bartlett's Test for Inequality of Population Variances

  • Mann-Whitney/Wilcoxon Two-Sample Test (Kruskal-Wallis test for two groups)

Note: To view these statistics, the setting for Statistics level must be greater than “None.” See the SET Command in this section.

Try It

For this example, use the Analysis Program Editor to create the code.

  1. Read in the Sample.MDB project and open viewOswego.

  2. In the Program Editor window, place the cursor under the Read command created and type MEANS age.

  • Do not press the Enter key on the keyboard. Leave the cursor on the line of code just created.

MEANS Command in the Program Editor

  3. Click Run This Command from the Program Editor navigation menu. The code turns green to indicate that it is being reviewed for syntax.

  • Results of the command appear in the Output window.

  • Results are the same as those created using the Command Tree dialog boxes.

Try It

A program or PGM can be saved and run repeatedly against a dataset for continuously updated statistics and analyses.

  1. To see an example of a PGM, read in the Sample.MDB project and open the viewOswego.

  2. From the Program Editor, click Open. The Read Program dialog box opens.

  3. From the Program drop-down list, select Statistics.

  4. Click OK. The PGM opens in the Program Editor.

  5. Click Run. The Program Editor runs the code and output is placed in the Analysis Output window.

  6. Use the scroll bar to review all the results computed to the Output window.


Use the SUMMARIZE Command

Use the SUMMARIZE command to aggregate data producing an output table showing the descriptive statistics.

Syntax

SUMMARIZE varname::aggregate(variable) [varname::aggregate(variable) ...] TO tablename STRATAVAR=variable list {WEIGHTVAR=variable}

SUMMARIZE Command Generator

SUMMARIZE Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Summarize. The Summarize dialog box opens.

Summarize dialog box

  3. From the Aggregate drop-down list, select from the available functions to specify how records will be combined. The options are as follows:

  • Average- Used only on numeric fields

  • Count

  • First- Based on Sort order

  • Last- Based on Sort order

  • Maximum

  • Minimum

  • StdDev- Standard Deviation

  • StdDev(Pop)

  • Sum- Only used on numeric fields

  • Var- Variance- Only used on numeric fields

  • Var(Pop)

  4. From the Variable drop-down list, select from the variables in the dataset.

  5. In the Into Variable field, type a name to title the summarized variable.

  6. Click Apply. The code appears in the open field.

  • If grouping is necessary, use the Group By drop-down list to select a variable to group the aggregated data.

  • If a weight variable exists, use the Weight drop-down list to select a variable to weight the aggregated data.

  7. In the Output to Table field, type a name for the new data table.

  8. Click OK. The following message appears in the Output window: Output table created: location listed.

  9. Click Read/Import. The READ dialog box opens.

  10. Click the All radio button. All the tables in the dataset appear in a list.

  11. Locate and select the summary table just created.

  12. Click OK. The Output window populates with the Record Count for the summary table.

  13. Use the LIST command to view the summary table.

Try It

  1. Read in the Refugee.MDB project and open viewMeds. There should be 645 records listed in the Output window.

  2. Click Statistics > Summarize. The SUMMARIZE dialog box opens.

  3. From the Aggregate drop-down list, select Count.

  4. From the Variable drop-down list, select the variable PRESCRIBED.

  5. In the Into Variable field, type MEDS.

  6. Click Apply. The code appears in the open field.

  7. From the Group By drop-down list, select the variable MEDICATI01.

  8. In the Output to Table field, type MEDICATE.

  9. Click OK. The following message appears in the Output window:

    SUMMARIZE meds :: Count(PRESCRIBED) TO medicate STRATAVAR=MEDICATI01

  10. Click Read/Import. The READ dialog box opens.

  11. Click the All radio button. All the tables in your dataset appear in a list.

  12. Locate and select the summary table MEDICATE.

  13. Click OK. The Output window populates with a Record Count of 25 for the summary table.

  14. Use the LIST command to view the summary table.


Use the GRAPH Command

The following steps will create a basic graph containing one main variable. The GRAPH command opens the Epi Graph application and can be used to create a variety of graph types based on the types of data available in the project.

Syntax

GRAPH [<Variable(s)>] GRAPHTYPE ="<GraphType>" [<OptionName>=OptionValue]

GRAPH [<Variable(s)>] * <Crosstab> GRAPHTYPE ="<GraphType>" [<OptionName>=OptionValue]

GRAPH [<Variable(s)>] GRAPHTYPE="<GraphType>"
 XTITLE="<string>"
 YTITLE="<string>"

GRAPH Command Generator

GRAPH Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Graph. The GRAPH dialog box opens.

  • The default graph selection is Bar.

GRAPH dialog box

  3. From the Graph Type drop-down list, select a type of graph from the list.

  4. From the Main Variable(s) drop-down list, select the X-Axis value to graph.

  • Use the Show Value Of drop-down list to select an aggregate when there are multiple records to be displayed as a group.

  • Use the Weight Variable drop-down list to select a variable for weighted analysis.

  • Use the Bar for Each Value Of drop-down list to select a variable to generate multiple series from a single data source each with a different color or style.

  • Use the One Graph for Each Value Of drop-down list to select a variable to generate a multiple series from a single data source each displayed on a separate set of axes.

  • Use the X-Axis Label box to type a label that will appear in the graph.

  5. Click OK. Epi Graph opens.

  6. View the graph. Graphs can also be customized and templates can be saved.

  7. Click the close X button. The graph is now embedded in the Output window as part of your output file.

Try It

Create a bar graph using data from the Sample.MDB project.

  1. Read in the Sample.MDB project and open viewOswego. There should be 75 records listed in the Output window.

  2. Click Statistics > Graph. The GRAPH dialog box opens.

  3. From the Graph Type drop-down list, select Bar.

  4. From the Main Variable drop-down list, select the variable Age to use for the X-Axis.

  5. Click OK. Epi Graph opens.

Bar Graph example

  6. Click the close X button. The bar graph is now embedded in the Output window and part of the output file.

  • Notice the Graph code that appears in the Program Editor.

Try It

A program or PGM can be saved and run repeatedly against a dataset for continuously updated statistics and analyses.

  1. To see an example of a PGM, read in the Sample.MDB project and open the viewOswego.

  2. From the Program Editor, click Open. The Read Program dialog box opens.

  3. From the Program drop down, select Graph1.

  4. Click OK. The PGM opens in the Program Editor.

  5. Click Run. The Program Editor runs the code and output is placed in the Analysis Output window.

  • Use the scroll bar to review all the results computed to the Output window.


Change the Appearance of a Graph

Once a graph is created through Analysis the Epi Graph module opens. Graphs can be edited using the Customization dialog box. This is a brief overview of some of the commonly used features of Epi Graph. A thorough description of Epi Graph is given later in this chapter.

To change the appearance of a graph, take the following steps:

  1. Right click the graph. A pop-up menu opens.

  2. Select Customization Dialog or select View > Customization from the main menu. The Customization dialog box opens.

Customization Dialog box

  3. Use the tab selectors to make changes to the graph. Editing options differ depending on the type of graph created.

  • General tab

  • Plot tab

  • Subsets tab

  • Points tab

  • Axis tab

  • Font tab

  • Color tab

  • Style tab

  4. Click Apply to see the changes without closing the Customization dialog box.

  5. Click OK to apply the changes and close the Customization dialog box.


Use the MAP Command

The MAP dialog box is divided into two sections. The drop-down lists and selections on the left apply to the data source information and the drop-down lists and selections on the right apply to the shapefile information. Selections in the Geographic Variable drop-down lists on each side must correspond for a map to be created.

Syntax

MAP <Aggregate Function>(<VarName>) <GeoVarName> ::
 '<Shapefile>':<Variable > {TITLETEXT="<Text>"} {TEMPLATE='<Filename>'}
 {OUTTABLE=<Tablename>}{DENOMINATOR=<Var2>[*<Multiplier>]}
 {WEIGHTVAR=<Var3> } [RUNSILENT]

MAP Command Generator

MAP Command Reference

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Map. The MAP dialog box opens.

  • The MAP dialog box allows for the selection of a Weight variable.

  • The MAP dialog box allows for the selection of a Template File. If a Template File is used an Output Table must be specified.

  • The MAP dialog box allows for the entry of a map title.

  • If Run Silent is selected, map customization is not allowed. Epi Map will create the map and close. The map is embedded in the Analysis Output window.

MAP dialog box

  3. From the Aggregate Function drop-down list, select one of the following: Count, Sum, Average, Minimum, Maximum, or Case-Based. Aggregates are used when there are multiple records to be displayed for the same geographic area.

  • If the 1 Record Per Geographic Entity checkbox is selected, the Aggregate Function defaults to Sum.

  4. From the Geographic Variable drop-down list, select a variable from the data that indicates which area on the map will contain the data.

  5. From the Data Variable drop-down list, select a variable to indicate which data will be displayed on the map.

  6. In the Shapefile field, click the Browse button. The MAP dialog box opens.

  7. Locate and select a Shapefile (.SHP).

  8. Click Open. The Shapefile field populates with the shape name and location.

  9. From the Geographic Variable drop-down list, select a Geographic Variable to be mapped that corresponds to the data source Geographic Variable.

  • The MAP dialog box allows for the selection of a Denominator for the computation of rates.

  • The MAP dialog box allows for the selection of a Multiplier if a Denominator is selected.

  10. Click OK. Epi Map opens and the map displays.

  11. Click the close X button. The map is embedded in the Analysis Output window.

Try It

  1. Read in the Sample.MDB project and open viewMexMap95. There should be 32 records listed in the Output window.

  2. Click MAP. The MAP dialog box opens.

  3. Select the 1 Record Per Geographic Entity checkbox. The Aggregate Function defaults to Sum.

  4. From the Geographic Variable drop-down list, select STATE.

  5. From the Data Variable drop-down list, select PerTeenBirths95.

  6. In the Shapefile field, click the Browse button. The MAP dialog box opens.

  7. Locate and select MXState.shp.

  8. Click Open. The Shapefile field populates with the shape name and location.

  9. From the Geographic Variable drop-down list, select NAME. The geographic variable section populates with the map information.

  10. Click OK. Epi Map opens and the map displays a choropleth map.

  11. Close the close X button. The map is embedded in the Analysis Output window and the output file.


Map a Rate

Rates can be mapped by creating calculations with the Define and Assign commands or by using the MAP dialog box and selecting a Denominator and Multiplier value. The Multiplier field appears once a Denominator value is selected. The method selected to calculate the rate will depend on the available datasets. Data tables must be aggregated and contain a geographic value in order to be mapped.

Map a Rate created with Define and Assign

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Variables > Define. The DEFINE dialog box opens.

  3. Type a name for the rate calculation. Then, click OK.

  4. From the Analysis Command Tree, click Variables > Assign. The ASSIGN dialog box opens.

  5. Type in the rate formula to be used and click OK.

  • RateVar=Count/Population*100000

  • The number multiplied by depends on the population numbers to be included in the rate calculation.

  6. From the Analysis Command Tree, click Statistics > Map. The MAP dialog box opens.

  7. Select the 1 Record Per Geographic Entity checkbox. The Aggregate Function defaults to Sum.

  8. From the Geographic Variable drop-down list, select a variable from the data that indicates which area on the map will contain the data.

  9. From the Data Variable drop-down list, select the computed Rate Variable to be mapped.

  10. In the Shapefile field, click the Browse button. The MAP dialog box opens.

  11. Locate a SHP file and click Open. The Shapefile field populates with the shape name and location.

  12. From the Geographic Variable drop-down list, select a Geographic Variable to be mapped that corresponds to the data source Geographic Variable.

  13. Click OK. Epi Map opens and the map displays with the computed values in the legend.

Create a Rate Using the MAP Command

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Map. The MAP dialog box opens.

  3. Select the 1 Record Per Geographic Entity checkbox. The Aggregate Function defaults to Sum.

  4. From the Geographic Variable drop-down list, select a variable from the data that indicates which area on the map will contain the data.

  5. From the Data Variable drop-down list, select the data variable to be divided.

  6. In the Shapefile field, click the Browse button. The MAP dialog box opens.

  7. Locate a SHP file and click Open. The Shapefile field populates with the shape name and location.

  8. From the Geographic Variable drop-down list, select a Geographic Variable to be mapped that corresponds to the data source Geographic Variable.

  9. From the Denominator drop-down list, select the population variable to be used in the calculation. The Multiplier field appears in the dialog box.

  10. From the Multiplier field, type a numeric value. For example, 100000.

  11. Click OK. Epi Map opens and the map displays with the computed values in the legend.


Use the SELECT Command

Use SELECT to view or analyze specific records based on selection criteria.

Syntax

SELECT <expression>

SELECT Command Generator

SELECT Command Reference

  1. From the Analysis Command Tree, click Select/If > Select. The SELECT dialog box opens.

Select dialog box

  2. Use the Available Variables drop-down list to select variables from the open dataset.

  3. Use the Select Criteria field and the Functions and Operators buttons to create selection code.

  4. Click OK. The Record Count in the Output window should alter based on the number of records meeting the new criteria.

  • From the Analysis Command Tree, click Statistics > List to view the records matching the selection criteria.

  5. From the Analysis Command Tree Select/If folder, click Cancel Select to cancel the selection criteria and return the Record Count to all records in the dataset.


Select a Date Range

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Select/If > Select. The SELECT dialog box opens.

SELECT dialog box

  3. From the Available Variables drop-down list, select a date variable.

  • In this example, DateVar is a date variable used in the data table. The DateVar has to be a date field or be converted into a date field using the NUMTODATE or TXTTONUM functions.

  4. In the Select Criteria field, create the date range selection code by using the greater than >, less than <, and AND operators.

Note: Literal dates in PGMs are always in US date format. Unless the date literal is enclosed in braces or pipe symbols. European date format (DD/MM/YYYY) literals must be enclosed in braces as in {23/11/2007}. ISO date literals (YYYY/MM/DD) must be enclosed in pipe symbols as in |2007/11/23|.

Create the following example using the project called Sample.MDB and the data from viewSurveillance.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
SELECT BirthDate > 01/01/1970 AND BirthDate < 01/01/1979


Use the CANCEL SELECT Command

Syntax

SELECT

CANCEL SELECT Command Generator

CANCEL SELECT Command Reference

  1. From the Analysis Command Tree, click Select/If > Cancel Select. The CANCEL SELECT dialog box opens.

  2. Click OK. The selection criteria is removed from the data and the original record count is restored.


Save and Open a PGM

Save and Open a Program (PGM)

Commands entered into Analysis generate lines of code in the Program Editor and can be stored in the current MDB. Programs can be saved internally within the project (MDB) or externally as a text file with a .pgm file extension. Saved programs can be run as data is updated. Analysis automatically saves the last program created in the Program Editor in a file called LastPGM.pgm. The LastPGM.pgm file is saved in the Epi_Info folder and gets overwritten each time a new PGM is created and the application is closed. Programs can be saved as text files and shared without sharing data tables.

Example of code created in the Program Editor

Example of code in the Program Editor

Save Code as a PGM

  1. From the Program Editor navigation bar, click Save. The Save Program dialog box opens.

Save Program dialog box

  2. In the Program field, type a name for the program.

  3. In the Author field, type a name or initials.

  4. In the Comments field, type a description of the program.

  5. Click OK.

  • When code is saved, it is written to a special table in the current .MDB called Programs.

  • A saved program can be executed with the RUNPGM command or opened in the Program Editor.

  • From the Save Program dialog box, click Text File to save code to a text file.

Open and Run a Saved PGM

  1. From the Program Editor, select File > Open or click Open. The Read Program dialog box opens.

  2. From the Program drop-down list, select a saved PGM.

  • Information about the program automatically populates the open fields in the dialog box.

  • To open a program that was saved externally, click Text File to view all available .PGM files.

  3. Click OK. The program code opens in the Program Editor.

  • Code can now be run, edited, or saved.

  4. Click Run. The Program Editor runs the code and displays the results in the Output window.

  • To run individual commands place the cursor on the command and click Run This Command.

Note: If you exit from Analysis without saving your program, it is automatically saved as LASTPGM.PGM in the Epi_Info directory, but only until the next time you exit from Analysis.


Store Output

Analysis Output files are saved as HTML and XML files automatically. Output files are by default named Out##.HTM and Out##.XML. File names and locations can be changed using the Storing Output command in Analysis. HTML Output can be opened and saved by other software applications such as MS Word.

  1. From the Analysis Command Tree, click Output > Storing Output. The Result Storage dialog box opens.

Storing Output dialog box

  2. In the Output File Prefix field, type a file name.

  3. In the Output File Sequence field, type a new sequence number.

  4. Specify a new location for the files to be saved, if needed. By default, all output is saved to the Epi_Info folder.

  5. Click OK. Changes to the file name and location appear in the window title bar.


Use the Line Break Character

Command text within the Program Editor is automatically broken to avoid horizontal scrolling; however, these breaks will not be saved in the program, and the resulting lines of code may be too long to restore properly. In such cases, use the line break character ‘\’ to separate the command into multiple lines manually.

Note: The line break character cannot be used within quoted text.

Example of a long command:

READ "Epi 2000"
LIST Address Age AgeType Attendname Attendphone BirthDate CaseIdNumber Case

Example of code with line break inserted:

READ "Epi2000"
LIST Address Age AgeType Attendname Attendphone \
BirthDate CaseIdNumber CaseInfo City Comment \
County CountyName DateAdmitted Demographic Died \
Disease Entered Ethnicity EventCode EventDate \
EventType FirstName Hospital GRIDTABLE


Analyze Related Views

To use RELATE, at least one table must be opened with the READ command. The table to be linked needs a key field that relates records in the two tables and can be used to join the two tables. The keys in the main and related tables or files do not have to have the same name. If the table was created in MakeView and the data entry done using Enter, Analysis can establish a relationship automatically using the UniqueKey and (Foreign Key) variables created by Epi Info. If the relationship was created in Epi 6 or another program that uses different keys, the key variables in both files must be identified. Relationships are represented by double colons (::). Analysis can establish relationships using multiple keys.

After issuing the RELATE command, the variables in the related table may be used as though they were part of the main table. Where variable names are duplicated in the related tables, the variable names will be suffixed with a sequence number. Frequencies, cross-tabulations, and other operations involving data in both the main and related tables can be performed. The WRITE command can be used to create a new table containing both sets of data. More than one table can be related to the main table by using a series of RELATE commands.

Relate keys can contain mathematical or string concatenation expressions. Epi Info functions can be used to determine relationships, although it may be easier to write out a new file in which the complex key is included as a single variable, and to use this single variable as a key.

MDB File RELATE Syntax

Use READ to open the first MDB file and RELATE to open the second and create the relationship.

READ 'C:\Epi_Info\MyData.mdb':File1

RELATE 'C\Epi_Info\MyData.mdb':File2 Key1::Key2

RELATE SYNTAX with Different File Types

READ 'C:\Epi_Info\MyData.mdb':FileA

RELATE FileB SSN::SSN1 AND Date::Date1

RELATE Command Generator

RELATE Command Reference

Try It

Epi Info comes with a related database called Refugee. The variable FAMIDNUM is an identification key (Family ID Number) located in more than one view in the project.

  1. Read in the Refugee.MDB project and open viewPatient.

  2. Click RELATE. The RELATE dialog box opens.

  3. Select viewFamily. The Build Key button activates.

  4. Click Build Key. The RELATE-BUILD KEY dialog box opens.

  • Be sure the Current Table radio button is selected.

  5. From the Available Variables drop-down list, select FAMIDNUM.

  6. Select the Related Table radio button.

  7. From the Available Variables drop-down list, select FAMIDNUM.

  8. Click OK. The Related Tables field populates.

  9. Click OK. The RELATE dialog box opens and the Key field populates with the join information.

RELATE dialog box

  10. Click OK. The related view information appears in the Output window.

  • Data from the two tables can now be used to compute statistics.

  11. Create a Table with the Exposure Variable COUNTRY and the Outcome Variable SEX.

  • The variable for COUNTRY of origin is located in viewFamily, and SEX is located in viewPatient.

Program Editor Code

READ 'C:\Epi_Info\Refugee.MDB':viewPatient
RELATE viewFamily FAMIDNUM :: FAMIDNUM
TABLES COUNTRY SEX


Assign Random Numbers

To assign random numbers in Analysis, use the DEFINE command to create a new variable and then use the ASSIGN command to give the new variable a random number value using the RND function. The RND function generates a random number between <min> and <max> with the variable name on the left side of the equal sign storing the random values. Each time the random variable is used each record contains a different random value depending on the minimum and maximum values identified in the code.

Program Editor Code

DEFINE Random1
ASSIGN Random1 = RND(<min>, <max>)

Try It

Create the following example using the project Sample.MDB and the viewOswego. Code can be typed directly into the Program Editor or the Command Tree can be used.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Random1
ASSIGN Random1 = RND(1, 100)
SELECT Random1 > 50
LIST Random1

  • If this program is run more than once, the output will always be different because the value of Random1 is recomputed each time it is used.

  • There may be values of Random1 below 50 because there are two uses of Random1 -- once in SELECT and again in LIST.

  • To create permanent or consistent changes between uses, use the WRITE command to create a secondary table.


Combine Two or More Variables

In some cases data are stored in different variables, but may need to be combined into one variable for analyses.

For example, many symptoms may be contained in a data table as Symptom1, Symptom2, Symptom3, etc. The symptoms could be selected and combined in a new table under a new variable called Disease. Statistics could then be run on the symptoms as a unit.

Steps to Combine Variables

  • Use the DEFINE command to create a new variable.

  • Use the ASSIGN command to give the new variable the value of another variable from the data table.

  • Use the SELECT NOT command to remove MISSING values from the data.

  • Use the WRITE REPLACE command to create a new table for the selected data.

  • Use CANCEL SELECT to return to the original data table.

  • Repeat the process by re-assigning the new variable to a second variable from the data table and removing the missing values.

  • Use the WRITE APPEND command to add the new data to the table.

  • Use the READ command to open the new table and records.

Program Editor Code Example

This sample illustrates how to combine values from two variables into a single variable for further analyses. In this example, the risk-behavior variables Smoking and Alcohol were combined into a new variable called Behavior and written to a new dataset called NewTable.

READ 'C:\Epi_Info\Refugee.MDB':viewTb
DEFINE Behavior
ASSIGN Behavior = Smoking
SELECT NOT Smoking = (.)
WRITE REPLACE "Epi 2000" 'C:\Epi_Info\Refugee.MDB':NewTable Behavior
SELECT
ASSIGN Behavior = Alcohol
SELECT NOT Alcohol = (.)
WRITE APPEND "Epi 2000" 'C:\Epi_Info\Refugee.MDB':NewTable Behavior
SELECT
READ 'C:\Epi_Info\Refugee.MDB':NewTable
LIST *
FREQ Behavior


Convert a Number to Text

Numbers can be converted to text using the FORMAT function. FORMAT is used to change the format of one variable type to another variable type.

Syntax

FORMAT(<variable>, {"<format specification>"})

Example

The Format function can be used to convert a numeric postal code or zip code field to a text type variable for mapping.

  • Use the READ command to open a new file that contains a numeric field called zipcode. In order to use Epi Map with the zipcode values, the values must be changed to text.

  • Use the DEFINE command to create a new variable called NewZip. The variable NewZip will hold the values of zipcode in a text format. The code appears in the Program Editor as DEFINE NewZip.

  • Use the ASSIGN command to to format the variable NewZip with the values of ZipCode and the format of text. Text values are enclosed in quotes. The code appears in the Program Editor as ASSIGN NewZip=FORMAT(ZipCode,"00000").

  • The variable NewZip can now be used as a geographic variable in Epi Map as it is a text type variable but contains numeric data.

Try It

For this example, use the Analysis Program Editor to create the code.

  1. Read in the Sample.MDB project and open viewOswego. There should be 75 records listed in the Output window.

  2. In the Program Editor window, place the cursor under the Read command created and type DEFINE MyAge.

  • Do not press the Enter key on the keyboard. Leave your cursor on the line of code you just created.

  3. From the Program Editor navigation menu, click Run This Command. The code will turn green to indicate that it is being reviewed for syntax.

  4. Type the following: ASSIGN MyAge = FORMAT(Age, "00").

  5. From the Program Editor navigation menu, click Run This Command. The code will turn green to indicate that it is being reviewed for syntax.

  6. From the Analysis Command Tree, click Statistics > List. Then, click OK. The records appear.

  • Notice that the values in ‘MyAge’ are all two characters with a leading ‘0’ before each single digit year. The leading zero is present due to the ‘00’ format specification.

  7. From the Analysis Command Tree, click Variables > Display. Then, click OK. The variable types appear.

  • The variable MyAge now contains the values of Age but the format type of Text.

Program Editor Code

Using FORMAT to convert a number to text.


Use IF Statements with Permanent or Global Variables

  • If the condition of an IF statement depends on global or permanent variables, the value is computed immediately and only the true or false branch, as appropriate, is followed.

  • If the condition of an IF statement depends on a field variable, neither branch is followed, but computations within the branches are saved for execution as appropriate on each record. In the second case, non-computational commands such as READ, SELECT, SORT, HEADER, and ROUTEOUT are never executed.


Handle Date Fields

Date formats are often determined by default computer settings. To access Regional Settings in a Windows environment, click Start > Control Panel > Regional and Language Options.

  • Date fields in views are entered in European, American, or ISO format as specified in MakeView. They are stored in the database in a neutral format.

  • Date fields in ODBC databases, Epi 6, DBase, FoxPro, and Paradox are read into Analysis according to the format specified in those databases and stored in a neutral format.

  • Date fields in HTML, Excel, and Text files are read into Analysis according to the date format found in Regional Settings and stored in a neutral format. Excel files prepared with one date format often do not import properly on machines with a different date format.

  • Date fields in views are displayed in European, American, or ISO format as specified in MakeView by the following Analysis commands: LIST, LIST GRIDTABLE, TABLES, and FREQ.

  • Date fields in views are displayed according to the date format found in Regional Settings in the following Analysis commands: LIST UPDATE, DISPLAY, and GRAPH.

  • Date fields in tables without views are displayed according to the date format found in Regional Settings.

  • Date fields written to tables in ODBC databases, DBase, FoxPro, and Paradox are written in the format used by those databases.

  • Date fields written to Epi 6 files are written as American or European dates depending on whether the Regional Settings specification for the decimal point character is a period or a comma, respectively.

  • Date fields written to Excel or Text files are written according to the date format found in Regional Settings.

  • Date literals in MakeView Check Code or Analysis Programs, and date-type permanent variables in the INI file, are expected to be in American format unless enclosed in braces or pipe symbols. European date format (DD/MM/YYYY) literals must be enclosed in braces as in {23/11/2007}. ISO date literals (YYYY/MM/DD) must be enclosed in pipe symbols as in |2007/11/23|.

  • Dates formatted with the FORMAT function are formatted according to the date format found in Regional Settings when no format is specified as a second argument.

  • Dates converted from text with TXTTODATE are converted to a neutral format according to the date format found in Regional Settings. For multi-national applications, it may be safer to use the NUMTODATE function.

If you are not sure, do experiments and examine the results.


Use Analysis from the Command Line

Analysis can be run from a command line with specified script files.

Note: If the program name contains spaces it must be enclosed in double quotes.

Open Analysis with a specified database as the current project

analysis '<database path>'

Example: analysis ‘C:\Epi_Info\Sample.MDB’

Open Analysis and run a specified stored program against a specified database analysis

analysis ' <program database path>':'<program name>'

Example: analysis ‘C:\Epi_Info\Sample.MDB’:‘statistics’

Open Analysis running a specified program file against the current database analysis

analysis PGMNAME='<program file path>'

Example: analysis PGMNAME=‘LASTPGM.PGM’

Open Analysis with a specified view or table

analysis VIEWNAME='<view database path>': '<viewname>'

Example: analysis VIEWNAME=‘C:\Epi_Info\Sample.MDB’:‘viewOswego’

Open Analysis and run a specified stored program against a specified view or table analysis

analysis VIEWNAME='<view database path>': '<viewname>' PGMNAME='<program database path>': '<program name>'

Example: analysis VIEWNAME=‘C:\Epi_Info\Sample.MDB’:‘viewSurveillance’ PGMNAME=‘C:\Epi_Info\Sample.MDB’:‘statistics’

Open Analysis running a specified program file against a specified view or table analysis

analysis '<data database path>' PGMNAME='<program file path>' VIEWNAME='<view database path>': '<viewname>'

Example: analysis ‘C:\Epi_Info\Sample.MDB’ PGMNAME=‘Epi_Info\LASTPGM.PGM’VIEWNAME=‘C:\Epi_Info\Samplenew’:‘viewOswego’


Rebuild a Foreign Key with the Merge Command

In relational databases, data tables are linked together using keys stored in a column in the table. Every data table in Epi Info contains a key column named “UniqueKey”. If a table is related to another table, the related table will also have a foreign key column named “FKey”. The FKey values of the related or “child” table match the UniqueKey values of the “parent” table.

Unless a network is used, data are entered separately using different computers. For example, various desktops or laptops collect the data independently. Then later, all data are merged into a master database using the Epi Info MERGE command. When Epi Info merges data from child table to child table, it does not update the Fkey column as shown in the Figure 1 below.

Individual data tables prior to being merged

Figure 1

To populate the Fkey column, you must have another unique key field other than the field named UniqueKey. You can use a Globally Unique Identifier (GUID) to add a unique key field. For more information about adding a GUID field to a View and linking it to related Views, see the help topics titled How To Create a GUID and How To Copy the Value of a Field.

Individual data tables prior to being merged

Figure 2

The next step is to rebuild the foreign keys based on the new unique key field. The steps below describe how to do this.

  1. Open Analysis

  2. READ the Child Table in the Master database. This is the table having the FKeys that need to be updated. In this example, the table named Person is read.

  3. Click Data > Merge from the Analysis Command Tree. The MERGE dialog box opens.

  4. Select the View that is the Parent data table from the list of Views. In this example, the View named House is selected. The Build Key button activates

  5. Uncheck the Update and Append checkboxes.

  6. Click the Build Key button. The RELATE - BUILD KEY dialog box opens.

  7. Select the current table's GUID field that corresponds to the parent table's GUID field from the Available Variables drop-down list. In this example, the HouseID field is the field in the Person table (the child table) that corresponds to the HouseID field in the House table (the parent table).

  8. Click OK. The Current Table field shows the selection.

  9. Select the GUID field corresponding to the parent table from the Available Variables drop-down list.

  10. Click OK. The Related Tables field shows the selection.

  11. Click OK to accept the Build Key designations. The MERGE dialog box opens.

  12. To make a temporary link in the current project, click OK.

  13. The MERGE dialog box asks “Build an Epi Info Relationship?” Click Yes. The FKey in the child table is repopulated accoring to the GUID in the parent table.

Individual data tables prior to being merged

Figure 3


Analysis Command Tree

The Analysis Command Tree is used to create the commands and programs that run statistics on the current dataset. The Command Tree contains a list of available commands separated into folders by command type. Selecting a command opens the corresponding dialog box for that command, function, or statistic to run. Commands generated from the Analysis Command Tree appear in the Program Editor window. The Help button appears at the bottom of the Analysis Command Tree window and the Exit button at the top.

Analysis Command Tree

Epi Info™

Version 3.5.3

January 26, 2011

Epi Info for Windows Icon


Analysis Output Files

Each time a command is run in Analysis, any output created by the command is displayed in the Output window. Analysis Output is also saved as a set of HTML and XML files which are stored in the directory of the current project with a name composed of a prefix and a sequence number, for example Out300.htm and Out300.XML.

The output of a single statistical procedure is called a result. Results accumulate in a given output file until the data source is changed by using the READ, RELATE, SORT, SELECT or SET PROCESS commands, or until a CLOSEOUT command is executed if ROUTEOUT is in effect. Each result is logged to a results index file named IResults.htm located in the project directory. If several projects share the same directory, they share the same results index. Output files generated with HYPERLINKS set ON contain a link to the results index inside the Analysis Output window. The location of Output can be specified using the ROUTEOUT command.

Storing Output

The default prefix and sequence number of Output files can be changed from the Result Storage dialog box. Click Storing Output from the Output folder located in the Analysis Command Tree. The Result Storage dialog box opens. Storage is an interactive command only; no code is generated and its functions cannot be programmed.

The first part of an output file name must begin with a letter and can contain any valid character. The second part of the name contains the output file sequence which is a number. The default values for automatic output are OUT as the prefix and ‘1’ as the sequence number. If the out prefix is changed to Page and the file sequence changed to 100, the first output created for analysis will be called Page100.htm. It is best to keep filenames within the standard DOS 8+3 format, since some Local Area Networks and other programs still do not accept longer file names.

The View, Delete, and Browse operations can be used on a results index or an archive index. Although new folders can be created, they cannot be selected because they do not contain files. From the View Results dialog, Display or Flag Files can be selected. Display opens the results in a new HTML browser window. Flag Files opens the Flag Files dialog box.

Result Storage dialog box

Enter a new Output File Prefix and Output File Sequence in the text fields of the dialog box. Existing files of the same name are not overwritten; the sequence is incremented until an unused name is found. Neither output files nor index files are protected from deletion using the operating system.

Archiving Output

Results can be archived from the Result Storage dialog box by clicking Archive. Selected results are logged to an archive index file named IArchive.htm. The archive index may be located in any directory, and may include references to results taken from more than one results index. Archived results are marked as archived in the results index. A result may be archived in more than one archive index, but it is not recommended.

The archive database allows renaming and keeping important results permanently, since output names are recycled after the time or number of files designated in Result Storage. The archive database is stored in the same directory in which the INI file is located. Unlike the results index, the archive can contain information about files located in different folders.

Deleting Output

Results can be deleted from the Result Storage dialog box. Because an output file can contain more than one result, it is not actually deleted until all its results have been deleted from the index. Archived results cannot be deleted when viewing the results index, and therefore are protected from deletion within the Analysis storage system.

A confirmation dialog box appears prior to deletion. Deletion affects only the index file, unless all references to a particular output file are deleted. In that case, the confirmation dialog indicates which files will be deleted.

When viewing an archive index, archived results can be deleted from within the Analysis storage system, subject to the following limitations:

  • If a result is archived to more than one archive index, it can be deleted only from the first archive to which it was assigned, and deletion from the first archive will be effective even if the result has been archived elsewhere.

  • If a result is stored in an output file located in a different directory than its results index, it cannot be deleted from its results index.

Limiting Output

Limits on age, number of results, and total file size can be set from the Result Storage dialog box. Limits are used in the Flag Files operation. Limits are saved in the INI file.

To view limits, click View to open the View Results dialog box. Click Flag Files to open the Flag Files dialog box.

Flag Files dialog box

The Flag Files dialog box shows each file’s name, number of results it contains, deletion status (Yes if results in it are not archived elsewhere), file date, and file size in KB. The file date, number of results, and file size columns are highlighted if they exceed the limits set in the Result Storage dialog box. The number of results and file size limits are cumulative; the accumulation is done first for non-deletable files, then for deletable files; within these classes, more recent files are listed first. If a file exceeds all three limits, its name is highlighted initially. Clicking Flag On/Off inverts the highlighting on deletable files. Clicking Delete removes all highlighted files; the actual deletion is preceded by a confirmation dialog.


Analysis Output Window

The Analysis Output window is a browser to display information generated from commands run in the Analysis Program Editor or created using the Analysis Command Tree. Output can be viewed in a web page or in HTML format. The Analysis Output toolbar allows navigation through program scripts that have been run and displayed in the Analysis Output window. The Analysis Output window also provides hyperlink navigation through the displayed results and to the Results Library.

Analysis Output window

Output Toolbar Options

  • Previous opens the Analysis Output window to the results previously generated.

  • Next opens the Analysis Output window to the next set of results in the Analysis Output window.

  • Last opens the Analysis Output window to the last output in the session.

  • History opens the Session History window. All programs run in the current session are displayed and can be accessed using the hyperlinked names.

  • Open displays the Browse window and allows previous output results to be opened in the Analysis Output window.

  • Bookmark displays the Bookmark dialog box, which allows you to enter the identification for the bookmark.

  • Print sends the current output to the designated printer.

  • Maximize increases the viewing area of the output screen.

  • Restore (only visible when the screen is maximized) returns the output window to its original size.


Analysis Program Editor

The Analysis Program Editor displays generated commands created using the Analysis Command Tree. Commands can also be typed and run directly from the Program Editor. The Analysis Program Editor can be navigated using the navigation menu or the toolbar. The following function keys can be used in the Program Editor:

  • F1 opens the help files

  • F3 opens a Search window

  • F8 selects the current line of code

Analysis Program Editor

Toolbar Options

  • New clears the Analysis Program Editor and allows for the creation of a new PGM. The Analysis Program Editor displays a prompt prior to clearing any existing code from the editor.

  • Open displays the Read Program dialog box and allows a saved program (PGM) or LASTPGM.pgm to be opened.

  • Save opens the Save Program dialog box and allows the current program to be saved in the open dataset or in another project.

  • Print opens the Print dialog box and allows a paper copy of code to be printed from the selected printer.

  • Run causes the current PGM to run with program scripts displayed and syntax checked.

  • Run this Command causes the currently selected line in the program to run. The line of code can be highlighted or have the cursor placed inside the line to run. After Run this Command is used, the cursor automatically moves to the next line of code.

File Menu Options

  • New clears the Analysis Program Editor and allows for the creation of a new PGM. The Analysis Program Editor displays a prompt prior to clearing any existing code from the editor.

  • Open displays the Read Program dialog box and allows a saved program (PGM) or LASTPGM.pgm to be opened.

  • Save opens the Save Program dialog box and allows the current program to be saved in the open dataset or in another project.

  • Save As opens the Save Program dialog box and allows the current program to be saved in the open dataset or in another project.

  • Print opens the Print dialog box and allows a paper copy of code to be printed from the selected printer.

  • Print Setup opens the Print Setup dialog box and allows printer properties to be selected for the selected printer.

  • Exit opens the Exit from Analysis dialog box. If Yes is selected, the Analysis application is closed. If No is selected, code in the Analysis Program Editor is cleared and the application remains open. The current dataset also remains open.

Edit Menu Options

  • Copy reproduces the selected area for placement in the current project or another project file.

  • Cut removes the selected area and places it in the clipboard.

  • Paste inserts copied or cut areas into the current project or another project file.

  • Delete Line removes a line of code in the current project.

  • Find allows the user to search for a particular string in the Analysis Program Editor.

  • Find Next allows the user to find the next searched for text string in the Analysis Program Editor.

  • Replace substitutes the searched text string with the specified replacement text.

  • Program Beginning takes the user to the start of the program script.

  • Program End takes the user to the end of the program script.

  • Insert Command at Cursor is a selectable item. When checked from the menu, new commands are inserted at the line above the current cursor position. When unchecked, new commands append after the last line of code. The INSERT COMMAND status is a saved setting and remains in effect until unchecked from the menu.

View Menu Options

  • The Status Bar provides page, line, and column information for code in the Analysis Program Editor. It also displays the status of the Insert key on the keyboard.

Fonts Menu Options

  • Set Editor Font allows a default font to be applied to all text entered in the Analysis Program Editor. Changes made using Set Editor Font also apply to the MakeView Program Editor. Font settings are saved between sessions of Epi Info.

Run Menu Options

  • Run causes the current PGM to run with program scripts displayed and syntax checked.

  • Run this Command causes only the selected line in the program to run. The line of code can be highlighted or have the cursor placed inside the line to run. After the Run this Command option is used, the cursor automatically moves to the next line of code. If the command has more than one line of code make sure that the cursor is in the first line.

Help Menu Options

  • Contents lists the help topics available for the program and contains separate navigation to individual help topics.

  • About describes the Analysis module and gives information on the Epi Info version in use.


Epi Info and Data Management

Microsoft Access Databases

The Microsoft Access database file format is probably the most popular format for Windows databases. An Access database file has the extension .MDB, and is basically a DOS/Windows file residing somewhere on a storage disk. The internal features cannot be seen or edited in a word processor, although the VisData program provided with Epi Info displays the contents and many of the properties of the database and its component tables.

An MDB file contains one or more tables (up to 1000, in theory) that are arranged logically in columns (variables) and rows (records). Because the amount of data stored in text fields, for example, can vary, the physical arrangement of data within the file is more complicated than simple rows and columns.

Epi Info databases are built around two types of tables within an MDB. The screen appearance of the data, including fields for data entry and Check Code commands, is contained in a View table, with variables defined for Epi Info use to describe features such as the NAME, PROMPT, and various size and location parameters of each field. Epi Info data tables, however, are simply columns to represent variables in the questionnaire and rows to represent individual records. Data tables are essentially the same as those used in Microsoft Access, although Epi Info, for reasons of compatibility does not use stored procedures or relations in the database tables.

Microsoft Access File Format

Databases in Epi Info are Microsoft Access (.MDB) files, and therefore compatible with the most popular Windows database format. Epi Info uses the Microsoft Jet Engine (Version 3.51) to manage databases and to read and write a variety of other file formats such as dBASE, Paradox, ODBC, text files, and even HTML tables. Files from Epi Info 6.xx can be imported or exported, but are not read or written directly by the Jet Engine.

Epi Info databases consist of View tables in a format unique to Epi Info, and data tables in generic Access file format. Because Epi Info and Access use different methods for data entry, it is not recommended that both Microsoft Access and Epi Info be used to enter data in the same database.

Make View contains functions for producing Epi Info Views from Access data tables.

Microsoft Access Links

The Microsoft Jet Engine, the database engine behind the scenes in Epi Info, provides a mechanism called a Link, for accessing files in more than one MDB. Links function somewhat like the shortcut icons on the Windows Desktop. Just as clicking on a shortcut opens a file that is not on the desktop, referring to a Link table (LNK) has the effect of being able to read and write in a table in another MDB, or in the case, of files like dBASE or Paradox, in an entirely different kind of database.

Epi Info Views

An Epi Info database in its simplest form consists of a special table called a View and a Data table, both in the same MDB file. Think of the MDB as a project wrapper, in which the various tables of a project can be stored, making it easy to copy the View/Questionnaire, the Data, and even Analysis programs associated with the data to another disk location or another computer.

A View table has rows and columns defined in a way unique to Epi Info. It has a row (record) for each field on the screen giving the name of the variable, the prompt, the type of data, locations on the screen of the prompt and the field, and an indirect indication of the data source. Check Code, if any, is stored in the View record for each field. Everything necessary for displaying the questionnaire on the screen is contained in the View. Because variables are stored by page, only the variables on a single page are retrieved from the disk at one time, allowing performance to be maintained for very large questionnaires.

Fields in a View are matched to Variables (columns) in a data table by name. If the name of the variable matches, data items are retrieved from the Data table. If there is no corresponding variable in a data table, one is created, since having a field on the screen (other than a text label) with no place to store the data would create a problem. The reverse is not true; a data table can contain many variables for which no fields are provided in the View, thus allowing for different "Views" of the same data.

Epi Info Data Tables

After a View is created, the Enter program automatically creates a data table if none is yet specified in the View. After this occurs, the name of the data table or tables is stored in special source records in the View. MetaViews consisting of source records only can be defined so that Check Code and field definitions can be applied to more than one data table. For example, a state health department might maintain separate data tables with a single view for a number of counties.

Epi Info data tables are designed to be the simplest kind of Microsoft Access table, without stored procedures, integrity constraints, or defined relations to other tables. All the complexity is confined to the View so that the data tables can be readily used in Microsoft Access or other software systems if desired.

Non Epi Info Files

To analyze data in a file or dataset such as Paradox, FoxPro, dBASE, or other format, a current project must be defined. When Analysis has all the information required to read in the dataset, it will create a link to the table selected. The link may be temporary or permanent. If no link name is provided, the link is called lnk# where # represents a sequential number. Links that are named lnk# are deleted when the project is changed or Analysis is closed whatever occurs first. If a link is renamed to lnk#, Analysis assumes it is a temporary link and it deletes it at the end of the session. Once created, a permanent link can be opened just like a regular table. In Analysis, it is possible to edit data in a database stored in another format (such as dBASE) by using the LIST command and selecting Allow Updates. The Enter program, however, does not write to file formats other than Microsoft Access and Epi Info.


Delete File/Table Command (Analysis Generator)

Delete File/Table

Analysis Command

Command Reference

Delete Files

The file(s) specified explicitly or implicitly (via wildcards) are deleted. If no files are specified, or if some of the specified files cannot be deleted, a message is produced unless Run Silent is selected. Wildcards will not be permitted in the suffix.

Delete Files dialog box

  • File Name contains the name of the file to be deleted.

  • Run Silent causes the command to run without any warning or error messages being displayed from the Program Editor.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.

Delete Table

The specified table is deleted. If the table does not exist or cannot be deleted, a message is produced unless Run Silent is selected. To delete tables with spaces in their names, specify both the file and the table even if the table is in the current project. The table must be enclosed in single quotes. It is possible to read a table with a space in its name and then delete it, resulting in errors during subsequent procedures.

DELETE TABLES will not delete, and produce a message, if any of the tables specified are data, grid, or program tables. Code tables are deleted only if they are not referenced by any view.

Delete Tables dialog box

  • Database (Blank for Current) specifies the name and location of the dataset containing the table to be deleted.

  • Table Name contains the name of the table to be deleted.

  • Run Silent causes the command to run without any warning or error messages being displayed from the Program Editor.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.

Delete View

The specified view is deleted. If the view does not exist or cannot be deleted, a message is produced unless Run Silent is selected. Used with a View Name, DELETE will delete a view and its associated data and grid tables; however, data or grid tables will be deleted only if they are not referenced by any other view.

Delete View dialog box

  • Database (Blank for Current) specifies the name and location of the dataset containing the table to be deleted.

  • View Name contains the name of the table to be deleted.

  • Run Silent causes the command to run without any warning or error messages being displayed from the Program Editor.

  • Save Data Tables does not delete the data tables, but removes the REC property from the table. When deleting a View, this checkbox ensures that only the view, and not the associated data tables, are deleted.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Delete Records Command (Analysis Generator)

Delete Records

Analysis Command

Command Reference

Delete Records may not be used with related tables. For DELETE * and DELETE TABLES space will not be reclaimed until the Compact utility is run. All records in the current selection matching the expression are set to deleted status, or if PERMANENT is specified, physically deleted. A confirmation message is displayed unless RUNSILENT is selected.

  • Permanent Deletion causes records to be inaccessible after deletion.

  • Mark for Deletion marks the selected records as to be deleted and permits the use of Undelete.

  • The Records Affected (* for all) field specifies which records are to be deleted.

  • Run Silent causes the command to run without any warning or error messages being displayed from the Program Editor.

  • The Available Variables drop down allows for the selection of variables available in the current project.

  • Functions and operators appear within commands and are used for common tasks such as extracting a year from a date, combining two numeric values, or testing logical conditions.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Merge Command (Analysis Generator)

MERGE

Analysis Command

Command Reference

The MERGE command merges records in one dataset with those in another, using one or more defined identifiers to establish the match between records. Records in the second dataset can be appended to the end of a dataset, used to update records in the main dataset, or used to establish an Epi Info relationship between the datasets.

MERGE dialog box

  • Current Project is the database file (.MDB) which is the default source of data and the destination for output tables of statistical functions. Data sources other than the current project are accessed through link tables located in the current project. The directory in which the current project is located is the default location for output files, is the location of the output file indexes, and the directory used for files for which no directory is specified.

  • Use the Data Formats drop to select the data format of the data to be read. Analysis can read 24 different types of data formats.

  • Use the Data Source field to select the file (source) that matches the selected format and will be read by Analysis.

  • The Show section allows different types of tabular data within a data source to be listed. The choices available depend on the data format. Views shows only the Epi Info views in the data, while All shows views and tables available in the data source.

  • Update causes the values of existing records to be updated where the keys match.

  • Append causes the values of new records to be appended (added) to the existing data source where the keys do not match. If neither APPEND nor UPDATE is selected, a RELATE-type merge is created.

  • Key indicates an expression, the basis on which the data sources are matched.

  • Build Key opens the Build-Relate dialog box and allows for the creation of the key expression by which the data sources will be matched. This button is available once a data table is selected.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Read (Import) Command (Analysis Generator)

READ (Import)

Analysis Command

Command Reference

The READ command changes the current data source. It can also change the current project. READ removes any standard defined variables.

READ dialog box

  • Current Project is the database file (.MDB) which is the default source of data and the destination for output tables of statistical functions. Data sources other than the current project are accessed through link tables located in the current project. The directory in which the current project is located is the default location for output files, is the location of the output file indexes, and the directory used for files for which no directory is specified.

  • Use the Data Formats drop to select the data format of the data to be read. Analysis can read 24 different types of data formats.

  • Use the Data Source field to select the file (source) that matches the selected format and will be read by Analysis.

  • The Show section allows different types of tabular data within a data source to be listed. The choices available depend on the data format. Views shows only the Epi Info views in the data, while All shows views and tables available in the data source.

  • Change Project allows the current project to be changed.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Relate Command (Analysis Generator)

Relate

Analysis Command

Command Reference

The RELATE command joins to the current data source the data in the specified table for purposes of analysis, using a common identifier ("key") to find matching records. The key may span several fields, in which case values in each of the fields must match. The number of records in the data source after the join depends on how many records match. The variables in the data source after the join are those available before plus all of those in the specified table.

RELATE dialog box

  • Current Project is the database file (.MDB) which is the default source of data and the destination for output tables of statistical functions. Data sources other than the current project are accessed through link tables located in the current project. The directory in which the current project is located is the default location for output files, is the location of the output file indexes, and the directory used for files for which no directory is specified.

  • Use the Data Formats drop to select the data format of the data to be read. Analysis can read 24 different types of data formats.

  • Use the Data Source field to select the file (source) that matches the selected format and will be read by Analysis.

  • The Show section allows different types of tabular data within a data source to be listed. The choices available depend on the data format. Views shows only the Epi Info views in the data, while All shows views and tables available in the data source.

  • Use Unmatched (ALL) causes the generation to use all records from the existing data source, whether or not matched by records in the related data source.

  • Key indicates an expression, the basis on which the data sources are matched.

  • Build Key opens the Build-Relate dialog box and allows for the creation of the key expression by which the data sources will be matched. This button is available once a data table is selected.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Undelete Records Command (Analysis Generator)

Undelete Records

Analysis Command

Command Reference

The UNDELETE command causes all logically deleted records in the current selection matching the expression to be set to normal status. This applies only to Epi Info Views and may not be used when related tables are in use.

UNDELETE dialog box

  • The Records Affected (*for all) field contains the expression for which records to undelete.

  • The Available Variables field allows for the selection of variables that are available in the current project.

  • Functions and operators appear within commands and are used for common tasks such as extracting a year from a date, combining two numeric values, or testing logical conditions.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Functions opens the online help file which explains the usage of functions and operators..

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Write (Export) Command (Analysis Generator)

WRITE (Export)

Analysis Command

Command Reference

The WRITE command sends records to an output table or file in the specified format. Specifications include, which variables are written, variable order, and the type of file to be written. WRITE cannot be used to add data to a view, only to a data table without a view. Use MERGE to add data to a view. WRITE cannot be used to modify a view description.

WRITE dialog box

  • All (*) writes all fields and standard variables. It must be unchecked to permit the selection of All (*) Except.

  • All (*) Except writes all fields and standard variables, except those selected in the Variables list box.

  • Selecting Variables from the list box causes them to be written, or excluded from being written when used with the All (*) Except command.

  • Output Mode Determines whether the data being written is added to (APPEND) or replaces (REPLACE) the existing data. Append adds records to the existing file/table. Replace erases and replaces file/tables with the same name.

  • Output Formats allows the selection of a data format.

  • File Name opens the File dialog box and allows for the selection or creation of the output file.

  • Data Table allows for the selection or creation of a data table to receive output in the selected format. Neither views nor data tables of views will appear in the list as the WRITE command cannot be used to add data to a view. Use MERGE to add data to a view.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Beep Command (Analysis Generator)

BEEP

Analysis Command

Command Reference

The Beep command is used to generate a sound when a function is performed.

BEEP dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Dialog Command (Analysis Generator)

DIALOG

Analysis Command

Command Reference

How to Use the DIALOG Command

The DIALOG command provides interaction with the user from within a program. Dialogs can display information, ask for and receive input, and offer lists for making choices.

DIALOG Type Simple

  • Title holds the text of the heading title.

  • Prompt contains the text to be used in the dialog as a message.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the command in the Program Editor but does not run the command.

  • Cancel command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.

DIALOG Type Get Variable

This form of dialog displays a combo box of databases or view variables.

  • Title holds the text of the heading title.

  • Prompt contains the text to be used in the dialog as a message.

  • Input Variable allows for the selection of a variable from the current data table.

  • Variable Type allows for the selection of the dialog format to receive the value. Formats include Text, Number, Date, and Yes-No-Cancel. This field defaults to any previously assigned types.

If the Variable Type is Text, the Dialog Type drop down allows for the selection of Text Entry, Multiple Choice, Variable List, View List, Database List, File Open, and File Save. Database List options are not restricted to databases but can include any file type. The Multiple Choice selection opens another set of dialog boxes to set up the choice selection.

  • Pattern and/or Length create the pattern or size that input will be allowed to follow when entered into the variable. Pattern options are based on Variable Type and Dialog Type selections. Number Type patterns consist of pound signs (#) and can contain one decimal place with a boundary. Date pattern options are DD-MM-YYYY, MM-DD-YYYY or YYYY-MM-DD.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the command in the Program Editor but does not run the command.

  • Cancel command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.

DIALOG Type List of Values

This dialog type displays a combo box of distinct values of the specified variable in the specified database.

  • Title holds the text of the heading title.

  • Prompt contains the text to be used in the dialog as a message.

  • Input Variable allows for the selection of a variable from the current data table.

  • Variable Type allows for the selection of the dialog format to receive the value. Options are Text, Number, Date or Yes-No-Cancel.

  • Show Table contains a list of available views or tables in the current project.

  • Show Variable contains a list of available fields that act as selection criteria for the input variable in the current project.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the command in the Program Editor but does not run the command.

  • Cancel command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Help Command (Analysis Generator)

Help

Analysis Command

Command Reference

The Help command in Analysis displays a customized document in HTM format using a default browser.

HELP dialog box

  • Filename indicates the help file name. Enter the filename path of the .HTM file where the help file is located. This brings up the file into the specified browser.

  • Anchor indicates the topic within the help file. Anchors mark the topics or locations of information in a text file.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Quit Command (Analysis Generator)

QUIT

Analysis Command

Command Reference

The Quit command closes the current data files and terminates the current program, closing Analysis.

QUT dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Computing Kaplan-Meier Survival

The example provided in this documentation uses the Leukemia study (Freireich, 1963, a study about the remission time delay for patients with leukemia who are given different treatments. This example is based on a randomized clinical trial to evaluate if patients assigned to treatment with 6-mercaptopurine would fare better than untreated (Placebo) patients.

The project file provided is Sample.mdb:LEUKEM2

Key variables:

* SURVTIME- time delay (in weeks)

* CENSORED- censored variable (“0” for censored individual, “1” for uncensored individual)

* TREATMENT- group of patients (6-MP or Placebo)

KMSURVIVAL Outtable Results for Group 6-MP

READ 'C:\Epi_Info\Sample.mdb':LEUKEM2
KMSURVIVAL SURVTIME = TREATMENT * CENSORED ( 0 ) TIMEUNIT="Weeks" GRAPHTYPE="Survival Probability" OUTTABLE=kmtest5
READ 'C:\Epi_Info\Sample.mdb':kmtest5
LIST * GRIDTABLE

The patients in the 6-MP group have, on the average, 44.8 chances out of 100 of remaining alive after 23 weeks.

KMSURVIVAL Outtable Results for Group Placebo

READ 'C:\Epi_Info\Sample.mdb':LEUKEM2
KMSURVIVAL SURVTIME = TREATMENT * CENSORED ( 0 ) TIMEUNIT="Weeks" GRAPHTYPE="Survival Probability" OUTTABLE=kmtest5
READ 'C:\Epi_Info\Sample.mdb':kmtest5
LIST * GRIDTABLE

KMSURVIVAL Outtable Results

The patients in the Placebo group have, on the average, 0 chances out of 100 of remaining alive after 23 weeks.

Mean Survival Time and Descriptive Statistics

READ 'C:\Epi_Info\Sample.mdb':LEUKEM2
MEANS SURVTIME TREATMENT

MEANS Descriptive Statistics

The average survival time in weeks for the 6-MP group is 17.1. The average survival time in weeks for the Placebo group is 8.7.

Are KM curves for two or more groups statistically equivalent?

When it is stated that two KM curves are statistically equivalent, it means that based on a testing procedure that compares the two curves in some overall sense, there is no evidence to indicate that the true (population) survival curves are different. Epi Info uses the log-rank test, a large Chi-square test that uses as its test criterion an overall comparison of the KM curves being compared. This (log-rank) statistic, like many other statistics used in other kinds of Chi-square tests, makes use of observed versus expected cell counts over categories of outcomes.

Epi Info also uses the generalized Wilcoxon test, a non-parametric test. This might be used, for example, to test for a significant difference in treated and untreated patients. This test assumes that the death rate is constant over time.

A p-value for the log-rank test <0.05 suggests a difference in survival between the groups.

READ 'C:\Epi_Info\Sample.mdb':LEUKEM2
KMSURVIVAL SURVTIME = TREATMENT * CENSORED ( 0 ) TIMEUNIT="Weeks" GRAPHTYPE="Log-Log Survival"

The two p-values are < 0.05. This points to the conclusion that patients with the treatment 6-MP lived longer than those patients with the Placebo treatment.


Kaplan-Meier References

FreireichEJ, Gehan E, Frei E. The effect of 6-mercaptopurine on the duration of steroid-included remissions in acute leukemia: a model for evaluation of the other potentially useful therapy. Blood 1963; 21: 699-716.

Kleinbaum DG. Statistics in the health sciences: Survival analysis. New York: Springer-Verlag; 1996.


Kaplan-Meier Survival Analysis Overview

Command Reference

Command Generator

How to Use the KMSURVIVAL Command

Computing KMSURVIVAL

What is the objective of the Kaplan-Meier Method?

In clinical epidemiology, particularly in the study of usually fatal chronic diseases, the measurement of patient survival has become an important criterion in evaluating the effectiveness of therapeutic modalities.

The objective of the Kaplan-Meier (KM) methodology is to estimate the probability of survival of a defined group at a designated time interval (conditional probability). KM uses a non-parametric survival function for a group of patients (in other words their survival probability after the time t) and therefore does not make assumptions about the survival distribution.

What is KM good for?

Each time a survival study is done (e.g., a follow-up study, a clinical trial, or a study of the occurrence of an event over time), the KM methodology could be used to estimate the probability of survival over a given time period. Survival means that the event of interest has not occurred. The event can be death, a complication of a treatment, or other defined adverse event. KM therefore provides an estimate of being free of the event at time t. Conversely, “1 minus the probability of being free of the event at time t” is the probability of having the event at time t.

What is the variable to be studied?

The variable to be studied is the time delay until the occurrence of an event (death, disease, treatment outcome, etc.). This time delay corresponds to survival duration (the difference between the beginning study date and the event date).

What distinguishes survival analysis from most other statistical methods is the presence of “censoring” for incomplete observations. In a study of survival following two different treatment regimens, for example, analysis of the trial typically occurs well before all the patients have died. For those still alive at the time of analysis, the true survival time is known only to be greater than the time observed to date. Such an observation is said to be “censored.”

There are two other sorts of incomplete observation: the “lost to follow-up” (patient missing during the study duration) or the appearance of an event other than the event being studied. These observations are also considered censored. For survival analysis, the censored variable, the time variable, the units of time (day, month, year), and the group of patients (if studying the effect of a treatment) must be specified.

The time variable is numeric. The censored variable is coded: “1” if the patient experiences the event (uncensored data), “0” if the event is not known to occur (censored data). Survival data is often presented using a “+” for the censored observation, so that a set of times might be 8, 11+, 14, 2, 36+, etc.

Coding of Censored Variable for 6 Patients with Bladder Cancer.

 | 1982 | 1983 | 1984 | 1985 |  | Coding of Censored Variable | Time Variable (Year)
Individual |  |  |  |  |  |  |
1 | ------ | ------ | ------ | ------ | -------- | 0 (No Event) | 4
2 |  | ------ | ----- X |  |  | 1 (Event) | 2
3 |  | ------ | ------ |  |  | 0 (No Event) | 2
4 |  |  |  | ------ | -------- | 0 (No Event) | 1
5 | ------ | ------ | ----- X |  |  | 1 (Event) | 3
6 | ------ | ------ | ------ | -----X |  | 1 (Event) | 4
Beginning of the Study |  |  |  |  | End of the Study |  |

The censored variable has the value of “0” for individuals 1, 3, and 4, and “1” for individuals 2, 5, and 6.

What is the shape of the KM Survival function?

The KM Survival function is a decreasing series of straight line steps, constant between two consecutive death times, with a step for each time of observed death. This function is not defined after the last observation if this observation is censored.

Interpret the Result of the KM curve

If the survival rate for a group of patients 5 years after the beginning date of the study is 0.8, this means these patients have, on the average, 80 chances out of 100 of remaining alive after 5 years. In this example, the occurrence of an event is “death,” but it could also describe other events, for example, the occurrence of complications during medical treatment.


Logistic Regression and Variables

Using Explanatory Categorical Variables with More Than 2 Values

Explanatory categorical (coded) variables with more than 2 values must be recoded with dummy variables. If not, these variables are considered quantitative variables, which may make it difficult to interpret the results of the logistic regression model. A variable with "k" values must be coded in "k -1" dichotomous dummy variables that have two values, with "0" value indicating no or least exposure.

Code Example for Race

White 1

Black 2

Asian/Pacific Islander 3

Dichotomous Dummy Variables Code for Race

 | Design | Variables
Race | R1 | R2
White | 0 | 0
Black | 1 | 0
Asian/Pacific Islander | 0 | 1

Two dichotomous dummy variables are enough to locate the three initial values of the Race variable. In the logistic regression model, only the variables R1 (Black Race = 1) and R2 (Asian/Pacific Islander = 1) will appear, and the risk computed will be in reference to White Race (risk = 1). Epi Info creates dummy variables for categorical variables.

Using Explanatory Continuous Variables

If there are continuous variables in the dataset, for example age or duration of a treatment, it is possible to include them as continuous variables in the logistic regression model. The results are expressed as the risk for each unit of the continuous variable, for example each year of age or each day of a treatment, and the risk for the number of units desired is computed.

Continuous variables can also be recoded into categories to make interpretation easier, using the median as a cut point to recode them in two values, or quartiles as a cut point to recode them in four values, or other meaningful categories (e.g., age = adult/child or 10 year age groups, treatment = none, partial, or full). After recoding, test each version in a model containing only outcome and the variable being recoded. Choose the coded or continuous version that gives the most significant result in the likelihood ratio test (the smallest). The interpretation of the results for a continuous variable is more difficult than for a categorical variable, but in recoding a continuous variable in a categorical variable, some information is lost from the data. It is never a simple choice.

What is Interaction and Why Should It Be Addressed Early in the Model?

Interaction means that the odds ratio (OR) for a variable varies with the value of another variable. For example, if the outcome is mesothelioma, a form of lung cancer caused by asbestos exposure, the effect (OR) of asbestos exposure differs greatly between smokers and nonsmokers.

Mesothelioma = asbestos + smoking

does not tell the whole story, and another item, called an interaction term, is needed:

Mesothelioma = asbestos + smoking +asbestos*smoking

Interaction must be addressed early in forming a model, because the model must contain all single variables that are found in significant interaction terms to be hierarchically well structured. One school of thought in modeling strategy suggests that all pertinent interaction terms be evaluated before eliminating any individual variables.

After Choosing the Outcome Variable, How Do I Construct a Good Logistic Regression Model?

Here is one strategy. The references contain other modeling strategies to consider (Hosmer, Breslow). One modeling strategy to find risk factors for an outcome involves two stages:

  • Variable specification and interaction assessment

  • Confounding assessment followed by consideration of precision

Variable and interaction specification: Choose the variables to include in the multivariate Logistic Regression model

If the dataset contains only a few variables, start with all of them. Otherwise, include variables that may be risk factors or control variables, based on literature review, and then add all variables for which the p-value of the Chi-square, Fisher exact, or t-test is less than 0.25 (not the usual threshold of 0.05) in the Epi Info TABLES or MEANS commands. If there are several exposure and control variables, build a model with all of them and their pertinent interactions. Once there is an outcome variable and a list of confounder/risk variables, choose one variable as the primary effect variable for analysis.

In the L.A. Study example, the outcome variable is Ill. To examine the role of estrogens, choose it as the effect variable. Construct the model as follows:

Ill = estrogen + age + hypertension + age*hypertension + estrogen*age + hypertension*estrogen

If there are a lot of exposure variables, for example, in the Oswego study there are 20 variables, build a first model with all of the variables, choose those variables with the smallest p-value (around 7) and build another model with these variables and their pertinent interactions (biologically meaningful subsets).

Use a backward elimination approach to find the best model. This means eliminating variables or groups of variables one at a time, keeping only those that are meaningful in the model. Meaningful in this case stands for a p-value <0.05>ratio test <0.05>.

Frequently there is interaction among variables so that the OR for one depends on the value of another (e.g., the effect of age or smoking might vary in different races).

If there are two or more categorical explanatory variables in the best model, systematically test the interaction term in the logistic regression model. The interaction term in the logistic regression model corresponds to the mathematical product of the two variables (variable 1*variable 2). In this case, interaction variables are included in the model, as smoking*race and ageclass*race. If there are more than two categorical variables included in the model, test the interaction term for biologically meaningful subsets which may be all of them, depending on the literature. If there is an interaction term, it is important information for the study: the relationship between the exposure variable and the outcome variable is not the same for all levels of the explanatory variable because the risk factor varies.

All variables in interaction terms must be included elsewhere in the model as single terms, or Epi Info will not allow the interaction term. This results in what is known as a hierarchically well formulated model. Once an interaction has been found to be significant, all of its smaller subcomponents must be left in subsequent models.

The simplest interaction terms are pairs of categorical variables. In setting up the model, list the single variables first. The following example is from the Oswego study:

vanilla, chocolate, age

Then include the interaction term:

age + vanilla + chocolate + vanilla*chocolate + vanilla*age + chocolate*age (interaction term)

Third-order terms should also be included, as in vanilla*chocolate*age, if pertinent.

Use the likelihood ratio (chunk) test to assess the effect of removing the third-order interaction term at the same time. Run the full model, then remove the three-variable term and run it again. The results of the log likelihood ratio test for the chunk removed will appear at the bottom of the output. If the likelihood ratio p-value is < 0.05, at least part of the chunk is significant. Do the same for the second-order terms, removing both at one time. If the likelihood ratio test p-value is significant, then at least one of the two terms is significant, and they should be evaluated individually. Identify any two variables and single variable terms that are components of significant three-variable terms. These must stay in the model, regardless of subsequent results. They are protected members of the hierarchically well formulated model.

Confounding Assessment

At this point, the data is presenting what is called the "Gold Standard" model, because the estimated OR for the exposure variable is likely to be the most "correct". Confounding is assessed without the use of statistical testing. The procedure involves determining whether the estimated OR changes meaningfully in comparing the OR of the best model versus the model without one or more possible confounders. If there is no interaction, the assessment confounding is carried out by monitoring changes in the OR of the explanatory variable. However, if there is interaction, the assessment of confounding is more subjective, because it requires comparison of the OR of the exposure variable with the significant interaction terms. The goal is to find a model that gives OR estimates for the exposure variable and interaction terms similar to those given by the "Gold Standard" model. If confounders can be removed without changing these ORs, and the precision (width of the confidence interval) of the OR for the exposure improves, this should be done. Care should be taken not to remove any confounders used in interaction terms.

In the Oswego study, use:

Ill=bakedham+mashedpota+brownbread+milk+coffee+cakes+vanilla+relevant interaction

and the model becomes:

Ill=vanilla

If the confounder or interaction factor are not taken into consideration, the conclusion may be incorrect. To avoid this, use:

Good modeling strategy

  • Good choice of the variables included in the multivariate logistic regression model

  • Good choice of the coding of variables (very important!)

  • Appropriate assessment of interaction terms

  • Appropriate assessment of the confounder variables.

Quality of the results

  • Precision of confidence interval: CI 0,95

  • Is the value "1" inside CI 0,95 or not?

  • Is Wald test of the differences among variables significant?

  • Is the likelihood ratio of the Chi square test of the model significant?

  • Comparison of the results with other studies

  • Analysis of residuals of the model


Logistic Regression Overview

Command Reference

Command Generator

How to Use the LOGISTIC Command

Logistic Regression and Variables

When is Logistic Regression needed?

In Epi Info, either the TABLES command or the LOGISTIC command can be used when the outcome variable is dichotomous, for example ILL or NOT ILL. Analysis with the TABLES command is adequate if there is only one risk factor. Logistic regression is needed when the number of explanatory variables or risk factors is more than one. This method is often called multivariate logistic regression. Logistic regression shows the relationship between an outcome variable with two values and explanatory variables that can be categorical or continuous.

What Kinds of Epidemiologic Data Sets Are Suitable for Logistic Regression?

Logistic regression can be applied to case-control, follow-up, and cross-sectional data. All types of variables (categorical and continuous) can be included in a logistic regression model, although categorical (coded) variables make results easier to interpret. The outcome variable must be dichotomous. Categorical data must be coded in "0/1" with "0" being the class with the least exposure.

Types of Variable | Other Terms | Examples
Continuous variables | Quantitative variables | Weight, Blood pressure
Categorical variables | Qualitative variables, discrete variables, nominal variables, coded variables | Presence or absence of a disease or risk factor, Race

What is a Logistic Regression Model?

The purpose of logistic regression is to produce a mathematical equation that relates the probability of an outcome to the particular value of risk factor variables. A model might predict the probability of occurrence of a myocardial infarction (MI) over a 5-year period, given a patient’s age, sex, race, blood pressure, cholesterol level, and smoking status.

In Epi Info, a model can be expressed as:

MI = age + sex + race + blood pressure + cholesterol + smoking status

Epi Info uses a process called maximum likelihood estimation to arrive at the best estimate of the relationships based (usually) on a follow-up study, such as the well known Framingham study. The results include values for the beta coefficients, but more important for epidemiologists, can produce an odds ratio (OR) for each value of a risk factor compared with its baseline (absent or normal) state.

Choosing the Outcome Variable

The outcome variable is a dichotomous variable (two values) for which other variables may provide an explanation. Often, the outcome variable indicates the presence or absence of a disease. To explore the risk factors for premature birth, however, the outcome variable might be low birth weight.

The coding of this variable must be in 0/1.

  • 1 for persons who experienced the event studied (disease or low weight)

  • 0 for persons who did not (no disease or normal weight)

  • Epi Info does the coding if the outcome variable is a Yes/No variable.


Logistic Regression References

Breslow NE, Days, NE. Statistical methods in cancer research, Vol. 1: The analysis of case-control studies. Lyon, France: IARC Scientific Publication No. 32; 1981.

HosmerDW, Lemeshow S. Applied logistic regression (Wiley Series in Probability and Mathematical Statistics. Applied Probability and Statistics Section). New York: John Wiley; 1989.

Kleinbaum DG, KupperLL, Morgenstern H. Epidemiologic research: Principles and quantitative methods. New York: Van NostrandReinhold; 1982.

Kleinbaum DG, KupperLL, MullerKA. Applied regression analysis and other multivariate methods. Second edition. Boston: Duxbury Press; 1987.

Kleinbaum DG. Statistics in the health sciences: Logistic regression. New York: Springer-Verlag; 1994.

MackTM, Pike MC, Henderson BE, Pfeffer RI, GerkinsVR, Arthur M, Brown SE. Estrogens and endometrial cancer in a retirement community. NEnglJMed 1976 Jun 3;294(23):1262-7.


CloseOut Command (Analysis Generator)

Closeout

Analysis Command

Command Reference

The Closeout command closes the current output file.

CLOSEOUT dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Header Command (Analysis Generator)

Header

Analysis Command

Command Reference

The Header command in Analysis sets up specific headings as part of the output in Analysis.

HEADER dialog box

  • Title Option permits title lines to be set or changed. If Reset Title is selected, the selected title level will be reset to default titles. If Remove Last Line is selected, the last line of a title level will be removed.

  • Title Line indicates which level of titles or body text is affected by the command and settings.

  • Append Text adds a new line of text to an existing header. If not selected, the current title is replaced.

  • Title indicates the text in the header title.

  • Bold displays header fonts in bold style text.

  • Italic italicizes header fonts.

  • Underline underlines header fonts.

  • Font Size sets the size of the text font.

  • Font Color allows a color to be applied to the header text.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


PrintOut Command (Analysis Generator)

Printout

Analysis Command

Command Reference

The Printout command sends the current output file, or some other file specified by the user, to the default printer. This differs from the print button on the output window in that a command is generated that causes printing whenever it is run.

PRINTOUT dialog box

  • Filename, if blank, prints the current output file. If a file is selected, it will be printed.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Report Command (Analysis Generator)

Reports

Analysis Command

Command Reference

The Report Command dialog box allows report templates to be created or edited, and existing reports to be previewed. If it is desired to use the current Analysis output file as a data source for Epi Report, the command dialog box must be used rather than running Epi Report as a separate task.

REPORT dialog box

  • Report Template contains the path to the template to be designed, previewed, or printed. If Design is selected, Report Template may be left blank

  • Design opens Epi Report and allows the report to be formatted and designed.

  • Preview opens the Epi Report print preview window and allows the report to be previewed and printed.

  • The Output To section permits selection of Display, Printer, or File and determines where the report is generated. Display presents the report in the Epi Report print preview window. Printer sends the report to the print selection window and allows a printer to be selected or the default settings to be used. File saves the report to a file and allows the directory and file name to be specified. Files are saved with the extension .HTM.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


RouteOut Command (Analysis Generator)

RouteOut

Analysis Command

Command Reference

The Routeout command in Analysis directs the output to the named file until the process is terminated by Closeout. Output from commands such as FREQ, and LIST is appended to the same output file as it is produced.

ROUTEOUT dialog box

  • Output Filename can be typed into the field to create a new file name or use the browse button to locate a specific file to output results.

  • Select the Replace Any Existing File checkbox to overwrite files with the same name with new data each time to command is run.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Storing Output Command (Analysis Generator)

Storing Output

Analysis Command

The Storing Output command defines how output files are stored in the directory of the current project with a name composed of a prefix and a sequence number.

STORING OUTPUT dialog box

  • Output File Prefix contains the first part of the filename of the output files. This prefix is used with the Output File Sequence to store output files in the directory.

  • Output File Sequence contains the second part of the filename for output files. This number is automatically incremented for each file. This sequence number with the Output File Prefix is used to store output files in the directory.

  • Results Folder indicates the location of the Results index file in the project directory.

  • The Archive Folder indicates the location of the Archive file in the directory.

  • View opens the View Results open and lists the output files in the current directory. If View is selected, the operations available are Display and Flag Files.

  • Archive opens the Archive Results window and allows specific output files to be selected and archived to the current directory.

  • Delete opens the Delete Results window and allows specific files to be deleted from the directory.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • Age in Days marks output files older than the indicated number of days in the View window if Flags are active. If output file limits are placed on age it appears in the Flag Files operation.

  • Number of Results marks output files in excess of the number indicated in the View window if Flags are active.

  • File Size marks output files in excess of the size indicated in the View window if Flags are active. Enter output file size limits in this field.

  • Help opens the Help topic associated with the module being used.

  • Close exits the dialog box without saving or executing a command.

  • OK accepts the current settings and data, and then closes the form or window.


TypeOut Command (Analysis Generator)

TypeOut

Analysis Command

Command Reference

The Type command in Analysis inserts text, either a string or the contents of a file, into the output. Typical uses may include comments or boilerplates.

TYPE dialog box

  • The Text or Filename field contains the text or file name to be inserted in the output file.

  • Bold displays type fonts in bold style text.

  • Italic italicizes type fonts.

  • Underline underlines type fonts.

  • Font Size sets the size of the type text font.

  • Font Color allows a color to be applied to the type text.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Cancel Select Command (Analysis Generator)

CANCEL SELECT

Analysis Command

Command Reference

How to Use the CANCEL SELECT Command

The Cancel Select command in Analysis cancels a previous SELECT command.

CANCEL SELECT dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Cancel Sort Command (Analysis Generator)

CANCEL SORT

Analysis Command

Command Reference

How to Use the CANCEL SORT command

The Cancel Sort command in Analysis cancels a previous SORT command.

CANCEL SORT dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


If Command (Analysis Generator)

IF

Analysis Command

Command Reference

The IF command defines a condition which if true causes the THEN code block to be executed, and if false causes the ELSE code block (if present) to be executed.

IF dialog box

  • The If Condition field specifies the condition that will determine which statement that follows it is executed.

  • The Available Variables field allows for the selection of variables that are available in the current project.

  • The Then button is part of the If Condition statement. It is used to start the section of code executed when the If condition is true.

  • The Else button is part of the If Condition and works as follows: If the condition is true, then the first statement is executed. If the condition is false, then the statement is bypassed and if there is an else statement, it is executed instead.

  • Functions and operators appear within commands and are used for common tasks such as extracting a year from a date, combining two numeric values, or testing logical conditions.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Functions opens the online help file which explains the usage of functions and operators..

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Select Command (Analysis Generator)

SELECT

Analysis Command

Command Reference

How to Use the SELECT command

The Select command in Analysis allows you to specify an expression that must be true for a record to be processed.

SELECT dialog box

  • The Select Criteria field contains the expression to be tested.

  • The Available Variables field allows for the selection of variables that are available in the current project.

  • Functions and operators appear within commands and are used for common tasks such as extracting a year from a date, combining two numeric values, or testing logical conditions.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Functions opens the online help file which explains the usage of functions and operators.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Sort Command (Analysis Generator)

SORT

Analysis Command

Command Reference

The Sort command allows a sequence to be specified for records to appear when using the LIST, GRAPH, and WRITE commands.

SORT dialog box

  • The Available Variables field allows for the selection of variables that are available in the current project.

  • Sort Order allows selected variables to be sorted in an ascending or descending order. If not specified, variable sort order is ascending. The descending parameter must be placed next to the variable to be sorted in descending order. Should several variables be sorted on descending order, one descending should be included for each of them.

  • Select Remove from Sort to remove the variables selected from the list.

  • Sort Variables contains a list of variables selected for the sort.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Freq Command (Analysis Generator)

FREQ

Analysis Command

Command Reference

How to Use the FREQ Command

The Frequencies command (FREQ) produces a table from the table(s) specified in the last READ statement, showing how many records have each value of the specified variable(s).

FREQ dialog box

  • A Weight variable is selected for use in weighted analyses or when the current dataset consists of summary data already.

  • The Output to Table field identifies a table to be created from the command. It will contain the same data shown on the screen in FREQ. For example, you have a case file and do a frequency of PROVINCE with output to the Table Province Count. READ Province and SORT Count by COUNT to produce a list of the Provinces in order by number of cases.

  • Frequency Of identifies the variable(s) whose frequency is computed.

  • All (*) Except indicates that all the variables except those selected will have frequencies computed.

  • Stratify By identifies the variable to be used to stratify or group the frequency data.

  • Settings opens the SET dialog box and allows for new settings to be applied during the execution of the command.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Graph Command (Analysis Generator)

Graph

Analysis Command

Command Reference

How to Use the GRAPH Command

The GRAPH command offers many types of graphs for displaying the values of one or more fields in a data table. A toolbar within the graphing module can be activated to allow customization of the resulting graphs. Settings can be saved as templates and used again from Analysis.

GRAPH dialog box

  • Graph Type permits the selection of the graph type.

  • The 1st Title | 2nd Title field permits the specification of a title for the page. This title is in addition to any titles contained in the graph that appears on the page.

  • 3D displays the graph in a 3-dimensional form.

  • Template specifies the graph template file to be created or used when generating the graph. When a graph Template is named the graph settings are taken from this Template. If explicit settings are given in the dialog box, they override the settings in the named graph Template.

  • X-Axis Main Variables allows for the selection of variables to be plotted along the X axis of the graph. For scatter or similar graph types, the variables are plotted as X, Y, and Z.

  • Click the X-Axis label to open the X-Axis Label dialog box and create and x-axis label that will appear in the graph.

  • Show Value Of permits selection of an aggregate where there are multiple records to be displayed as a group.

  • Click the Y-Axis label to open the Y-Axis Label dialog box and create and y-axis label that will appear in the graph.

  • A Weight variable is selected for use in weighted analyses.

  • Bar for Each Value Of permits selection of a variable to generate multiple series from a single data source, each of which is displayed in a different color or style as appropriate.

  • One Graph for Each Value Of permits selection of a variable to generate multiple series from a single data source, each of which is displayed on a separate set of axes. If saving a template, the template stores the current graph's background including the main title and the subtitle if it exists; however, if the sub-title is stratified using One Graph for Each Value of, it is filtered out.

  • Hold Graph for Subsequent Overlay, returns the GRAPH dialog box without generating a graph. The data series is saved and the series of the next GRAPH command is added to them.

  • Show Preview Window pauses the GRAPH command to permit customization of the graph. The time the graph can be customized can be selected as either During Interaction or When Running PGM.

  • Multiple Graphs per Page settings permit the selection of the number of sets of axes on a page vertically and horizontally. There is a limit of 3 horizontal and 3 vertical.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


List Command (Analysis Generator)

List

Analysis Command

Command Reference

How to Use the LIST Command

The List command performs a line listing of the current dataset.

LIST dialog box

  • Variables can be specified as being part of the list or select * to view all the data table variables in a list.

  • All (*) Except generates a list of variables excluding those selected.

  • Display Mode specifies how output appears in the Output window. Available modes are Web (HTML) which embeds the list in the Output window, Grid which displays the list in a read-only spreadsheet view, Allow Updates which displays the list in an editable spreadsheet view. Allow Updates causes permanent changes in the database. The Allow Updates option is not functional with Microsoft Excel, FoxPro, or dbase file formats. However, it is functional with Epi 6 REC files.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be reentered.

  • Help opens the Help topic associated with the module being used.


Map Command (Analysis Generator)

Map

Analysis Command

Command Reference

How to Use the MAP Command

Numerous settings are available in the MAP module. Maps can be saved into a MAP template. When a MAP template is referred to by name, the settings are taken from the template. If explicit settings are given, they override the settings in the MAP Template.

MAP dialog box

  • If 1 Record per Geographic Entity is selected, no aggregation is necessary

  • The Aggregate Function permits selection of an aggregate where there are multiple records to be displayed for the same geographic area. Available map functions include Count, Sum, Average, Minimum, Maximum, and Cased Based.

  • The Geographic Variable is used to select the variable in the data source which indicates the geographic area in which the data is to be mapped.

  • The Data Variable indicates the data to be displayed on the map.

  • The Weight field permits the selection of a variable to be used as a weight for the data. The weight variable applies to all aggregation clauses.

  • The Template File field specifies a map template file to be created or used when generating the map.

  • The Output to Table field specifies the name of the table to be created when the data is mapped. An Output Table must specified when a template is specified.

  • The Title Text field places a title on a map.

  • The Shapefile field contains the shapefile to be used as the map shape. Shapefiles are those used by ArcView and Arc/Info.

  • The Geographic Variable indicates the geographic variable in the map that will be matched to the geographic variable in the dataset.

  • The Denominator variable is used when computing rates.

  • The Multiplier field appears in the dialog if a denominator is selected. Multiplier is a number. All rates are given using the denominator units; to create other rates, specify a multiplier (e.g., use a multiplier of 1000 to create a rate per 1000 population).

  • Browse searches the local directory for a file. Selecting this button displays a file dialog box.

  • Save Only allows the specified code to be saved to the Program Editor without being run.

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Match Command (Analysis Generator)

Match

Analysis Command

Command Reference

How to Use the MATCH Command

The Match command performs a matched analysis of the specified exposure and outcome variables, which must be Yes/No variables.

MATCH dialog box

  • Exposure Variable is the variable that indicates the presence of a risk factor.

  • A Weight variable is selected for use in weighted analyses. The weight variable applies to all aggregation clauses.

  • The Output to Table field identifies a table to receive output from the command.

  • Outcome Variable is the variable that indicates the presence of an outcome.

  • Matched Variable is the variable that indicates the group membership of each record.

  • Matched Analysis causes a matched analysis to be performed; if not selected, a stratified analysis is performed.

  • Settings opens the SET dialog box and allows for new settings to be applied during the execution of the command.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Means Command (Analysis Generator)

Means

Analysis Command

Command Reference

How to Use the MEANS Command

The Means command is used when the variable of interest is numeric and measured on a continuous scale.

MEANS dialog box

  • Means Of identifies the variable whose mean is to be computed.

  • A Weight variable is selected for use in weighted analyses. The weight variable applies to all aggregation clauses.

  • The Output to Table field identifies a table to receive output from the command.

  • The Cross-Tabulate by Value of variable is used to cross-classify data.

  • Stratify By identifies the variable to be used to stratify or group the means data.

  • Columns per Page indicates the number of columns of cross-classification variables to include on a single page of output. A number from 0 to 99 representing the number of columns to be displayed before splitting a table (default is 6). If zero, all specified columns will be displayed without splitting the table.

  • If No Line Wrap is selected, variable values are put on a single line regardless of length and columns are as wide as the longest line in the field.

  • Settings opens the SET dialog box and allows for new settings to be applied during the execution of the command.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Set Command (Analysis Generator)

Set

Analysis Command

Command Reference

Displays the current values of Analysis option settings and generates commands to change them.

SET dialog box

  • Yes As allows the display of the true value of yes-no variables to be shown as Yes, True, or (+). In Boolean variables, Yes is represented as text.

  • No As allows the display of the false value of yes-no variables to be shown as No, False, or (-). In Boolean variables No is represented as text.

  • Missing As allows the display of the missing value of all variables to be shown as Missing, Unknown, or (.).

  • Show Complete Prompt displays prompts rather than variable names in output.

  • Show Graphics displays frequency and 2x2 table output graphically. Yes is shown as On, or (+). No is shown as Off, or (-).

  • Show Hyperlinks includes hyperlinks in output files. Yes is shown as On, or (+). No is shown as Off, or (-).

  • Show Selection Criteria includes descriptions of data sources in output files.

  • Show Percents includes percentages in frequency and tables output. Yes is shown as On, or (+). No is shown as Off, or (-).

  • Show Tables in Output includes tabular data in frequency and tables output. Yes is shown as On, or (+). No is shown as Off,
    or (-).

  • Statistics sets the level of detail desired in statistical procedures.

  • Include Missing includes missing data in statistical procedures.

  • Process Records determines whether undeleted, deleted, or all records will be input into statistical procedures.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Save All generates a SET command and resets all settings to the current values.

  • Reset restores all settings to the values set when the dialog box was opened.

  • Cancel closes the dialog box without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Summarize Command (Analysis Generator)

Summarize

Analysis Command

Command Reference

How to Use the SUMMARIZE Command

The SUMMARIZE command is used to solve some recurring problems for systems designers. One such problem is computing percents; it is difficult to get a denominator. Another problem is determining the earliest or latest date in a list of relevant dates, or the highest or lowest of a series of measurements. Many of these problems can be solved with the OUTTABLE from a TABLES or FREQ command, or with self-joins, but SUMMARIZE provides a straightforward way of achieving the same results.

SUMMARIZE dialog box

  • Aggregate specifies the function by which records are combined.

  • Variable permits selection of a variable within the current data source to be aggregated.

  • Group By allows the selection of variables whose values will divide the data source into aggregation groups. As variables are selected, they appear in the list box. Variables can be removed from the list box by double-clicking. If no grouping variables are selected, the entire data source becomes a single aggregation group.

  • Into Variable specifies the new variable to be created containing the aggregate computations.

  • Apply combines the Aggregate, Variable and Into Variable fields into an aggregation clause. Aggregation clauses appear in the list box once defined. Clauses can be removed from the list double-clicking.

  • A Weight variable is selected for use in weighted analyses. The weight variable applies to all aggregation clauses.

  • The Output to Table field identifies a table to receive output from the command.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Tables Command (Analysis Generator)

TABLES

Analysis Command

Command Reference

How to Use the TABLES Command

The Tables command does a cross-tabulation of the specified variables and sends the table to the screen, printer, or other specified output.

TABLES dialog box

  • Exposure Variable is the variable that indicates the presence of a risk factor.

  • A Weight variable is selected for use in weighted analyses.

  • The Output to Table field identifies a table to receive output from the command.

  • Outcome Variable is the variable that indicates the presence of an outcome considered a disease of consequence (or * for all variables).

  • Stratify By identifies the variable to be used to stratify or group the data.

  • Matched Analysis causes a matched analysis to be performed; if not selected, a stratified analysis is performed.

  • Columns per Page indicates the number of columns of cross-classification variables to include on a single page of output. A number from 0 to 99 representing the number of columns to be displayed before splitting a table (default is 6). If zero, all specified columns will be displayed without splitting the table.

  • If No Line Wrap is selected, variable values are put on a single line regardless of length and columns are as wide as the longest line in the field.

  • Settings opens the SET dialog box and allows for new settings to be applied during the execution of the command.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Back Up Data Files

An essential feature of data management is maintaining backup copies of databases so that data can be restored in the event of hard disk failure, computer virus, fire, flood, or power surge. For large or complex datasets, multiple rotating backup copies and off-site storage are well worth the extra trouble.

A variety of media and compression techniques are available for backing up data. Epi Info .MDB files compress very well, sometimes to 5% of their original size, using WinZip or other compression methods.

Read-only CDROM (CD-R) copies of data are durable and well protected from overwriting. Whatever medium is chosen should be tested periodically by actually restoring and testing databases. Restoration drills are particularly important if data depends on backups made by others, for example a LAN administrator. Systems based on human memory and behavior may fall behind unless supplemented by automatic reminders or automated backup systems.


Refugee Project Diagram

Refugee Project Diagram

Epi Info™

Version 3.5.3

January 26, 2011

Epi Info for Windows Icon


Define User Command (Analysis Generator)

Define User Command (CMD)

Analysis Command

Command Reference

The Define User Command allows for the creation of a block of code that can be invoked by name, like a subroutine. This is useful for sequences of commands that will be called more than once.

DEFINE USER COMMAND dialog box

  • Command Name allows the command to be named.

  • Command List contains the type or generated commands to be executed.

  • Get Command opens the Command Tree and allows for the creation of a command block which is added to the Command List.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Execute File Command (Analysis Generator)

Execute File

Analysis Command

Command Reference

The Executes a Windows command in Analysis or DOS program-either one explicitly named in the command or one designated within the Windows registry as appropriate for a document with the file extension that is named. If the program being executed requires parameters, they should be supplied as well.

EXECUTE dialog box

  • Filename is the file name, program name, or command to execute. Enter a path and program name for .EXE and .COM files, along with any command line arguments desired.

  • Wait for Command to Execute indicates whether the program should run before the command is executed or after the command is executed.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.

Syntax

EXECUTE <filename>

EXECUTE <program-name>

EXECUTE "<fprogram-name><command-line parameters>"

EXECUTE NOWAITFOREXIT <filename>

EXECUTE NOWAITFOREXIT '<filename>'

EXECUTE NOWAITFOREXIT "<filename>"

EXECUTE WAITFOREXIT <filename>

EXECUTE WAITFOREXIT '<filename>'

EXECUTE WAITFOREXIT "<filename>"

  • The <program name> represents the path and program name for .exe (filename for registered Windows programs) and .com (any Internet address) files, along with any command line arguments desired. When a parameter is added the whole string should be enclosed within double quotes.

  • When EXECUTE is run modally, permanent variables are written before the command is executed and reloaded after the command is executed.

Comments

If the name given is not a program, but a file with an extension (the 3 characters after the ".") registered by Windows for displaying the document, the correct program to display the file will be activated. For example, WRITEUP.DOC might cause Microsoft Word to run and load the file on one computer. On another machine, however, .DOC might correspond to Corel WordPerfect. Usually .TXT will run NOTEPAD.EXE or WORDPAD.EXE, and image files will appear either in a browser or in a graphics program on the computer. An .HTM file will bring up the default browser on your computer.

Example

EXECUTE "c:\Epi_Info\Enter.exe sample.mdb:oswego"

EXECUTE 'C:\Epi_Info\OUT120.htm'

EXECUTE 'C:\Epi_Info\VISDATA.exe'

EXECUTE "c:\epi2000\Epimap.exe"

EXECUTE "c:\windows\notepad.exe c:\Test1.txt"


Run Saved Program Command (Analysis Generator)

Run Saved Program

Analysis Command

Command Reference

The Run Saved Program (RUNPGM) command in Analysis transfers control to the second program, returning to the first automatically, beginning with the line following the RUN statement. A program being run from another program is somewhat like an INCLUDE or subroutine in other systems.

RUN SAVED PROGRAM dialog box

  • Filename indicated the database or text file containing the program. If the path or filename contains a space, it must be enclosed in double quotes. If the program to be run is in the current project, the path need not be supplied.

  • Program indicated the name of the program if it is in the database.

  • Browse opens a Windows dialog box and allows the computer to be searched for the program or command to execute.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


User Command (Analysis Generator)

User Command

Analysis Command

Command Reference

After a User-Defined Command has been defined, a command consisting of its name can be used to run it.

USER COMMANDS dialog box

  • Command Name indicates the name of the user-defined command.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.

Syntax

CMD <command name>

[commands]

END

  • The <command name> executes the defined block of instructions.

  • The [commands] represents at least one valid Epi Info for Windows command.

Comments

Whenever <command name> appears elsewhere in the program, the block of commands is executed.

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego

CMD Hello

DIALOG "Welcome to Epi Info" TITLETEXT="Greetings"

END

Hello


Assign Command (Analysis Generator)

ASSIGN

Analysis Command

Command Reference

How to Use the ASSIGN Command

The Assign command stores the value of a variable or assigns the value of a numeric or text expression to a variable.

ASSIGN dialog box

  • The Assign Variable field is a variable in a database or a defined variable.

  • The = Expression field contains the value to be assigned and may be any valid mathematically logical expression, string or variable. Do not include the ‘=’ sign.

  • The Available Variables field allows for the selection of variables that are available in the current project.

  • Functions and operators appear within commands and are used for common tasks such as extracting a year from a date, combining two numeric values, or testing logical conditions. To see lists of those available common operators that are inserted by the buttons, click Functions.

  • OK accepts the settings and closes the dialog box.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields in a dialog box so that information can be can re-entered.

  • Help opens the Help topic associated with the module.


Define Command (Analysis Generator)

Analysis Command

Command Reference

How to Use the DEFINE Command

The DEFINE command allows for the creation of a new variable.

Analysis DEFINE dialog box

  • The Variable Name field represents the name of the variable to be created.

  • A Standard variable can stay only in a current project and will be considered as one variable in that view.

  • A Global variable persists for the duration of program execution. Global variables are used in Enter to pass values from one view to a related view.

  • A Permanent variable is stored in the Epi Info.INI file or system registry and retains any value assigned until the value is changed by another assignment or the variable is undefined. Permanent variables are shared among Epi Info programs and persist even if the computer is shut down.

  • Variable Type determines what type of values the variable can contain: Date, Numeric, Text, or Yes-No.

  • Prompt contains a description of the variable which can be displayed in place of the variable name by use of the SHOWPROMPTS setting.

  • OK accepts the current settings and data, and then closes the dialog box.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields on the dialog box so that information can be can reentered.

  • Help opens the Help topic associated with the module.


Define Group Command (Analysis Generator)

Analysis Command

Command Reference

The Define Group command allows variables to be included in a group with a new name that can be called for use in statistical procedures.

DEFINE GROUP dialog box

  • Group Variable is the variable name given to the created group.

  • Variables is a list of data tables variables that can be selected from and included in the group.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Display Command (Analysis Generator)

DISPLAY

Analysis Command

Command Reference

How to Use the DISPLAY Command

The Display command allows the display of table, view, and database information.

DISPLAY dialog box

  • The Information for section allows for the selection of Variables, Views, or Tables as the displayed data.

  • The From drop down specifies available tables or views to be displayed.

  • Output to Table identifies a table to receive output from the command (optional).

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Recode Command (Analysis Generator)

RECODE

Analysis Command

Command Reference

The Recode command allows grouping of data for age and other variables, or transformation of coding from one system to another.

  • To insert a line in the table, select the row and then press Ctrl-Insert on the keyboard.

  • To delete a line in the table, select the row and then press Ctrl-Delete on the keyboard.

  • Delete any blank rows prior to selecting OK or Save Only.

RECODE dialog box

  • The From drop down Identifies the variable whose values are to be recoded.

  • The To drop down identifies the variable which is to receive the recoded values.

  • Value (blank = other) identifies the bottom of a range of values, a single value, or all remaining values which are to be recoded. Enclose text in quotation marks. The word LOVALUE may be used to indicate the smallest value represented in the database. The word HIVALUE may be used to indicate the largest value represented in the database. To recode a single value instead of a range, use only this column. To recode all unspecified values, leave this column and the To column blank.

  • To Value (if any) identifies the top of a range of values which are to be recoded.

  • Recoded Value identifies the value to be assigned to the destination variable for the specified values of the source variable. Enclose text in quotation marks.

  • Fill Ranges permits the automatic definition of recode ranges of equal width.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Undefine Command (Analysis Generator)

UNDEFINE

Analysis Command

Command Reference

The Undefine command in Analysis removes a defined variable from the system.

UNDEFINE dialog box

  • Variable Name indicates the name of the variable to be removed from the data table.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Complex Sample Frequencies Command (Analysis Generator)

Complex Sample Frequencies

Analysis Command

Command Reference

The Complex Sample Frequencies (FREQ), Complex Sample Tables (TABLES), and Complex Sample Means (MEANS) commands perform statistical calculations that assume the data come from simple random (or unbiased systematic) samples. In many survey applications, more complicated sampling strategies are used. These may involve sampling features like stratification, cluster sampling, and the use of unequal sampling fractions. Surveys that include some form of complex sampling include the coverage surveys of the WHO Expanded Program on Immunization (EPI) (Lemeshow and Robinson, 1985) and CDC’s Behavioral Risk Factor Surveillance System (Marks et al., 1985).

Complex Sample Frequencies

  • A Weight variable is selected for use in weighted analyses. The weight variable applies to all aggregation clauses.

  • PSU is the variable used as the primary sampling unit which the record represents.

  • The Output to Table field identifies a table to receive output from the command.

  • Frequency Of identifies the variable(s) whose frequency is computed.

  • All (*) Except indicates that all the variables except those selected will have frequencies computed.

  • Stratify By identifies the variable to be used to stratify or group the frequency data.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Complex Sample Frequencies, Complex Sample Tables, and Complex Sample Means

The Complex Sample Frequencies (FREQ), Complex Sample Tables (TABLES), and Complex Sample Means (MEANS) commands in the Analysis program perform statistical calculations that assume the data come from simple random (or unbiased systematic) samples. In many survey applications, more complicated sampling strategies are used. These may involve sampling features like stratification, cluster sampling, and the use of unequal sampling fractions. Surveys that include some form of complex sampling include the coverage surveys of the WHO Expanded Program on Immunization (EPI) (Lemeshow and Robinson, 1985) and CDC’s Behavioral Risk Factor Surveillance System (Marks et al., 1985).

The CSAMPLE functions compute proportions or means with standard errors and confidence limits for studies in which the data did not come from a simple random sample. If tables with two dimensions are requested, the odds ratio, risk ratio, and risk difference are also calculated.

Data from complex sample designs should be analyzed with methods that account for the sampling design. In the past, easy-to-use programs were not available for analysis of such data. CSAMPLE provides these facilities, and, with an understanding of sampling design and analysis, can form the basis of a complete survey system.

Strata variables in complex samples are not the same as strata variables in standard tables, frequencies, and means. The STRATAVAR in a complex sample represents random steps which occur before the clustering step. For example, if a list was created of all the schools in the area and chosen schools with a probability proportional to their student population, then tested all or a random sample of the children in all or a random sample of English classes within the selected schools, then school would be a STRATAVAR and class would be a PSUVAR.


Complex Sample Means Command (Analysis Generator)

Complex Sample Means

Analysis Command

Command Reference

The Complex Sample Frequencies (FREQ), Complex Sample Tables (TABLES), and Complex Sample Means (MEANS) commands perform statistical calculations that assume the data come from simple random (or unbiased systematic) samples. In many survey applications, more complicated sampling strategies are used. These may involve sampling features like stratification, cluster sampling, and the use of unequal sampling fractions. Surveys that include some form of complex sampling include the coverage surveys of the WHO Expanded Program on Immunization (EPI) (Lemeshow and Robinson, 1985) and CDC’s Behavioral Risk Factor Surveillance System (Marks et al., 1985).

Complex Sample Means

  • Mean of identifies the variable whose mean is to be computed

  • A Weight variable is selected for use in weighted analyses. The weight variable applies to all aggregation clauses.

  • PSU is the variable used as the primary sampling unit which the record represents.

  • The Output to Table field identifies a table to receive output from the command.

  • Cross-Tabulate by Value of identifies the variable to be used to cross-tabulate the main variable.

  • Stratify By identifies the variable to be used to stratify or group the frequency data.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Complex Sample Tables Command (Analysis Generator)

Complex Sample Tables

Analysis Command

Command Reference

The Complex Sample Frequencies (FREQ), Complex Sample Tables (TABLES), and Complex Sample Means (MEANS) commands perform statistical calculations that assume the data come from simple random (or unbiased systematic) samples. In many survey applications, more complicated sampling strategies are used. These may involve sampling features like stratification, cluster sampling, and the use of unequal sampling fractions. Surveys that include some form of complex sampling include the coverage surveys of the WHO Expanded Program on Immunization (EPI) (Lemeshow and Robinson, 1985) and CDC’s Behavioral Risk Factor Surveillance System (Marks et al., 1985).

Complex Sample Tables

  • Exposure Variable identifies the variable that will appear on the horizontal axis of the table. Exposure Variable is considered to be the risk factor (or * for all variables).

  • A Weight variable is selected for use in weighted analyses. The weight variable applies to all aggregation clauses.

  • PSU is the variable used as the primary sampling unit which the record represents.

  • The Output to Table field identifies a table to receive output from the command.

  • Outcome Variable identifies the variable that will appear on the vertical axis of the table.

  • Stratify By identifies the variable to be used to stratify or group the frequency data.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Cox Proportional Hazards Command (Analysis Generator)

Cox Proportional Hazards

Analysis Command

Command Reference

H ow to Use the COXPH Command

The Cox Proportional Hazards and Extended Cox Proportional Hazards commands in Analysis perform survival analysis. This form of survival analysis relates covariates to failure through hazard ratios. A covariate with a hazard ratio less than one improves survival. At any given time, some of the subjects may be "censored", that is, not have information available on their status. COXPH is especially constructed to deal with this situation.

Cox Proportional Hazards

  • The Censored Variable indicates whether the case indicates a failure or a censored case.

  • The Time Variable indicates at which time the failure or censorship occurred.

  • Group Variable is a discrete variable used to divide cases into groups for comparison. In the Cox model, there is no essential difference between the group variable and other predictor terms, and for this reason its use is optional.

  • A Weight variable is selected for use in weighted analyses. The weight variable applies to all aggregation clauses.

  • Confidence Limits indicate the probability level at which confidence limits should be computed (default=.05).

  • The Output to Table field identifies a table to receive output from the command.

  • Value for Uncensored is the value of the censored variable that indicates a failure.

  • Time Unit is the unit in which the time variable is expressed.

  • Other Variables populates the predictor variables list.

  • Make Dummy is active if a predictor variable is selected. If selected, a numeric variable is treated as discrete rather than continuous; the variable is enclosed in parentheses to indicate that dummy variables are being created. If a predictor variable enclosed in parentheses is selected, the button changes to Make Continuous and selecting it results in the variable being treated as continuous.

  • Stratify by identifies the variable (if any) to be used to stratify the data

  • Make Extended Term is activated when a continuous predictor variable is selected. It is used to generate a time dependency function for use with the Extended Cox model.

  • Graph Options opens the graph selection window and permits selection of variables for graphing and graph types.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Kaplan-Meier Survival Command (Analysis Generator)

Kaplan-Meier Survival

Analysis Command

Command Reference

How to Use the KMSURVIVAL Command

Kaplan-Meier Survival Analysis Overview

Computing KMSURVIVAL

The Kaplan-Meier Survival command produces graphs and statistics for one or several groups of subjects being followed in a clinical study. At any given time, some of the subjects may be "censored" or information on their status is not available. KMSurvival is especially constructed to deal with this situation.

Kaplan-Meier Survival Analysis

  • The Censored Variable indicates whether the case indicates a failure or a censored case.

  • The Time Variable indicates at which time the failure or censorship occurred.

  • A Group Variable is a discrete variable used to divide cases into groups for comparison.

  • A Weight variable is selected for use in weighted analyses. The weight variable applies to all aggregation clauses.

  • The Value for Uncensored is the value of the censored variable that indicates a failure.

  • Time Unit is the unit in which the time variable is expressed.

  • Graph Type identifies the type of graph to be produced.

  • The Output to Table field identifies a table to receive output from the command.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Linear Regression Command (Analysis Generator)

Linear Regression

Analysis Command

Command Reference

H ow to Use the REGRESS Command

The Linear Regression command performs multivariate linear regression with support for automatic dummy variables and multiple interactions.

Linear Regression Analysis

  • The Outcome Variable is the dependent variable for the regression.

  • Other Variables appear in the predictor variables list.

  • Interaction Terms are defined with the Make Interaction button. Make Interaction appears if two or more variables are selected from the Other Variables list box. Click Make Interaction and the relationship populates the Interaction Terms list box.

  • Make Dummy is activated if one or more predictor variables are selected. If one predictor is selected, a numeric variable is treated as discrete rather than continuous; the variable is enclosed in parentheses to indicate that dummy variables are created. If a predictor variable enclosed in parentheses is selected in the list, the Make Dummy button changes to Make Continuous and selecting it results in the variable being treated as continuous. If more than one predictor variable is selected, the Make Dummy button changes to Make Interaction and selecting it results in all possible combinations of the selected variables being added to the regression as interaction terms.

  • A Weight variable is selected for use in weighted analyses.

  • Confidence Limits are the probability level at which confidence limits are computed (default=.05).

  • The Output to Table field identifies a table to receive output from the command.

  • If No Intercept is selected, the regression is performed without a constant term, forcing the regression line through the origin.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Logistic Regression Command (Analysis Generator)

Logistic Regression

Analysis Command

Command Reference

How to Use the LOGISTIC Command

Logistic Regression Overview

The Logistic Regression command performs conditional or unconditional multivariate logistic regression with automatic dummy variables and support for multiple interactions.

Logistic Regression Analysis

  • The Outcome Variable is the dependent variable for the regression.

  • Other Variables appear in the predictor variables list.

  • Interaction Terms are defined with the Make Interaction button. Make Interaction appears if two or more variables are selected from the Other Variables list box. Click Make Interaction and the relationship populates the Interaction Terms list box.

  • Make Dummy is activated if one or more predictor variables are selected. If one predictor is selected, a numeric variable is treated as discrete rather than continuous; the variable is enclosed in parentheses to indicate that dummy variables are created. If a predictor variable enclosed in parentheses is selected in the list, the Make Dummy button changes to Make Continuous and selecting it results in the variable being treated as continuous. If more than one predictor variable is selected, the Make Dummy button changes to Make Interaction and selecting it results in all possible combinations of the selected variables being added to the regression as interaction terms.

  • Match Variable identifies the variable indicating the group membership of each record.

  • A Weight variable is selected for use in weighted analyses.

  • Confidence Limits are the probability level at which confidence limits should be computed (default=.05).

  • The Output to Table field identifies a table to receive output from the command.

  • If No Intercept is selected, the regression is performed without a constant term, forcing the regression line through the origin.

  • OK accepts the current settings and data, and then closes the form or window.

  • Save Only saves the created code to the Program Editor but does not run the code.

  • Cancel closes the dialog box without saving or executing a command.

  • Clear empties the fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Introduction to Epi Graph

Epi Graph offers many types of charts for displaying the values of one or more fields in a data table through the Analysis program. The Customization dialog box within Epi Graph allows for the customization of various graph types. Settings can be saved as templates and used again from Analysis.

Graphical Objects

Graphs are characterized by the way the X axis is plotted. In most cases, categorical variables create a regular graph type while continuous variables create a scientific graph type. Graphs include line, bar, rotated bar, spline, points, area, pyramid, histogram, stacked histogram, pareto, box-whisker, and hi-low. Scientific Graph and Polar/Smith Charts include line, scatter X/Y, scatter 3D, moving average, and step. Pie Charts include pie and polar.

Common Functionality of All Objects

Epi Graph Menu

Mouse and Keyboard Controls

Customization

Exporting

Maximization

Statistics Refreshers

Average or Mean

Standard Deviation

Best Fit Line

Histograms

Chebyshev's Rule and The Empirical Rule

Epi Graph Translations

Epi Graph translations must be downloaded from http://www.gigasoft.com/resource_files.html and put into the directory of the corresponding language under the Epi_Info directory. For example, C:\epi_info\spanish\pegrc32b.dll.


Customization Overview

All graphs have their own individual customization dialogs. Customization dialogs allow for the adjustment of visual and functional attributes of the graphs as well as access to the Export and Maximization dialogs.

There are four ways to open the Customization dialog box for a graph.

  • Double click over the graph.

  • Press the spacebar on the keyboard.

  • Right click and select Customization Dialog from the pop-up menu. Many Customization options are available as single choice options from the pop-up menu. Additional right click pop-up menu options include Show Legend, Export dialog, and Maximize.

  • Select View > Customization from the navigation menu.

Available Customization options are based on the type of graph created from the available data. Customizations can be applied to an open graph by clicking OK or Apply. In rare cases, customizations can be applied to the open graph and viewed immediately. To return a graph to the original settings, close Epi Graph and rerun the graph in Analysis.

Depending on the graph type, the following tabs are available from the Customization dialog box:

  • General

  • Plot

  • Subsets

  • Points

  • Axis

  • Font

  • Color

  • Style

  • More

The following features are available in each tab: Export and Maximize.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


Save a Graph

When a graph has been customized with colors or fonts settings, and if a template was not used from the Analysis interface, the graph is automatically saved as LastCht.CHT in the installation directory when closing the graph. The ‘LastCHT.cht’ gets overwritten each time a new graph is created and the application is closed. Template names can also be specified or created from the GRAPH dialog box or the command line.

  1. Create a graph from Analysis. Epi Graph opens.

  2. Customize the graph as needed.

  3. Select File > Save Template from the menu. The Save Chart Template dialog box opens.

  4. Select an existing name or type a new name in the File Name field.

  • The default file name appears if one has been specified from the command line.

  • A confirmation prompt displays before overwriting an existing template name.

  5. Click Save.

  • Existing templates are not modified unless explicitly changed with the save template menu item.

  • A graph that has been customized (and not saved or placed in a template), is automatically saved to LASTCHT.cht.

  • If changes are made to a previously saved template, and the template is closed without accessing File > Save Template, the changes are placed in LASTCHT.cht and do not overwrite the original template.


Export a Graph

All graphs have the same exporting capabilities. To export a graph, take the following steps:

  1. From the Analysis Command Tree, use the READ command to open an MDB project file.

  2. From the Analysis Command Tree, click Statistics > Graph. The GRAPH dialog box opens.

  3. Create a graph.

  4. To open the Exporting dialog box, use one of the following methods:

  • Press the ‘X’ on the keyboard.

  • Right click and select Export Dialog from the pop-up menu.

  • Open the Customization dialog box and click Export from any tab.

Exporting dialog box

  5. From the Export section, select a type. Graphs can be exported to one of the following formats:

  • Metafile (.wmf)

  • Bitmap (.bmp)

  • JPEG (.jpg)

  • Portable Network Graphics (.png)

  • Text/Data Only

  6. From the Export Destination section, select a destination. You can select from the following three export destination options:

  • Clipboard– Available with all export types.

  • File– Available with all export types. If information is to be exported to a file, click Browse. The Save As dialog box opens. Enter a filename and click Save.

  • Printer– Available with the Metafile type only. When exporting to a printer, pressing the Print button opens the Print dialog box. Select a printer and select the settings for the printer.

  7. If needed, select the size of the image to export.

  8. Click Export or Print.

  • Graphs are saved to the selected file or to the clipboard. Images on the clipboard can be pasted into another application for presentational use.


Introduction to Epi Map

Epi Map, the mapping component of Epi Info, is built around MapObjects software from Environmental Systems Research Institute (ESRI), the makers of ArcView and ArcInfo, popular Geographic Information System (GIS) tools. Epi Map displays shapefiles from these two systems, and uses the enormous reservoir of map boundaries and geographic data available on the Internet in ESRI-compatible formats.

Epi Map is designed to show data from Epi Info files by relating data fields to shapefiles containing the geographic boundaries. Shapefiles can also contain data on population or other variables, and can therefore provide numeric data that becomes part of the display as either a numerator or a denominator. Numeric data can be displayed either as color/pattern (choropleth) map or as a dot density map with the dots randomly distributed within geographic regions.

Point locations can be plotted automatically from data files containing X and Y coordinates in various symbols, colors, and sizes. Shapefiles can contain lines or points to represent streets or point locations, and points can be placed on top of the shapefile layer to represent homes in which cases occurred or other geographic points of interest.

Epi Map can be run from the Epi Info Menu or the command line. Use one of the following methods:

  • To have Epi Map run from the Epi Info main menu, click the Create Maps button.

  • To have Epi Map run from the command line with a mapfile (.map) displayed, the complete path to the mapfile is required to be opened.

Choropleth and Case-Based maps can be created through Analysis; however, there are more map options available when working through the Epi Map program on its own. Most of the work in Epi Map is done from the Map Manager, which allows Layers to be constructed with shapefiles and related data variables.

Basic Mapping Rules

  • There must be a geographic field in the dataset that corresponds to a shapefile.

  • Data to be mapped must be aggregated to a unique geographic field.

  • Data being plotted must be in numeric format.

  • Postal code fields must be in text format.

  • X, Y axis fields must be numeric.


Navigate Epi Map

The Epi Map workspace contains a navigation menu, main toolbar, graphics toolbar, and workspace. From the Epi Info main menu, click Create Maps to open the Epi Map module. Most work in Epi Map is done using the Map Manager and the Layer Properties dialog boxes.

Epi Map workspace

The Map Manager is used to complete most mapping tasks including adding layers, points, and data to the workspace. The Map Manager is also used to access the Properties dialog box for individual layers. The Map Manager is accessed by clicking the Map Manager button from the tool bar or by selecting File > Map Manager from the navigation menu.

Layers and mapped data and points appear in the Epi Map workspace. From the Epi Map workspace, the X and Y coordinates for the map are visible as is the map scale. Map Tips are also accessible from the workspace. When Map Tips is checked, two drop-down lists appear: one containing a shapefile selector and the other a data variable selector. Select a file and a variable and use the mouse to move the cursor over a map. The value for the selected variable appears next to the cursor in the map workspace.


Map Manager

The Map Manager is used to complete most mapping tasks and controls the display of layers in the workspace. The Map Manager can be accessed by clicking the Map Manager button from the tool bar or by selecting File > Map Manager from the navigation menu. Close the Map Manager window when not in use to view full page maps or use the Epi Map navigation menu or tool bar.

The Map Manager is composed of two tabs, the Layers tab and the General tab. The Layers tab is used to add shapes and data to the map workspace. The Layers tab also allows access to the Properties dialog box for each of the map types created. The General tab is used to specify workspace options such as scroll bars and map border styles.

Layers Tab Options

  • Add Layer allows for the addition of shapefiles (SHP) to the map workspace.

  • Add Layer Partial allows for the creation of partial layer shapefiles to be placed in the map workspace.

  • Add Data creates a choropleth map based on data added to the map layer.

  • Add Points creates a point map based on data added to the map layer.

  • Remove Layer allows for the removal of a single layer from the map workspace.

  • Clear All Layers allows for the removal of all layers from the map workspace.

  • Properties opens the Properties dialog box for the selected layer's map type and provides customization options for the selected layer.

  • Composition allows for the inclusion of legends and map symbols.

  • Merge Layers allows map layers to be merged into a single layer.

  • Buffer Layer creates a specified buffer zone around the selected map layer.

  • Case-Based creates a case-based map using the data added to the map layer.

General Tab Options

  • Background Color allows for the selection of a map background color from a selection of 16 colors.

  • Map Border Style provides the option of No Map Border or a Fixed Single pixel width border around the map workspace and printed page.

  • Cancel Action when Escape key is Pressed allows the setting of an action that will occur when the Esc button is pressed from the keyboard, this includes, Ignore, Stop Drawing All Layers, or Stop Drawing Current Layer.

  • Scroll Bars on Map can be turned on and off using this checkbox.

  • 3D Appearance can be turned on and off using this checkbox.


Mapping Basics Diagram

Epi Info™

Version 3.5.3

January 26, 2011

Epi Info for Windows Icon


Navigate the Shape Editor

The Shape Editor is accessed by selecting Shape (Boundary) > Create/Edit from the Epi Map workspace. In this example, a shapefile has been added to the workspace. Two polygons have been selected and deleted. One polygon is selected for editing.

Shape Editor workspace

The Shape Editor workspace can be navigated using the Shape Editor Menu or the Shape Editor Tool bar.

The Shape Editor allows for the creation of custom polygons through the editing of shapefiles or by tracing shapes using a bitmap image as the background.

Epi Info™

Version 3.5


Layer Properties

  • Once one or more layers have been added to the map workspace, the Properties option is available in the Map Manager.

  • Clicking Properties opens the Layer Properties dialog box for the currently selected layer.

  • The Layer Properties dialog box contains six option tabs that allow for editing of the selected layer’s appearance.

  • All option tabs may not be active depending on the layer type, i.e. point, line, or polygon.

Available Layer Properties

Single Values

Unique Values

Choropleth

Standard Labels

Advanced Labels

Dot Density


Single Values

Single Values are accessible through the Layer Properties dialog box. Use Single Values to symbolize features in the selected layer using a single color or fill. The feature attributes that can be specified vary depending upon the type of layer.

Single Layer Properties

Single Values – Line Layer

  • Use the Line Color block to open the color palette and select a line color.

  • Use the Style drop-down to select one of the following line styles: Solid, Dash, Dot, Dash Dot or Dash Dot Dot.

  • Use the Line Width field to enter a line width for the selected line.

  • Click Apply to preview the results without closing the Layer Properties dialog box.

Single Values – Point Layer

  • Use the Marker Color block to open the color palette and select a color for map points.

  • Use the Point Style drop-down to select one of the following point styles: Circle, Square, Triangle, Cross, or True Type.

  • If True Type style is chosen, specify a font, character index and rotation. The font may be chosen from a drop-down list. Available fonts will vary from system to system depending on which fonts are installed. The character index may be chosen from a drop-down list after a font has been selected. Rotation is changed using the slider to move a value between 0 and 360 degrees.

  • Use the Point Size field to indicate the size of the markers in the map. Point size is in pixels.

  • Click Apply to preview the results without closing the Layer Properties dialog box.

Single Values – Polygon Layer

  • Use the Fill Color block to open the color palette and select a polygon color.

  • Use the Outline Color block to open the color palette and select a color for the polygon outline.

  • Use the Style drop-down to select one of the following fill types: Solid, Transparent, Horizontal, Vertical, Upward Diagonal, Downward Diagonal, Cross, Diagonal Cross Fill, Light Dithering, Medium Dithering, or Heavy Dithering.

  • Use the Outline Width field to set the polygon outline to a number of pixels.

  • Select Draw Outlines to show the outline of the polygon. When Draw Outlines is not selected, the map outline is removed and the polygon will be visible only if the fill color is different from the map background color.

  • Click Apply to preview the results without closing the Layer Properties dialog box.


Unique Values

Unique Values Properties are used to symbolize every feature on the selected layer, using a unique color. The colors are set by Epi Map after a field is selected from the drop down list. All features with the same value for the specified field are given the same symbol.

Unique Layer Properties

  • Use the Field drop-down list to specify the variable to be mapped with a unique value.

  • Use the Reset Legend button to update the legend preview before applying any changes.

  • Select Draw Outlines to show the outline of the polygon. When Draw Outlines is not selected, the unique features remain on the page, but the map outlines are removed. Draw Outlines is available only for polygon layers.

  • Select Overlay to enable more than one content type to display on a layer.

  • Click Apply to preview results without closing the Layer Properties dialog box.


Choropleth

The Choropleth panel of the Layer Properties form is used to categorize features into equal ranges or counts. The symbol attributes are set by the ESRI Map Objects Class Breaks.

Choropleth Layer Properties

  • Use the Numeric Field drop-down list to specify the field that will be divided into ranges or counts.

  • Use the Number of classes drop-down list to specify the number of classes the field will be divided.

  • Use the Color Ramp to specify a range of colors. Colors can be individually selected for each class by clicking the color block next to it. Fill types can also be selected for each class using the drop-down menu.

  • Select Draw Outlines for polygon outlines to remain visible.

  • Select Quantiles to divide the choropleth ranges into quantiles rather than classes,

  • Select Overlay to enable more than one content type to display on a layer.

  • Use the Reset Legend button to update the legend preview before applying any changes.

  • To turn off the Choropleth settings, apply a property from the Single Values tab.

  • Click Apply to preview results without closing the Layer Properties dialog box.

  • Use the Missing and Excluded columns to modify class or quantile ranges. Epi Map calculates class breaks based on equal intervals.


Standard Labels

Standard Label Properties are accessible through the Layer Properties dialog box. Standard Labels are used to label features with a text string using an ESRI MapObjects label.

Standard Labels Layer Properties

  • Use the Text Field drop down-list to select a label to place on the map.

  • Use the Horizontal Alignment drop-down list to select a label placement option: Left, Center, or Right.

  • Use the Vertical Alignment drop down-list to select a label placement option: Top, Center, or Bottom.

  • Use the Font button to modify the Font, Font Style, Size, Effects, Color, and Script of standard labels.

  • Select Draw Features to keep the shape polygon in the map workspace. When Draw Features is not selected the labels remain on the page, but the map shape is removed.

  • Select Allow Duplicates to place more than one label with the same value on the map.

  • Select Splined Text to add labels that follow line features such as rivers or roads.

  • Select Flip to place splined text right side up.

  • Select Overlay to enable more than one content type to display.

  • Use the Fill Color block to select a color for the map polygons.

  • Use the Rotation slider to set text between 0 and 359 degrees. The rotation number changes as the slider is moved. Zero degrees is horizontal and left to right, 90 degrees is top to bottom, 180 degrees is upside down and right to left, 270 degrees is bottom to top, and 315 degrees is bottom to top on a 45 degree angle.

  • Click Apply to preview results without closing the Layer Properties dialog box.


Dot Density

Dot Density Properties are accessible through the Layer Properties dialog box. Dot Density maps use randomly placed dots inside polygons to represent the value of a numeric field.

Dot Density Layer Properties

  • Use the Numeric Field drop-down list to specify a tabular data set associated with the polygons.

  • Use the Dot Value field to determine the count of dots to be placed inside each area or polygon. Dot Value is used to divide and calculate the Numeric Field’s value. For example, to make each dot represent 10 cases of an illness, set Dot Value to 10.

  • Use the Dot Size field to determine how big or small the dots will be. Dot size is measured in pixels.

  • Use the Dot Color block to select a color for the dots on the map.

  • Use the Fill Color block to select a color for the map polygons.

  • Select Draw Polygons to keep the shape polygon visible. When Draw Polygons is not selected, the dots remain on the page, but the polygon shape is removed.

  • Select Overlay to enable more than one content type to display on a layer.

  • Click Apply to preview the results without closing the Layer Properties dialog box.


Open a Saved Map File

  1. From the navigation bar, select File > Open Map File. The Read Map File window opens.

  2. Locate and select a map file. Map files have a .map extension.

  3. Click Open. The map appears in the workspace.


Add a Layer

  1. From the Epi Map main page, click the Map Manager icon or select File > Map Manager. The Map Manager dialog box opens.

  • Map Manager is used to control the display of layers on a customized map screen.

  • You can add layers, add data or points, remove or clear layers, access the properties of layers, and select the map composition components.

Map Manager dialog box

  2. Click Add Layer. The Add Layer window opens.

  3. Locate and select a shape or image file.

  • Shape files have a .shp extension.

  • Image files have .jpg, .gif, .bmp, and .tif extensions.

  4. Click Open. The selected shape or image appears in the Epi Map workspace; and the name appears in the Map Manager Layers tab.

  • Change the layer order by highlighting a layer and clicking the up and down arrows in the Map Manager.

  • Layers can be temporarily removed from a map by clicking the checkbox next to the layer name.

  • Multiple layers of the same shape can be added to a map if the layers are given different names.

Map Manager Layers tab example


Add a Layer Partial

Add a Partial Layer

  1. From the Epi Map main page, click the Map Manager icon or select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer Partial. The Partial Layer window opens.

  3. Locate and select a shape file.

  4. Click Open. The Select Polygons for New Shapefile dialog box opens.

Select Polygons for new Shapefile dialog box

  5. Select the polygons to include in the new layer.

  • Use the CTRL key to select individual polygons or the Shift key to select contiguous polygons.

  • Use the Ascending or Descending buttons to change the order of the available polygons in the dialog box.

  6. Click OK. The Partial Layer window opens.

  7. Type a name for the new shape in the File Name field.

  8. Click Save. The new shape appears in the Epi Map workspace and in the Map Manager list.

Try It

When Epi Info is installed, sample map files are placed in the Epi_Info folder. In the following example, the sample map files are used to add map layers and create part of the John Snow map of London cholera cases in 1854. This example also explains how to add a partial layer and use Map Properties to highlight the layer.

Add the 2 Soho shapefiles to the workspace to create the map background showing the streets of London and the outbreak area.

  1. From the Epi Map main page, select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate the Epi_Info folder and select the SohoBuri.shp file.

  4. Click Open. The shape appears in the Epi Map workspace.

  • Multiple layers of the same shape can be added to a map if they are given different names, for example, SohoBuri1.shp, SohoBuri2.shp, SohoBuri3.shp, etc.

  5. Click Add Layer. The Add Layer window opens.

  6. Select the SohoSt.shp file.

  7. Click Open. The shape appears in the Epi Map workspace.

  8. Close the Map Manager to see the map.

  • Click the Full Extent icon Epi Map Full Extent icon to see the entire map and place it in the center of the workspace.

Add a new partial layer to the workspace to indicate a specific street location.

  1. Open the Map Manager.

  2. Click Add Layer Partial. The Partial Layer window opens.

  3. Select the SohoSt.shp file.

  4. Click Open. The Select Polygons for New Shapefile dialog box opens.

  5. Scroll through the list of available streets.

  6. Use the SHIFT key to select all the Broad Street polygons from the list.

  7. Click OK. The Partial Layer window opens.

  8. In the File Name field, type the name BroadSt.

  • By selecting specific polygons from the list, a new shape file is created that contains only those selected polygons.

  9. Click Save. The Map Manager opens with the new shape listed on the Layers tab.

Change the Single Properties of the new layer partial to distinguish it from the rest of the map.

  1. From the Map Manager, select the shape called BroadSt.

  2. Click Properties. The Layer Properties: BroadSt dialog box opens.

  3. Click the Line Color box. The Color palette opens.

  4. Select a color for the BroadSt polygon.

  5. Click OK.

  6. Type the number5 in the Line Width field.

  7. Click OK. The BroadSt partial layer appears with the changes on the map.

Epi Map example: Adding a Layer Partial


Add a Map Title

When maps are created, a title space is allocated across the top of the page. The Map Manager must be closed to add a title. To add a title, take the following steps:

  1. Place the cursor in top center of the page.

  2. Type the title text.

  • Only single line titles are allowed.

  • The default text style is MS Sans Serif, bold, color blue, size 18.

  3. To customize the title, double click in the title field, right click in the title field, or select View > Title Properties. The Map Title Properties dialog box opens.

  • Use the Text section to set the text properties of Font, Size, Style, Color, and Alignment.

  • The Reduce Font Size to Fit checkbox allows the title to be resized to fit the display or printed page.

  • Use the Background section to set the properties of the title area. Select the Fixed Border checkbox to add a black outline around the title area. Click the Fill Color field to select a background color for the title area.

  • Use the Position section to set the title to appear above the map or below the map.

  • Click Reset to return the Title Properties to the default settings.


Remove a Map Layer

  1. From the Map Manager Layers tab, select a layer to remove.

  2. Click Remove Layer. The selected layer is removed from the Map Manager Layers tab and from the map workspace.


Clear All Map Layers

From the Map Manager Layers tab, click Clear All Layers. All map layers are removed from the Map Manager Layers tab and from the map workspace.


Add Data

Once a point or polygon layer has been added, the Add Data option becomes enabled in the Map Manager. Add Data is not available for Line type shapes or other image layers.

  1. From the Epi Map main menu, click the Map Manager icon or select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate and select a point or polygon type shapefile.

  4. Click Open. The selected shapefile appears in the Epi Map workspace.

  5. Click Add Data. The Open Data Project window opens.

  6. Locate and select an MDB that contains the data to be mapped.

  7. Click Open. The Select Data Table From dialog box opens.

  8. Select a data table.

  9. Click OK. The Select Relate Fields and Render Field dialog box opens.

  10. Select the Geographic Fields to match.

  11. Select the Render Field to match.

  12. Click OK. The data are applied to the map in the form of a choropleth map.

Try It

For this example, use shapefiles and data available in the Epi_Info folder. Add a shape layer for Mexico and use the Add Data function to map information on teen births from the year 1995.

Add the Mexico shapefile to the workspace.

  1. From the Epi Map main menu, select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate the Epi_Info folder and select the MXState.shp file. This is a polygon type shapefile.

  4. Click Open. The shape appears in the Epi Map workspace.

Add the teen birth data to the map

  1. Click Add Data. The Open Data Project window opens.

  2. From the Epi_Info folder, locate and select the Sample.mdb file.

  3. Click Open. The Select Data Table From dialog box opens.

  4. Locate and select the MexMap95 data table .

  5. Click OK. The Select Relate Fields and Render Field dialog box opens.

  6. From the Shape Fields Geographic Field section, select Name.

  7. From the MexMap95 Columns Geographic Field, select State.

  8. From the MexMap95 Columns Render Field, select PerTeenBirths95.

  9. Click OK. The Mexico map appears in the workspace in the form of a choropleth map.

  10. Close the Map Manager to view the map.

Mexico Map example


Add Points

When one or more layers have been added to the map, the Add Points option is enabled in the Map Manager. Points can be added to a map and embedded or they can be saved as a new layer. When saved as a new layer, points can be edited.

Add Points to a Map

  1. From the Epi Map main menu, click the Map Manager icon or select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate and select a shape or image file.

  4. Click Open. The selected shape or image appears in the Epi Map workspace.

  5. Click Add Points. The Open Data Project window opens.

  6. Locate and select an MDB that contains the data to be mapped.

  7. Click Open. The Select Data Table From dialog box opens.

  8. Select a data table.

  9. Click OK. The Select X/Y Fields and Point Properties dialog box opens.

  10. Select an X Coordinate from the available Longitudes in the data table.

  11. Select a Y Coordinate from the available Latitudes in the data table.

  • Select a Point Label if needed. This feature works best if the points are spaced far apart on the map.

  12. Click OK to place the points on the map in the default format and to embed them as part of the first layer.

Add Points to a Map as a New Layer

  1. From the Epi Map main menu, click the Map Manager icon or select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate and select a shape or image file.

  4. Click Open. The selected shape or image appears in the Epi Map workspace.

  5. Click Add Points. The Open Data Project window opens.

  6. Locate and select an MDB that contains the data to be mapped.

  7. Click Open. The Select Data Table From dialog box opens.

  8. Select a data table.

  9. Click OK. The Select X/Y Fields and Point Properties From dialog box opens.

  10. Select an X Coordinate from the available Longitudes in the data table.

  11. Select a Y Coordinate from the available Latitudes in the data table.

  12. Click the checkbox Save Points as New Layer. Points must be saved as a new layer in order to be edited in the Properties tab.

  • The Vary Symbol Size for Coincident Points checkbox appears. This option counts cases occurring at the same location and sets the symbol size larger dependent upon the number of cases present. If this option is selected Point Size is not used. If the values of the counts exceed “reasonable” limits, Epi Map automatically scales the point sizes.

  13. From the Point Type drop-down list, select one of the following: Circle, Square, Triangle, or Cross.

  14. To select a new color for the point, click the Point Color block .

  15. From the Point Size drop-down list, select from a Point Size of 1 up to 25.

  16. Click OK.

  17. In the File Name field, type a name for the new layer.

  18. Click Save. The map populates with the coordinate points from the data table.

  • To edit the points layer, select the points shape from the Map Manager and click Properties.

Try It

When Epi Info is installed, sample map files are placed in the Epi_Info folder. In the following example, the sample map files are used to add map layers and create part of the John Snow map of London cholera cases in 1854. In this example, add points to mark the locations of the dead.

Add the Soho street shapefile to the workspace to create the map background showing the streets of London and the outbreak area.

  1. From the Epi Map main menu, select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate the Epi_Info folder and select the file SohoSt.shp.

  4. Click Open. The shape appears in the Epi Map workspace.

Add points to the workspace to indicate the locations of the cholera dead.

  1. Click Add Points. The Open Data Project window opens.

  2. From the Epi_Info folder, select the project file Sample.mdb.

  3. Click Open. The Select Data Table From dialog box opens.

  4. Select the SohoDead table.

  5. Click OK. The Select X/Y Fields and Point Properties dialog box opens.

  6. From the X Field, select X Coord.

  7. From the Y Field, select Y Coord.

  8. From the Point Type drop-down list, select Square.

  9. Click the Point Color block. The Color palette opens.

  10. Select a color for the points.

  11. From the Point Size drop down, select 5.

  12. Click the Save Points as New Layer checkbox.

  • Optional. Click the Vary Symbol Size for Coincident Points checkbox.

  13. Click OK. The Save Points as Shapefile window opens.

  14. In the File Name field, type SHDead.

  15. Click Save. The points appear in the map workspace.

  16. To edit the points layer, select the SHDead layer and click Properties. The Single Values Layer Properties dialog box opens with the Single Values tab selected.

  • If the Vary Symbol Size for Coincident Points option was selected, the points will be edited from the Unique Values tab in the Layer Properties dialog box.

Soho Dead Point map example


Use Find Features

Find Features are available from the View menu and the Epi Map toolbar. Find Features searches all fields of all layers in the table of contents for the specified string exactly as it is entered.

  1. Click the Find icon. The Find Features dialog box opens.

Find Features dialog box

  2. Enter a search string.

    • Search strings are case sensitive.

    • Epi Map searches for the string using upper case, lower case and proper case. For example, with a string entered as AbCdE, the search would produce results for AbCdE, ABCDE, abcde, and Abcde. The string abcDe would not be given as a search result.

  3. Choose which layers to search by selecting or deselecting from the list. By default, all map layers are included in the search.

  4. Click Find. The results of the search appear in the Pick a Feature section displayed by Layer, Field, and Value.

  5. Pick a feature from the search results.

  6. Select the operation to perform.

  • Highlight causes the feature to flash three times and allows for a visual fix on the feature.

  • Insert Pin places a temporary marker on the feature.

  • Pan To pans to the selected feature without changing the zoom factor. If zoom is used first on a small feature, and then pan is used on a larger one, the outer boundary of the larger feature may not be visible as the visible extent is centered to the larger shape.

  • Zoom To sets the visible extent to just larger than the extent of the feature that is selected so that the feature expands to take up most of the map display.


Create a Case-Based Map

A Case-Based map can be used to show different symbols based on levels of classification (e.g., Confirmed, Probable, Discarded, Suspected). Once a point or polygon layer has been added, the Case-Based option becomes enabled in the Map Manager. Case-Based is not available for Line or Point shapefile layers.

  1. From the Epi Map main menu, click the Map Manager icon or select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate and select a polygon shapefile.

  4. Click Open. The selected shape or image appears in the Epi Map workspace.

  5. Click Case-Based. The Open Data Project window opens.

  6. Locate and select an MDB that contains the data to be mapped.

  7. Click Open. The Select Data Table From dialog box opens.

  8. Select a data table.

  9. Click OK. The Select Case-Based Relate Fields and Classification Field dialog box opens.

  10. Select a field from the Shape Fields Geographic Field section.

  • This field contains data from the source polygon map and links with the geographic field contained in the data table. This is expected to be a one-to-many relationship.

  • There can be zero (0) or more records in the data table for each polygon in the map layer. Each record in the data table represents the attributes for a single case. The two Geographic fields selected must contain identical values for each feature in the layer.

  11. Select a field from the Columns Geographic Field section.

  • This column’s information is from the data table. The values contained in this column must match the values in the shapefile geographic field.

  12. Select a field from the Columns Classification Field section.

  • This column’s information is from the data table. Classification Fields must be numeric. The Classification Field selected must contain unique values for each case classification to be graphed.

  13. Click OK. The Select Case Symbols dialog box opens.

  • Type in the Legend Entry field to overwrite the default values, if necessary.

  • Click a color block to open the color palette and change colors.

  • Use the Symbol drop-down list to change the default symbols. You can select True Type symbols to further customize how symbols on the map appear. If True Type is selected, you must also select a Font and Character. Fonts available are those installed on the computer where Epi Map is running. Available fonts vary from system to system.

  • Type in the Size field to overwrite the default symbol sizes.

  14. Click OK. The symbols appear on the map layer and the map legend appears in the left hand corner of the workspace.

  • For each case associated with a given polygon, the program generates a randomly dispersed point inside the polygon and places the user specified symbol on that point for the specific case classification value.

  • Case-Based maps can be saved and restored as MAP files. With each restoration of a MAP file, the locations of the points vary due to the random position of the symbols.

  • The Case-Based legend documents the symbols, their color, and the case classification values.

  • After a Case-Based map is created, the Records for Features option is available.

Try It

When Epi Info is installed, sample map files and database .mdb projects are placed in the Epi_Info folder. In this example, the sample map files are used to demonstrate how to create a Case-Based Map from data contained in the Sample.mdb project. The records contained in the BFMeasles table of Sample.mdb represent cases of measles in Burkina Faso. The records have been categorized by their case classification of 'Confirmed', 'Probable', 'Discarded', and 'Suspected' using the numeric codes 1, 3, 4, and 5 respectively. The steps below will place a random distribution of points on the Burkina Faso polygon layer each representing the case classification using a unique symbol.

  1. From the Epi Map main menu, click the Map Manager icon or select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate the Epi_Info folder and select the BurkinaFaso.shp file.

  4. Click Open. The map appears in the workspace.

  5. Click Case-Based. The Open Data Project window opens.

  6. From the Epi_Info folder, select the Sample.mdb project.

  7. Click Open. The Select Data Table From dialog box opens.

  8. Select the BFMeasles table.

  9. Click OK. The Select Case-Based Relate Fields and Classification Field dialog box opens.

Select Case-Based Relate Fields and Classification Field dialog box

  10. From the Shape Fields Geographic Field section, select NAME2.

  • The NAME2 field contains the names of the provinces of BurkinaFaso represented by each polygon on the shapefile.

  11. From the BFMeasles Columns Geographic Field, select DISTRICT.

  • The DISTRICT column in the BFMeasles table contains the mane of the province where each case individual resides. The province names in this DISTRICT column match the province names of the shapefile polygons - NAME2 Shape field.

  12. From the BFMeasles Columns Classification Field, select CLASS2.

  • The CLASS@ column in the BFMeasles table contains the case classification code representing ‘Confirmed’, ‘Probable’, ‘Discarded’ and ‘Suspected’. Since the column must be numeric, the codes 1, 2, 3, 4, and 5 are used.

  13. Click OK. The Select Case Symbols dialog box opens.

Select Case Symbols dialog box

  14. In the Legend Entry Fields, type the following:

  • 1- Confirmed

  • 3- Probable

  • 4- Discarded

  • 5- Suspected

  15. Edit the Color, Symbol, and Size fields, if necessary.

  16. Click OK. The case-based map appears in the workspace with the legend selections.

Case-Based Map example


Merge Map Layers

Merge Layers allows users to merge two layers of the same type into one layer. Merge Layers is only available if there are exactly two layers of the same type listed in the Map Manager. For example, you can merge the USState.shp with the MXState.shp to create one layer that contains both countries.

  1. Use the Map Manager to Add two Layers to the map workspace.

  2. Click Merge Layers. The Save as SHP File window opens.

  3. In the File Name field, type a name for the new shapefile.

  4. Click Save. The Merge Two Layers dialog box opens.

Merge Two Layers dialog box

  5. Select the Intersect Attributes or Union Attributes radio button.

  • If there are no common attributes, Merge Two Layers will fail.

  • Intersect Attributes causes the new shapefile to contain only the fields common to both map layers.

  • Union Attributes causes the new shapefile to contain all fields from both map layers.

  6. Click OK. The new shape file appears in the workspace and is listed in the Map Manager.


Create a Buffer Layer

The Buffer Layer process is an analysis process that allows the creation of a new shapefile by creating polygons or buffer zones that are equidistant from the source layer’s features. The buffer distance must be specified in map units that make sense given the purpose of the buffer zones. If the map layer is in latitude and longitude (decimal degrees), the buffer distance will usually be a small decimal value. Use the Scale shown on the lower left corner of Epi Map to help determine the buffer distance.

  1. Use the Map Manager to Add a Layer to the map workspace.

  2. Click Buffer Layer. The Save as SHP File dialog opens.

  3. In the File Name field, type a name for the new shapefile.

  4. Click Save. The Buffer Layer dialog box opens.

Buffer Layer dialog box

  5. Enter a numeric value in the Enter Buffer Distance field.

  • Select the Union (Merge) Overlapping Buffers checkbox to control whether the buffer process attempts to simplify individual buffers, which overlap each other, into as few common zones as possible.

  • Select the Union (Merge) Overlapping Buffers checkbox to create a new editable layer in the Map Manager. If the Union checkbox is not selected, the Buffer layer will become part of the existing layer.

  6. Click OK. The new Buffer Layer appears in the workspace as a new map layer and in the Map Manager, if Union was selected.

Try It

When Epi Info is installed, sample map files are placed in the Epi_Info folder. In the following example, the sample map files are used to add map layers and create part of the John Snow map of London cholera cases in 1854. For this example, add the layers that contain the street and cemetery location, then create a buffer layer to highlight a buffer zone around the cemetery.

Add the two Soho shapefiles to the workspace to create the map background showing the streets of London and the suspected outbreak area.

  1. From the Epi Map main menu, select File > Map Manager. The Map Manager dialog box opens.

  2. Click Add Layer. The Add Layer window opens.

  3. Locate the Epi_Info folder and select the SohoBuri.shp file.

  4. Click Open. The shape appears in the Epi Map workspace.

  5. Click Add Layer. The Add Layer window opens.

  6. Select the SohoSt.shp file.

  7. Click Open. The shape appears in the Epi Map workspace.

  8. Close the Map Manager to see the map.

  • Click the Full Extent icon Epi Map Full Extent icon to see the entire map and place it in the center of the workspace.

Add a buffer layer to the workspace to highlight a specific zone on the map.

  1. Open the Map Manager and select SohoBuri from the list of layers.

  2. Click Buffer Layer. The Save as SHP File window opens.

  3. Type in file name SohoBuffer.

  4. Click Save. The Buffer Layer dialog box opens.

  5. In the Enter Buffer Distance field, type .0005.

  6. Click OK. The Buffer Layer appears on the map.

  7. From the Map Manager, select the SohoBuffer layer and click Properties. The Layer Properties dialog box opens.

  8. Click the Fill Color block and select a light color from the palette.

  9. From the Style drop-down list, select Horizontal Fill.

  10. Click OK. The buffer layer appears on the map and indicates a specific zone around the specified layer.

Buffer Layer example


Records for Features

The Records for Features option is enabled in the tool bar when a case-based map is created. The Records for Features option allows the retrieval of database records for a polygon. This feature can also be accessed by selecting View > Records for Features from the navigation menu.

  1. Create a case-based map.

  2. Click the Records for Features button. The cursor changes to a table icon.

  3. Using the table icon, click inside a polygon on the map. The Records for Features window opens for the selected polygon with all the records displayed.

  • Values for each field in the database table are displayed.

  • The first column is the sort column. The sort column can be changed by clicking a column header.

  • Change the sort order of the sort column by clicking Ascending (A-Z) or Descending (Z-A).

  • The Records for Features window can be resized using standard Windows practices, e.g. maximize or drag window boundaries.

  • The Records for Features window can not be minimized.

Records for Features dialog box

  4. Click Close to exit the window.

  • The Records for Features mode is active until another tool is chosen from the tool bar (e.g., Identify, Find, etc.) or the arrow cursor is selected from the tool bar or View menu.

  5. Click Return to Arrow Cursor to cancel the Records for Features option.


Change the Background Color

  1. From the Map Manager, click the General tab.

  2. From the Background Color section, click a color block. The map background updates to show the new color.

Use the Map Manager General tab to change the background color.


Change Map Color

  1. From the Map Manager, select a polygon layer.

  2. Click Properties. The Layer Properties dialog box opens.

  3. From the Single tab, click the Fill Color block. The Color palette opens.

  4. Select a color and click OK.

  5. Click Apply to see the color on the map.

  • Click the Outline Color block the change the polygon outline color.

  • Type a new number in the Outline Width field to make the outlines thicker

  • De-select the Draw Outlines checkbox to remove outlines from the map.

  • Use the Style drop-down list to change the fill type.

  • Click OK or Apply to make changes active.

Use the Properties dialog box to change map/shape colors.


Map Composition

Use Map Composition to select map features to display.

  1. From the Map Manager, click Composition. The Map Composition dialog box opens.

Map Composition dialog box

  2. Click the checkbox next to the component to activate the feature.

  3. Click OK. Changes appear on the map.

  • Four types of Map Legends (Class Break, Dot Density, Unique Values, and Case-Based) can be added to a map or removed from a map, if the map displays data of the matching type.

  • The North Arrow option allows the inclusion of a north indicator. Epi Map is primarily used to display data in geographic projections with units in decimal degrees. The use of data from other projections and coordinate systems may cause the north arrow to fail to indicate north accurately. No distinction is made between true or magnetic north.

  • The Scale Bar allows the inclusion of a distance indicator (in generic map units).

  • The Tic Marks option places a horizontal and vertical reference grid over the map extent. Epi Map is primarily used to display data in geographic projections with units in decimal degrees. The use of data from other projections and coordinate systems may cause the tic marks to fail to indicate north/south and east/west accurately.


Map Legends

Legend availability depends on the type of map created.

  • Dot Density legends categorize data in relation to randomly placed dots inside the map polygons and give the representative value of a numeric field.

  • Class Break legends apply to choropleth maps and are used to categorize features into equal ranges or counts (quantiles) distinguished by color.

  • Unique Values legends symbolize every feature in the selected data layer using a unique color.

  • Case-Based legends show the value of symbols assigned through the case-based process.

To Remove a Map Legend

  1. From the Map Manager, click Composition. The Map Composition dialog box opens.

  2. Click the checkbox next to the selected legend to de-select the feature.

  3. Click OK. The legend is no longer visible on the map.

Move the Legend

Left click, hold and drag the legend to the new location in the workspace.

Epi Info™

Version 3.5.3

January 26, 2011

Epi Info for Windows Icon


Display Rates

Rates can be displayed in a map through Analysis using the MAP command. Use Analysis to define and assign rate values prior to mapping or use the denominator and multiplier fields from the MAP dialog box.


Display Analysis Values

Choropleth and Case-Based maps can be created through Analysis using the MAP command. Data tables must be aggregated and must contain a geographic value in order to be mapped.

Basic Mapping Rules

  • There must be a geographic field in the dataset that corresponds to a shape file.

  • Data to be mapped must be aggregated to a unique geographic field.

  • Data being plotted must be in numeric format.

  • Postal code fields must be in text format.

  • X, Y axis fields must be numeric.


Add Data to a Map (DBF) Data File

Add Data to a Map DBF

One shapefile is made up of three types of files; the DBF which contains the data to be mapped, the PRJ or SHX which contains the index information, and the SHP which is the shape itself. The map DBF file can be opened in Analysis and data can be added and applied to a map. Data are plotted to polygon type shapefiles. Data cannot be plotted on line or point type shapefiles.

  1. Open the Analysis module and use the READ command to open the DBF file associated with the map.

  2. Use the DEFINE command to create a new variable.

  3. Use the ASSIGN command to give the new variable the value of 0 (zero).

  4. Use the WRITE command to create a new MDB file that contains all the map data including the new variable.

  5. Use the READ command to open the new MDB file.

  6. Use the LIST UPDATE command to add the data to be mapped to the new variable column.

  • Another option would be to use the Table to View feature from MakeView. Create a view for the new MDB and use the Enter module to input the new variable values.

  7. Use the MAP command to create a map using the newly entered data.

  • Using the geographic names directly from the shapefile assures an exact match in spelling and format and allows for more precise mapping of data.


Introduction to Epi Report

Use the Epi Report module to design and generate reports. Reports can contain elements bound to data sources. The Epi Report module uses the .XML files generated by Analysis when output is created. Report elements can include Analysis .XML files, records lists, cell replacement, groups, and aggregate data. Data analysis, through pivot tables, is also provided. System or permanent variables can be included in reports.

Epi Report uses a drag and drop method to add data to a report template. Reports are saved in the Epi Report format with the extension of .EPT. When a report is generated, the corresponding data source (which is an XML file) is accessed. The latest information from the XML is displayed during the report generation. Individual data elements can be selected to appear in reports. When generating reports, queries are applied to the specified data sources, and information is extracted and displayed. Reports can include multiple tables, conditional filters, group data, and various aggregate functions.


Navigate Epi Report

Open Epi Report by clicking Create Reports from the Epi Info main menu or by selecting Programs > Create Reports from the main page navigation menu. The Epi Report workspace is divided into three sections, the navigation menus and toolbars, the Report Elements Command Tree, and the Report Designer workspace. Epi Report also allows the use of shortcut keys. When a report is generated, the Generate window opens and the formatted data is shown.

Epi Report workspace

The Elements Command Tree is divided into four types of element:

  • Insert Report Objects includes the following elements: Table Shell, Image, Anchor, and Label.

  • Drawing Tools contains only the line element as a graphic.

  • Insert Variable includes the following elements: Permanent Variables or System Variables.

  • Read Data and Create includes the following elements: Read Analysis Output, Field Aggregate, Line Listing Groups, and Pivot Table.

Once data are added to the Elements Tree, it can be dragged, dropped, and edited in the report. Clicking an element activates a pop-up option menu for selecting an output type (MDB or ODBC), editing and output type, or selecting an element to be dragged into the workspace and customized.

The Report Designer workspace is the main workspace for the Epi Report module. The Report Designer workspace displays Report Elements and allows for formatting of the report template. The Report Designer workspace is surrounded by a set of rulers which adjust themselves according to the template size of added objects. Across the bottom of the Report Designer workspace appears a status bar which displays the keyboard settings of CAPS,INS, NUM and the state of the template during report generation. The Report Designer workspace includes the Page Area button. In the upper left corner, click Page Area to view the page breaks according to the current page setup. Page Area places a blue line to show the margin around the template area. The printable area is inside the blue line. Page Area must be turned off to continue work in the Report Designer workspace. Elements added to the Report Designer workspace can be formatted using the Properties dialog box for the specific element type.

The navigation menu and toolbar change workspace settings, make font changes, add vertical space, edit table size, and generate reports.


Insert Report Objects

Available report objects include table shells, images, anchors to create HTML links, and labels. To access the Report Element Command Tree, click the plus box for Insert Report Object. A list of report objects opens.

Insert Report Object menu

Insert a Table Shell

  1. From the Report Element Command Tree, click the plus box for Insert Report Object. A list of report objects opens.

  2. Click and drag Table Shell to the report workspace.

  3. Right click the table shell and select Properties from the pop-up menu. The Properties- Table dialog box opens.

  4. Use the Properties -Table dialog box to apply colors, borders, and sizes to the table shell.

  • Tables will not have visible borders unless they are applied from the Properties -Tables dialog box.

  • Values can be added to table shells by dragging results from the Read Data and Create sources.

  5. Click the close X button to exit the Properties - Table dialog box.

  6. Left click inside the table shell to activate the table cells.

  7. Right click inside a single cell to see the spreadsheet menu. Spreadsheet options include inserting and deleting rows, columns and cells and give the option to add properties to individual rows, columns, or cells.

Edit a table shell

Insert an Image

Images with the extensions gif, jpg, or bmp can be added to the Epi Report workspace.

  1. Click and drag Image to the report workspace. The Select an Image window opens.

  2. Locate and select the image file to be inserted into the report.

  3. Click Open. The image appears in the workspace.

  • Right click the image and select Properties to open the Properties - Image dialog box. Use the Properties - Image dialog box to add Borders and Alternate Text to the image.

  • Images can be resized from the Properties dialog box or by left clicking and dragging the selection bounding boxes.

Insert an Anchor

Anchors in the template will become hyperlink’s in the generated report.

  1. Click and drag Anchor to the report workspace. The Anchor appears in the report workspace as the word Click.

Anchor Report Object

  2. Right click the anchor and select Properties from the pop-up menu. The Properties - Hyperlink dialog box opens.

Anchor Properties dialog box

  3. Place the cursor in the Text field and type the text for the hyperlink.

  • The Name field is an optional field that titles your link but does not appear in the workspace.

  4. Place the cursor in the URL field and type the web address of the hyperlink.

  • Enter the entire address including http://.

  5. Generate the report to test the link. Use one of the following methods:

  • Select File > Generate from the Epi Report navigation menu.

  • Press Ctrl+R on the keyboard.

  • Click the Generate icon from the Epi Report toolbar.

  6. Click the Back button to return to the Report workspace.

Insert a Label

  1. Click and drag Label to the report workspace.

  2. Place the cursor in the Label area and type the needed text.

  • Properties cannot be added to Labels.

  • To edit Labels, highlight the text and apply changes such as style, size, color, shading, and placement using options in the Epi Report tool bar.

  • Alternate Text can be added to images using the Properties- Image dialog box.

  • Labels can be resized by dragging the selection bounding boxes.


Insert Permanent Variables

Permanent variables are defined and assigned from the MakeView Program Editor, Menu, or Analysis. When permanent variables are defined, they appear in the Epi Info.ini file and are then available for use in Epi Report. Values of permanent variables appear in the report when it is generated. Permanent variables can be included in queries.

  1. From the Report Element Command Tree, click the plus box for Insert Variable. A list of variable types appear.

  2. Click the plus box for Permanent Variables. The list of available variables appear.

Insert a Permanent Variable menu

  3. Click and drag a variable to the Report Designer workspace. Each time the report is generated, the current value of the permanent variable is used.


Insert System Variables

Use the Insert Variable menu to place a date, time, or file path inside your report. Values of system variables appear in the report when it is generated. System variables can be included in queries.

  1. From the Report Element Command Tree, click the plus box for Insert Variable. A list of variable types appear.

  2. Click the plus box for System Variables. The list of available variables appears.

System Variable menu

  3. Click and drag a variable to the Report Designer workspace. Each time the report is generated, the current value of the permanent variable is used.


Create an Analysis-Based Report

Information from Analysis XML files can be included in a report template. Information from the latest version of the XML file is displayed when the report is generated.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Read Analysis Output. The Select XML File window opens.

  3. Locate and select an XML file.

  • Multiple XML files can be added to a report template.

  4. Click Open. The Analysis Tables dialog box opens.

Select tables from the XML file to include in the report.

  5. From the Commands section, select the commands to include in the report using the arrow buttons in the center.

  6. Selected commands will appear in the Selected Commands section.

  7. Click OK. The selected commands appear in the Report Elements Command Tree under the XML file name.

Read Analysis Output in the Report Elements Tree

  8. Expand the output data to view the available output that can be added to the report.

Read Analysis Ouput expanded in the Report Elements Command Tree

  9. Drag and drop selected data into the report template. The data appear in the form of a table.

  • Tables can be customized using the Properties dialog box.

  • Specific cells can be selected and included in a report.


Create a Line Listing

A Line Listing is based on a database query. A list contains selected information about records in a dataset. Each column represents a variable and each row represents a different record. Line Listings are created using queries. When the report is generated, the queries apply to the specified data sources and information is extracted and displayed. Queries can include multiple tables, conditional filters, groups, and aggregate functions.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Line Listing Group. A selection pop-up opens.

  3. Click Select an MPB File. The Select Access Database window opens.

  4. Locate and select the MDB file that contains the information to be included in the line listing. The Query Builder opens.

Query Builder dialog box

  5. Type a name for the Line Listing in the Query Name field.

  6. From the Available Items list, click the checkbox next to the dataset that contains the listing information. The Available Fields section populates.

  • More than one dataset can be included in a query.

  • If the needed dataset does not appear in the Available Items list, click the checkbox next to Show View Tables or Show Code Tables to add these tables to the list.

  7. From the Available Fields section, select fields to be included in the listing.

  • Use the single arrows to add fields to the Fields to Show section.

  • Multiple fields can be added by selecting more than one field at a time and then clicking the single arrow.

  • All fields can be selected by clicking the double arrows.

  • Use the reverse single and double arrows to remove from the Fields to Show section.

  • Use the up and down arrows to reorder selected fields in the Fields to Show section.

Query Builder example using the Read tab

  8. Click OK. The query appears in bold in the Report Element Command Tree under Line Listing.

Line Listing Node

  9. Select and drag the query into the Report Designer workspace. A Line Listing table appears on the template page.

  • The table styles and format can be edited and customized using the Properties dialog box.

Line Listing example in the workspace

  10. Generate the report, using one of the following methods:

  • Select File > Generate from the Epi Report navigation menu.

  • Press Ctrl+ R on the keyboard.

  • Click Generate Epi Report Generate button icon from the Epi Report tool bar.

Query Options

The following query options are available from the Query Builder dialog box and can be used to further customize the line listing for a report.

  • Click the Relate tab to create a relationship between the tables. You must have at least two tables selected in the Available Items list to create a relationship.

  • Click the Select tab to create selection criteria applicable to the records in the list.

  • Click the Group tab to create a group from the listed fields. You must have a Group selected to apply Aggregate Functions to fields in the listing.

  • Click the Sort tab to have the records appear in a specified order.


Use Relate in Line Listings

The Relate tab is used to create a relationship between tables. Two or more tables must be selected to create a relationship.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Line Listing Group. A selection pop-up opens.

  3. Select an MDB file. The Select Access Database window opens.

  4. Locate and select the MDB file that contains the information to be included in the line listing. The Query Builder opens.

Note: If the MDB file is already open, do the following:

  • From the Line Listing Group, right click the MDB File name.

  • Select Insert Line Listing.

  5. Type a name for the Line Listing in the Query Name field.

  6. From the Available Items list, on the Read tab, click the checkbox next to the two data tables that contain the listing information you want to relate. The Available Fields section populates.

  7. From the Available Fields section, select fields to be included in the listing.

  • For information on using the Read tab, see the Create a Line Listing topic.

  8. Click the Relate Tab. The Join Tables dialog box opens.

  9. From the Select Table Pair section, select two tables to join. Variables from the selected data tables appear in the two lists on the right.

  10. Select a variable to join from each of the tables

  11. Click Add Join to Query. The Defined Join Conditions section populates with the query code.

  • Click Clear Joins to remove the join condition

Query Builder Relate tab

  12. Click OK. The query appears in bold in the Report Element Command Tree under Line Listing Group.

  13. Select and drag the query into the Report Designer workspace. A Line Listing table appears on the template.

  14. Click the Generate icon to view the results of the query.


Use Select in Line Listings

The Select tab is used to filter the line listing based on selection criteria.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Line Listing Group. A selection pop-up opens.

  3. Select an MDB file. The Select Access Database window opens.

  4. Locate and select the MDB file that contains the information to be included in the line listing. The Query Builder opens.

Note: If the MDB file is already open, do the following:

  • From the Line Listing Group, right click the MDB File name.

  • Select Insert Line Listing.

  5. Type a name for the Line Listing in the Query Name field.

  6. From the Available Items list, on the Read tab, click the checkbox next to the data table that contains the listing information. The Available Fields section populates.

  7. From the Available Fields section, select fields to be included in the listing.

  • For more information on using the Read Tab, see the Create a Line Listing topic.

  8. Click the Select Tab. The Select Criteria dialog box opens.

  9. From the Field Name drop-down list, select a variable.

  10. From the Operator drop-down list, select from the greater than, less than, equal to, and LIKE options.

  11. Type a value in the Value field or click List Possible Values. The Value drop-down list populates with values from the data table field that was selected in the Field Name drop-down list.

  12. Select a Value.

  13. Click ADD Criteria. The Criteria section populates with the selection code.

Query Builder Select Criteria tab

  14. Click OK. The query appears in bold in the Report Element Command Tree under Line Listing Group.

  • Selections can be further limited by selecting more criteria and using the AND/OR into Criteria buttons.

  15. Select and drag the query into the Report Designer workspace. A Line Listing table appears on the template.

  16. Click the Generate icon to view the results of the query.


Use Sort in Line Listings

Sorting is done with the Sort tab of the Query Builder. Sort on one or more fields and in ascending or descending order.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Line Listing Group. A selection pop-up opens.

  3. Select an MDB file. The Select Access Database window opens.

  4. Locate and select the MDB file that contains the information to be included in the line listing. The Query Builder opens.

Note: If the MDB file is already open, do the following:

  • From the Line Listing Group, right click the MDB File name.

  • Select Insert Line Listing.

  5. Type a name for the Line Listing in the Query Name field.

  6. From the Available Items list, on the Read tab, click the checkbox next to the data table that contains the listing information. The Available Fields section populates.

  7. From the Available Fields section, select fields to be included in the listing.

  • For information on using the Read Tab, see the Create a Line Listing topic.

  8. Click the Sort Tab. The Sort dialog box opens.

  9. From the Available Fields section, select a field to sort the data.

  10. Use the single arrows to move variables into the Order By Fields section.

Query Builder Sort tab

  11. Click the Ascending or Descending radio button to select the sort order.

  12. Click OK. The Query appears in bold in the Report Element Command Tree under Line Listing.

  13. Select and drag the Query into the Epi Report workspace. A Line Listing table appears on the template page.

  14. Click the Generate icon to view the results of the query.


Use Groups in Line Listings

Users can logically group related data using the grouping concept. Various aggregate functions can be applied to groups of data.

For example, a list of patients could be grouped by a sex field, resulting in a line listing with females listed in the first section, followed by males listed in the next section.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Line Listing Group. A selection pop-up opens.

  3. Select an MDB file. The Select Access Database window opens.

  4. Locate and select the MDB file that contains the information to be included in the line listing. The Query Builder opens.

Note: If the MDB file is already open, do the following:

  • From the Line Listing Group, right click the MDB File name.

  • Select Insert Line Listing.

  5. Type a name for the Line Listing in the Query Name field.

  6. From the Available Items list, on the READ tab, click the checkbox next to the data table that contains the listing information. The Available Fields section populates.

  7. From the Available Fields section, select fields to be included in the listing.

  • For information on using the Read Tab, see the Create a Line Listing topic.

  8. Click the Group Tab. The Group Fields dialog box opens.

  9. From the Fields to Show section, select a field to act as the grouping criteria for the data.

  10. Use the single arrows to move variables into the Grouped Fields section.

  11. When a field is moved to the Grouped Fields section, an Aggregate tab appears in the Group Fields dialog box.

Query Builder Group Fields

  12. Click OK. The Query appears in bold in the Report Element Command Tree under Line Listing.

  13. Select and drag the Query into the Epi Report workspace. A Line Listing table appears on the template page.

  14. Click the Generate icon to view the results of the query.

Use Aggregates in a Line Listing

When a group is created in a Line Listing, you have the option to create aggregates.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Line Listing Group. A selection pop-up opens.

  3. Select an MDB file. The Select Access Database window opens.

  4. Locate and select the MDB file that contains the information to be included in the line listing. The Query Builder opens.

Note: If the MDB file is already open, do the following:

  • From the Line Listing Group, right click the MDB File name.

  • Select Insert Line Listing.

  5. Type a name for the Line Listing in the Query Name field.

  6. From the Available Items list, on the READ tab, click the checkbox next to the data table that contains the listing information. The Available Fields section populates.

  7. From the Available Fields section, select fields to be included in the listing.

  • For information on using the Read Tab, see the Create a Line Listing topic for more information on using the Read tab.

  8. Click the Aggregates tab. The Create Aggregates dialog box opens.

Query Builder Create Aggregate tab

  9. Click Create Aggregate, below the Defined Aggregates list. The Aggregates Settings fields populate with default values.

  10. In the Name field, accept the default name or type a new one.

  11. From the Available Functions drop-down list, select from Sum, Average, Count, Maximum, or Minimum.

  12. From the Available Fields drop-down list, select a field to aggregate from the data tables in the listing.

  13. From the Aggregate At drop-down list, select Top or Bottom to indicate the aggregate location on the page.

  14. From the Aggregate Type section, click the checkbox to Perform Aggregation At Group Break and/or Perform Grand Total.

  15. From the Grouped Field drop-down list, select a grouping if you have more than one group created.

  16. Click OK. The query appears in bold in the Report Element Command Tree under Line Listing.

  17. Select and drag the query into the Epi Report workspace. A Line Listing table appears on the template page.

  18. Click the Generate icon to view the results of the Query.

  • From the Report Element Command Tree, right click Edit Line Listing to edit a line listing.

  • From the Report Element Command Tree, right click Delete Line Listing to delete a line listing.

Delete Aggregates in a Line Listing

To delete aggregates in a line listing, take the following steps:

  1. From the Report Element Command Tree, right click the Query you want to delete.

  2. Click Edit Line Listing. The Query Builder dialog box opens.

  3. Click the Aggregates tab. The Create Aggregates dialog box opens.

  4. Click Delete Aggregate, below the Defined Aggregates list. The Aggregates Settings fields data are removed.

  5. Click OK.


Exclude an Aggregate Name from a Line Listing Group

  1. Create a Line Listing that contains Aggregates.

  2. In the Name field preface the aggregate name with the @ symbol.

  • When the report is generated the aggregate name will not appear in the listing.

Aggregates Settings Example


Display a Range in a Line Listing

  • Ranges can be displayed in a Line Listing by using the Select tab in the Query Builder. For example, a range of ages or dates could be selected using the <> or = options.

  • Ranges could also be displayed in Analysis. Ranges could be created using the SELECT command or prompted using the DIALOG command. The data could then be written to a new table with the WRITE command. The new table with the specified ranges could be read into Epi Report and used to create a line listing.


Display a Specific Number of Records in a Line Listing

  1. From the Line Listing Group, right click on the MDB file.

  2. Select Insert Line Listing. The Query Builder dialog box opens.

  3. From the Top N section, enter a number of records to display.

  • Select the Percentage checkbox to include a percentage of records rather than a number.

Top N of Records

  4. Complete the query and generate the report to see results.


Specify a Line Listing Field as Yes/No Value

  1. From the Query Builder Read Tab, select a table.

  2. Type a name for the Line Listing in the Query Name field.

  3. Select Available Fields and move them to Fields to Show. The Treat as Yes/No checkbox appears.

Treat as Yes/No Checkbox

  4. rom the Fields to Show list, select a field.

  5. Select the Treat as Yes/No checkbox.

  6. Add the Line Listing to the page and generate the report to see the results.


Create a Pivot Table Report

Pivot tables can be created using the Query Builder in Epi Report. In the pivot table, axes can be changed and various aggregate functions can be applied to the data.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Pivot Table. A selection pop-up opens.

  3. Select an MDB file. The Select Access Database window opens.

  4. Locate and select the MDB file that contains the information you want to include.

  5. Click Open. The Query Builder opens.

Pivot Table Query Builder

  6. Type a name for the pivot table in the Query Name field.

  7. From the Available Items list, click the checkbox next to the dataset that contains the pivot table information. The Available Fields section populates.

  • More than one dataset can be included in a query.

  • If the needed dataset does not appear in the Available Items list, click the checkbox next to Show View Tables or Show Code Tables to add these tables to the list.

  8. From the Available Fields section, select fields to be included in the pivot table.

  • Use the single arrows to add fields to the Fields to Show section.

  • Multiple fields can be added be selecting more than one field at a time and then clicking the single arrow.

  • All fields can be selected by clicking the double arrows.

  • Use the reverse single and double arrows to remove from the Fields to Show list.

  • Use the up and down arrows to reorder selected fields in the Fields to Show list.

  9. Click the Design Pivot Table tab.

  10. Select a field from the Available Fields list and move it to the Row, Column, or Data sections of the table using the arrow buttons.

  • Click Clear All Defined Rows, Cols, and Data to create a new table structure.

Design a Pivot Table

  11. Click the Format Pivot Table tab.

  12. Select colors and fonts for the table. Use the Pivot Sections drop-down list to edit different areas of the table.

Format a Pivot Table

  13. Click Apply Formatting to accept the changes.

  14. Click OK. The Pivot Table appears in the Read Data and Create menu.

  15. Click and drag the pivot table to the Epi Report workspace.

  • Generate the report to see the results.

  • To make changes to the table, right click the table name and select Edit Pivot Table from the menu.

  • Right click the table and select Properties to add borders and style


Add Field Aggregates

The Aggregate Functions (Count, Minimum, Maximum, Percent, Sum, Average) can be applied to individual columns in the database; and the corresponding information can be included in a report. Aggregates are calculated during report generation. Aggregates can be formatted and have conditions applied.

  1. From the Report Element Command Tree, click the plus box for Read Data and Create.

  2. Click Field Aggregate. A selection pop-up opens.

  3. Select an MDB file. The Select Access Database window opens.

  4. Locate and select the MDB file that contains the information to be included in the line listing. The Query Builder opens.

Note: If the MDB file is already open, do the following:

  • From the Line Listing Group, right click the MDB File name.

  • Select Insert Line Listing.

  5. Click Open. The Select Tables dialog box opens.

Select Tables dialog box

  6. From the Available Tables section, select the tables to include in the report using the single arrows and double arrows. Selected tables appear in the Tables to Show section.

  • Select the Show View Tables or Show Code Tables checkbox to include views and code tables in the list of available tables.

  • Multiple tables can be selected.

  7. Click OK. The project file name appears in the Field Aggregate menu.

Field Aggregates List in the Elements Command Tree

  8. Click the plus box for an individual table to see the available variables.

  9. Click the plus box next a variable to see the available aggregates for the field type.

Field Aggregate example

  10. Click and drag an aggregate to the Report Designer workspace.

  • The size of the aggregate field may need to be increased for all the data to be visible when the report is generated.

Format a Field Aggregate

Formatting options are available when the aggregate is a numeric or date type field.

  1. Right click a Field Aggregate. A pop-up menu opens.

  2. Select Format. The Format dialog box opens.

Format an aggregate field dialog box

  3. Select a format from the Available Formats section. An example of the format appears in the Sample section.

  4. Click OK to apply the format to the selected aggregate.

Custom Format (numeric) or Custom Date allow for user defined formats to be applied. For more information on the format specification, see the “Format a Date or Number” section.

Apply Conditions to a Field Aggregate

Field or aggregate values can be filtered by using the Condition Builder. Any number of conditions can be added to a selected aggregate.

  1. Right click a Field Aggregate. A pop-up menu opens.

  2. Select Add Condition. The Condition Builder dialog box opens.

Condition Builder dialog box

  3. From the Select Field drop-down list, select a filter variable.

  4. From the Operator drop-down list, select an Operator.

  • Operators include equal to, greater than, and less than — alone or in combination as well as LIKE and IN.

  5. Click List Possible Values. The Select/Enter Value drop-down list populates with available values.

  • Click List Possible Variables to include permanent variables in a query.

  6. From the Select/Enter Value drop-down list, select a value.

  7. Click ADD Condition. The Criteria field populates with the filter code.

  • Code can also be typed directly into the Criteria field.

  • All non-numeric values must be enclosed in single quotes.

  • All fields that contain spaces, special characters, or start with numbers should be enclosed in brackets [ ].

  • After a condition is added, subsequent conditions are added by clicking AND to Condition or OR to Condition. The condition is added with the respective AND or OR operators.

  8. Click OK. To see the filtered results, click the Generate icon to view the report


Use ODBC Connections

ODBC connections can be used in Epi Report to create Line Listing Groups, Field Aggregates, or Pivot Tables. ODBC connections can be used to connect to any ODBC complaint database, such as a SQL server, and pull data into Epi Report. Although there may be restrictions on the type of access provided to particular tables or fields, creating reports using an ODBC data source should otherwise be similar to working with an Epi Info or Access dataset (MDB).

  1. From the Report Elements Command Tree, click the element type to add.

  2. Click Select ODBC from the menu. The ODBC Data Source dialog box opens.

  • If there has been a previous connection to a DSN from Epi Info, use the Data Source Name and Description drop-down lists to locate the connection. The User ID and Password fields must be completed at each log-in as they are not saved. Click OK.

  3. Click Create New DSN. The Create New DSN dialog box opens.

  • If there has been a previous connection to a DSN from Epi Info connection changes are needed, click Reconfigure DSN. The ODBC Data source dialog box opens. Make changes following the same steps as in the creation of a new DSN connection..

Create New DSN dialog box

  4. Type a name in the Data Source Name field.

  5. Type data information in the Description field.

  6. Type in the User ID and Password.

  • User ID and Password are required fields and must be entered each time a connection is made.

  7. From the ODBC Driver section, select a connection type.

  • If Epi 6 is selected, a Database drop-down list and Browse button appear. Use the drop-down list to select an existing connection or use the Browse button to locate a .REC file. Click OK.

  • If SQL Server is selected, the Server and Database drop-down lists appear. Use the drop-down lists to select the connections and click OK.

  • If Other is selected, use the drop-down list from the ODBC Driver section to select a connection type and click OK. The Set-up dialog box for the connection type opens. Click Help from the set-up dialog for more instruction on creating specific types of connections.

  8. Click OK. The ODBC Data Source dialog box opens.

  9. Click OK. The Query Builder or Select Table dialog box opens depending on the type of data being added to the report.


Publish Output

When a generated report is published, all associated image files are copied and saved to a specified directory with the HTML version of the report. This function differs from the ‘Save As’ feature in that it carries the image files separately to the new directory whereas ‘Save As’ embeds the image files in the HTML.

  1. Generate the report. The Report window opens.

  2. From the navigation menu, select File > Publish Output. The Publish Output window opens.

  3. Locate and select the directory to save the file.

  4. Name the file by typing in the File Name field.

  5. Click Save. The report and all associated image files are copied and saved to the specified directory.

  • The HTML report and image files can be copied to a new location and still be viewed correctly.

  • Changes made to templates from the Epi Report workspace must be generated and saved from the Report window in order to update the HTML version of the published report.


Set the Pagination

This feature provides the option either to enable or to disable the page break functionality for the open template. If Pagination is enabled, page breaks can be inserted inside the template at any position. If Pagination is not enabled, page breaks cannot be inserted in the template.

Pagination value can be set at two levels:

  • Template level pagination

  • System level or default pagination

Template Level Pagination

Template level settings apply only to the active template. The values set at this level are stored locally inside the template. Changes made at this level will not affect other templates.

  1. From the Epi Report navigation menu, select Tools > Pagination. The Pagination Setting dialog box opens.

Pagination Setting dialog box

  2. Select the Pagination On radio button.

  3. Click OK.

  • Page Breaks can be used in the template.

  • Turning the Pagination Off in a template that contains page break(s), triggers an Epi Report message which asks, if you want to continue the process as page breaks will then be ignored when the report is printed. Click Yes to continue or No to cancel.

  • Pagination Settings can be re-applied to the template.

System Level or Default Pagination

System Level or Default Settings apply to the system or application level. Default values are visible across templates.

  1. From the Epi Report navigation menu, select Tools > Pagination. The Pagination Setting dialog box opens.

  2. Click Set Default Setting. The Default Pagination Setting dialog box opens.

Default Pagination Setting

  • If a Default Pagination is selected, the setting will be used for any template that is opened or created with Epi Report.

  • There can be printing issues for reports that contain large line listing groups and a Pagination On setting. For large reports, if contents do not appear distributed properly across multiple pages, it is recommended to turn Pagination Off. It is highly recommended to first generate and preview a report before printing.


Add a Header and Footer

  1. From the Epi Report navigation bar, select File > Page Setup. The Page Setup dialog box appears.

Page Setup dialog box

  2. In the Page Header and Footer section, type the desired Header and Footer text in the open fields.

  • To remove the default Header and Footer text from a report, delete the text in the open fields.

  3. Click OK.

  • The Headers and Footers display in the Print Preview page.

For information on the syntax for the Header and Footer codes, see the “Page Setup and Page Layout” section.


Create Style Sheets

Style sheets can be created for the HTML elements table, image, and line. The created style sheets are specific to a template. Styles can be edited or deleted.

  1. To access styles, select Tools > Styles from the navigation menu. The Properties dialog box opens.

Setting Styles dialog box

  2. From the Element drop-down list, select Table, Image, or Line.

  3. In the Style Name drop-down list, type a style name or select from those available in the open template.

  • The Style Name cannot contain spaces.

  4. Customize the style using the color and size options.

  5. Click Save Style to keep the changes.

  • Click Delete Style to remove a style from a template.

Apply Style Sheets

  1. Select a table, line, or image in the open template.

  2. Right click and select Properties from the pop-up menu. The Properties dialog box opens for the selected element.

  3. From the Style Name drop-down list, select the style to apply or select the blank field from the drop-down list to edit the element without applying a style sheet.

  • Once a style sheet is applied the Properties for the table, line, or image are locked. The style sheet must be modified from the Tools > Styles menu to make changes to applied styles.


Format a Date or Number

The Format option is available only for date or numeric type variables.

  1. Select a number or date type element to be formatted.

  2. Right click and select Format. The Format Date or Format Number dialog box opens.

Format dialog box

  3. From the Available Formats section select a format style. The Sample section shows how the format will appear in the report.

  • Select Custom Format to create a format style not listed.

  • Text can be added to the format by selecting Custom Format from the list. Create the numeric format and enclose the text with double quotes, for example ##.## "LBS".

  4. Click OK.

  • When using Analysis XML data or Field Aggregates, the Format option is available only if the data type of the cell or column is a number or a date.

  • When using Listing Groups, the Format option is available only if the table cell containing the field name enclosed within <> is a number or date.

  • Format is not available for pivot tables.


Select Cell Elements

Cell data can be selected and added to a table shell using the Report Elements Command Tree.

  1. From the Read Analysis Output list, right click one of the tables. The Cell Elements dialog box appears.

Cell Elements dialog box

  2. Select individual data elements from the table. The selected cells are highlighted in yellow.

  3. Click OK. Cells appear in the Read Analysis Output list.

Selected cell elements

  • Cell data can then be dragged and dropped into a new table shell or other customized report area.


Page Setup and Page Layout

The Page Setup and Layout settings are template specific and saved with the template. When a new template is opened, the Page Set up and Layout defaults to the system registry settings.

  1. Select File > Page Setup. The Page Setup dialog box opens.

  • From the Paper Size section, use the Available Sizes drop-down list to select the paper size for the selected printer.

  • From the Page Header and Footer section, delete the default settings to remove all text from the Header and Footer or use the Header and Footer syntax tto input new information.

  • From the Orientation section, select Portrait or Landscape depending on the size and style of the report data to be printed or viewed.

  • From the Margins section, type or use the arrow buttons to increase or decrease the margins for the report.

  2. Click OK. The page changes are made to the template.

Header and Footer Syntax

Report Information | Field Syntax
Window title | &w
Page address (URL) | &u
Date in short format (as specified by Regional Settings in Control Panel) | &d
Date in long format (as specified by Regional Settings in Control Panel) | &D
Time in the format specified by Regional Settings in Control Panel | &t
Time in 24-hour format | &T
Current page number | &p
Total number of pages | &P
Right-aligned text (following &b) | &b
Centered text (between &b&b) | &b&b
A single ampersand (&) | &&


Insert a Page Break

Create a Page Break

Page breaks force elements under the break to reposition on a new page.

  1. To insert a page break, right click in the template at the location for the break.

  2. From the template pop-up menu, select Insert Page Break.

  • If you do not see an option for Page Break, change the Pagination Settings. Pagination must be turned on in order to use the page break feature.

  • Page breaks are designated by a blue dotted line.

Page Break example

  • Vertical space between a page break line and the next page element is not taken into account. Elements on the new page are positioned at the zero top position of the new page.

  • Page break lines cannot be repositioned once inserted; however, they can be deleted.

  • If more than one page break line is inserted between elements, those pages are left blank. For example: Two page break lines inserted between two elements would result in a blank page.

  • If there is an overlap with a page break line and an element, the page break affects the elements under the overlap. This feature is supported only when attempting to print from and within Epi Report, but not when trying to print the saved report using the browser’s Print option, which is only available if the report is generated and saved as HTML.

  • To view a page break, generate the Report and click the Print Preview button.


Move a Page Break Line

There is no direct way to reposition a page break line after placing it in the page. The only way to move the line break is to select and delete the line break and then insert a new page break at the desired position.


Print or Preview a Report from the Menu

At the Menu command line, specify the switch /V for preview and /P for printing.

  • Use the Epi Info Menu to create a new menu item or button.

  • Create a new block of code in the command line section that previews or prints the report.

Example

MENUITEM "MY REPORT", WEEKLY REPORT

Preview

Weekly Report
Begin
EpiRepGen C:\Epi_Info\WeeklyReport.ept /V
End

Print

Weekly Report
Begin
EpiRepGen C:\Epi_Info\WeeklyReport.ept /P
End


View a Specific Page from Print Preview

From the Print Preview window, use the page navigation options at the top of the page.

Print Preview Page navigation

  • Use the single arrows to move one page at a time through a document.

  • Use the double arrows to move to the first or last page of a document.

  • Type a specific page number into the Page field and press enter from the keyboard to view a specific page.


Troubleshoot Print Preview

  • Epi Report uses the print preview module provided by Microsoft Internet Explorer (IE) version 5.5 and above. Earlier versions of IE do not support the print preview option. The latest version of IE can be downloaded from the Microsoft website.

  • When called from Analysis, the Print Preview window may be minimized. This is an operating system behavior that is dependent on the personal computer where Epi Report is running.

  • It is highly recommended to view the print preview in 100% Zoom Mode. Zoom Modes less than 100% may result in viewing errors; for example, missing borders. Printed output is not effected by the zoom mode.

  • From the Print Preview window, use the page navigation options at the top of the page and set the Zoom Mode to 100% using the drop-down list or magnifying glass.

Print Preview Zoom Mode


Add a Border

Add a Border to a Report Element

Borders cannot be added to labels; however, a label can be created from a table shell by adding borders to a single cell and deleting the extra cells.

  1. From the Insert Report Object menu, drag a Table Shell into the workspace.

  2. Right click the selected table and select Properties. The Properties - Table dialog box opens.

  3. Click the Borders field.

Properties- Table dialog box

  4. From the Borders field, click the Browse button. The Choose Border dialog box opens.

Choose Border dialog box

  5. Select the border lines needed.

  6. Click Apply to view the application.

  7. Click OK to return to the workspace.


Add Space to the Bottom of a Template

To position an element at the bottom of the template, it may appear that there is no room to move the element. Click the Vertical Space Vertical Space button button located in the Epi Report toolbar or press Ctrl+J on the keyboard. Use the vertical scroll bar to shift the template up so that there is room to move the element further down to the bottom.


Change or Remove the Background Color in a Table Shell

Tables are transparent by default, but background colors can be added or removed. Use the Properties-Tables dialog box to add or remove the Background Color of a Table.

Add a Background Color to a Table

A background color helps a table be more visible and the report more interesting. This is especially useful when the template body has a background color or image.

  1. Right click the table to change and select Properties from the menu. The Properties -Table dialog box opens.

  2. From the Background Color drop-down list, select a color.

  3. Click OK. The selected color is applied to the table.

Remove a Background Color

Use the Properties - Table to remove color selections and return a table to transparent.

  1. Right click the table to change and select Properties from the menu. The Properties -Table dialog box opens.

  2. Press Delete on the keyboard. The background is returned to the default color of white.


Group Cells to Span the Width of a Table

By default, the group cell only spans one column. To have the group cell span the entire width of the table, take the following steps:

  1. Right click in the first cell to start the span and select Cell Properties. The Properties - Cell dialog box opens.

  2. In the Columns a Cell Should Span field, type the number of cells to span.

  3. Press Enter on the keyboard. The cell span changes in the table.

  • Any values entered in the cells spanned are merged in the cell order.

  • More than one Aggregate value should not be used with the ‘Columns a Cell Should Span’ property as the values will not be generated.


Place One Table on Top of Another

Epi Report considers tables to be nested when dropped on top of each other. Overlapping tables with optional behavioral settings is not supported in this version of Epi Report.


Copy a Template to a New Computer

These instructions refer to the Epi Report templates (EPT and EPX) files that can be opened only by Epi Report. To create a report that contains all data and can be sent to other users, use the Publish Output or Save As feature available from the generated report navigation menu.

  • Epi Report does not provide a way to package a template with its associated files such as images and Analysis XML files.

  • When File > Save, File > Save As, or File > Save All is selected from the Report Designer workspace two template files are created, an EPT and an EPX. Template files can be copied to a new computer and will function only if the new computer to which the files are copied has the same directory structure and all the files such as images and XMLs are copied as well. The XML files that are copied will not be updated when the original PGM is run from Analysis.

  • Another option is to use the copied files with an ODBC connection in order to access updated records (DSN). If there are images in the report, they must be set to relative image paths from the Properties - Image dialog box. This method will not work if the template references Analysis XML files.


Create a Hyperlink for a Selected String

Since the output from Epi Report is in HTML format, hyperlink’s are very useful for users of the report to quickly go to other pages or files.

  1. Select the string to be a hyperlink.

  2. Press Ctrl+L on the keyboard. The Hyperlink dialog box opens.

  3. From the Type drop-down list, select a type of hyperlink, for example http or file.

  4. In the URL field, type the URL text.

  5. Click OK.

Note: This feature can be combined with Field aggregates and conditional field aggregates such that the value of the aggregate is the hyperlink text and is shown only if the specified conditions are true.


Generate a Report using a PGM or Check Code

Reports can be saved and generated using Publish Output from the Epi Report Generate window. Reports can also be generated and saved from Analysis and the Menu command line.

  • Use the REPORT command from Analysis (PGM).

  • Use the EXECUTE command from Make View (Check Code), Analysis (PGM), or Menu.

  • Use the Menu and /O: switch to run and save an HTML report.


Move Toolbars

The toolbars at the top of Epi Report may be positioned according to preference, but Epi Report does not support turning the toolbars off completely.

  1. Place the cursor over the edge of the toolbar. The pointer changes to a set of horizontal arrows.

  2. Click and drag the toolbar to a new location.


Change the Ruler Scale Between Inches and Centimeters

Epi Report provides the flexibility to show the ruler scale in inches or centimeters.

  1. Right click on the ruler that surrounds the report workspace.

  2. From the pop-up options, select Inches or Centimeters.


Resize a Report Element Using the Toolbar

Resize a Report Object Using the Tool Bar

The toolbar width and height adjustment tool allows you to modify the element size.

  1. Select the report element to be resized.

Tool bar width and height adjustors

  2. From the Width and Height adjustment tool, use the arrow buttons to change the width or height by one pixel at a time.

  • Alternately, enter a number of pixels in the W or H fields and press Enter on the keyboard.


Position Field Aggregates and System Variables

Locking a variable positions the selected item relative to the parent. In Epi Report positions are absolute. To avoid the absolute positions and have the item placed exactly in the cell, select the item and press Ctrl+K on the keyboard. Absolute positioning allows aggregates and variables to be placed in any position on the template.


Paste Data from the Clipboard to a Report

Content from other sources is often a necessity. For example, the text from an external document may be needed for a portion of the report.

  1. Copy the content onto the clipboard.

  2. Place the cursor inside the report template.

  3. Select Edit > Paste from the menu. Contents appear in the report template.


Remove a Background Image

If a background image is no longer needed it can be removed.

  1. Right click inside the workspace and from the menu pop-up, select Body Properties. The Properties- Body dialog box opens.

  2. Click the Background Image field.

  3. Press Delete on the keyboard. The workspace returns to the default page setting of white.


Search for a String in a Template

Searches can be conducted on a template or from the generated report.

  1. Press Ctrk+F on the keyboard. The Find dialog box opens.

Find dialog in Epi Report

  2. Enter the search text in the Find What text box.

  • Select the Match Whole Word Only or Match Case checkboxes to filter the search criteria.

  • Select the Direction Up or Down radio buttons to go forwards or backwards through a report.

  3. Click Find Next. If the text is found in the template it will be highlighted.

  • If more than one instance of the text is in the report, continue clicking Find Next to view each one.


Terminate Report Generation

To terminate report generation, click Cancel from the Generate Report progress window.


Time to Generate

Generated templates often contain elements embedded as Line Listings, Pivot Tables, or other Analysis data that can fetch large numbers of records from the database. Analyzing elements, applying formatting, and rendering images also consumes system resources and can slow generation time for reports.


Use the Undo Option

There are no limitations to the number of Undo or Redo actions.

  • To undo actions, select Edit > Undo or press Ctrl+Z on the keyboard.

  • To redo actions, select Edit > Redo or press Ctrl+Y on the keyboard.


Copy a Line Listing Group from One Template to Another

Retention of connections across templates is not supported in this version of Epi Report.


Add a Vertical Line

Add a Vertical Line to a Report

The insertion of vertical lines is not supported in this version of Epi Report.

  • A vertical line can be inserted as an image already containing the desired color and size.


Change Bullet Shapes

Non-standard bullets and numbers are not supported in this version of Epi Report.


Edit a Template in Zoom Mode

Editing templates from zoom mode is not supported in this version of Epi Report.


Edit an Image Placed in a Template

Editing of images is not supported in this version of Epi Report.


Select Multiple Elements on a Template

Select Multiple Elements in a Template

Selection of multiple elements, for example, more than one table, is not supported in this version of Epi Report.


Set Properties for Multiple Tables

Multiple tables or other report elements can be formatted with the same set of properties by creating and applying a style sheet.


Translation Features

Translation of Epi Info programs, help files, and exercises into non-English languages is made by placing all English phrases used in the programs in a database called LANGUAGE.MDB, located in the ENGLISH subdirectory under the main directory of Epi Info (usually \Epi Info). Help files and exercises are also contained in the ENGLISH directory or its subdirectories. Translated phrases, help files, and exercises are placed in similar directories named after the relevant language, such as SPANISH. Translation can be done without changing the names of files, and individual translations can be installed or uninstalled without affecting the main programs. Switching from one language to another can be done from the main menu, and is changed by setting the LANGUAGE variable in the file Epi Info.INI.

How To

  • Translate Epi Info.

  • Create a Translation File.

  • Create a Help File Translation.


Translate Epi Info

Epi Info is designed for easy translation into languages other than English. All the English phrases that can safely be translated are contained in tables in the database LANGUAGE.MDB. Commands and other reserved words in the Analysis and Check Command programming languages should not be translated, although the screen prompts that lead to their generation can be translated. Each Epi Info program has its own table in a LANGUAGE.MDB database. Each Menu (.MNU) file used produces a separate table in the database, which can be translated. English versions of the menu tables are generated automatically when a new .MNU file is created. Each language has its own directory in the installed Epi Info directory.

Each installation of the Epi Info application contains the directories ...\ENGLISH\ and ...\ENGLISH\HELP\, which hold the English versions of the program phrases, for example c:\Epi_Info\ENGLISH\LANGUAGE.MDB, and the English versions of the help files. Tutorials, such as OSWEGO, are also located in the \HELP\ directory. An installation program called TSETUP.EXE is provided to create proper directories for new languages and install the translated files.

Multiple languages can be installed at one time, if appropriate naming conventions and subdirectories are specified. Self-expanding .EXE files are needed for each language. Language EXEs must be placed in the TransEXEsubdirectory for each language. The TSETUP program can then read and process each of those ‘.EXEs’ constructed individually. Each time TSETUP runs, if, in the destination subdirectory files already exist for a specific language, those files will be overwritten by contents of the .EXE file for that language.

There are two downloads needed for a complete translation of Epi Info.

  • The first is the LANGUAGE.MDB for the language needed. Language translations are available through the Epi Info website.

  • The second is the Epi Graph language .DLL for the language needed. Epi Graph translation DLLs must be downloaded from http://www.gigasoft.com/resource_files.html and put into the directory of the corresponding language under the Epi_Info directory, for example, C:\Epi_Info\SPANISH\PEGRC32B.DLL.

There are four ways to use Epi Info with a language other than English.

  • If you already have a self-extracting executable language translation file, you can install it. You can download an example file from the Epi Info website, such as SPANISH.exe. This file contains a compressed Language.mdb database with phrases translated into Spanish. For more information, see the “Install an Existing Language Translation File” section.

  • If you obtained a Language.mdb database with phrases for this version translated into your language, you can create a language folder to use it. For more information, see the “Use an Existing Language.mdb Database” section.

  • If you have a Language.mdb database with phrases from a previous version, you can update your previous database with the new or modified phrases in this version. You will need to complete the translation for the new or modified phrases. In the Language.mdb database, the rows with these new or modified phrases will be blank for your language. For more information, see the “Update a Previous Version with Current Phrases” section.

  • If you do not have a language translation file to use, either for this version or a previous version, you can create a new Language.mdb database for the language of your choice. For more information, see the “Create a New Language.mdb Database” section.

Install an Existing Language Translation File

Note: You must have a self-extracting language translation file to complete this section. You can download a sample self-extracting language translation file, such as SPANISH.exe, from the Epi Info website. This file contains a compressed Language.mdb database with phrases already translated into the language associated with the filename.

To install an existing language translation file, take the following steps:

  1. Copy or save the LANGUAGE.exe file to the TransEXE folder located in the Epi_Info folder. For example, C:\Epi_Info\TransEXE\SPANISH.exe.

  2. From the Epi Info main menu, select Settings > Manage Translations. The TSETUP window opens. The languages associated with the filename in the TransEXE folder will appear in the list.

  3. Select the language from the list.

  4. From the Install Language section, click Install. A TSETUP delay window opens.

  5. Click OK. A TSETUP exit window opens.

  6. Click OK. The TSETUP exit window opens.

  7. From the Epi Info main menu, select Settings > Choose Language to choose the language you installed in Step 4.

  8. Select the language from the list.

  9. Click OK. The language update is now visible.

Use an Existing LANGUAGE.MDB Database

You must have a Language.mdb database with phrases already translated into the language of your choice to complete this section.

  1. From the Epi Info main menu, select Settings > Manage Translations. The TSETUP window opens.

  2. From the Create Language Folder section, click Create. The Create a New Language File dialog box opens.

  3. Type the name of the language included in the Language.mdb database.

Warning! The exact name and spelling must be used.

  4. Click OK. A TSETUP window displays a message that states the Language file has been created in the folder.

  5. Click OK. The TSETUP window closes.

  6. Save or copy your existing Language.mdb database into the new folder which has the name you typed in Step 3. This will overwrite the existing folder.

  7. From the Epi Info main menu, select Settings > Choose Language to choose the language just installed.

  8. Select the language from the list.

  9. Click OK.

Update a Previous Version with Current Phrases

You must have a Language.mdb database from a previous version, as in Epi Info 3.3.2, to complete this section. This database must be located in a folder having the language name as a subfolder to the Epi Info installation folder. For example, C:\Epi_Info\Spanish\Language.mdb. This Language.mdb database must contain phrases from the previous version already translated into your language. Make sure your Windows Locale setting is set with your local language locale before following these steps.

Note: In order to translate the phrases to your language you will need Microsoft Access.

  1. From the Epi Info main menu, select Settings > Manage Translations. The TSETUP window opens.

  2. From the Merge Translation Language section, click Merge. The Merge Table dialog box opens.

  3. In the Language Name field, type the name of your local language. For example, Spanish.

  4. In the Source Language.mdb field, type the path and file name of the new Language.mdb for the current version or click the Browse button to locate the file. This file will usually be in C:\Epi_Info\English\Language.mdb and will contain a column for English only.

  5. In the Destination of Merged Language.mdb field, type the path and file name of the location for your merged language database or click the Browse button to locate a folder to put the file in.

  6. Click Merge to merge the contents of the tables. The status bar will display the process until it is completed.

  7. Use Microsoft Access to translate the phrases that are blank in the column for your language.

Create a New LANGUAGE.MDB Database

Make sure your Windows Locale setting is set with your local language locale before following these steps. In order to translate the phrases to your language you will need Microsoft Access.

  1. From the Epi Info main menu, select Settings > Manage Translations. The TSETUP window opens.

  2. From the Create Language Executable section, click Compress. The Make Self-Extractor window opens.

  3. In the Self-Extractor .exe Name field, type the name of the language included in the Language.mdb database.

  4. In the Folder Location for Compression field, type the file name of the location for the language database or click the Browse button to locate a folder to put the file in.

  5. Click OK. A Make Self-Extractor confirmation dialog box opens.

  6. Click OK. The TSETUP window closes.

  7. Use Microsoft Access to translate the phrases that are blank in the column for your language.

Install an Epi Graph Language Resource File (DLL)

Epi Graph translation DLLs must be downloaded from the Gigasoftwebsite. Download each resource file and load it into the language folder in the Epi_Info directory for each language.

  1. Download the Epi Graph resource file (DLL) for the selected language.

  2. Unzip the file to the language folder that contains the LANGUAGE.MDB. For example, C:\Epi_Info\SPANISH.

Choose a Language

Once the LANGUAGE.MDB and the Epi Graph DLL are installed, Epi Info and Epi Graph can be viewed in the selected language.

  1. From the Epi Info main menu, select Settings > Choose Language. The Select a Language dialog box opens.

  2. Select a language from the list of installed languages.

  • If the language installed is a non-western language, such as Russian or Chinese, the Regional Settings must be changed.


Merge Language Tables

The Merge Language Translation Utility creates a new language column in the Language.mdb allowing for a faster and easier translation process. The Merge Utility allows an existing translation of the Language.mdb to update a newly distributed Language.mdb containing updates to the application.

For example, if your local language is Spanish, your current Language.mdb includes English and Spanish columns. The newly distributed Language.mdb includes the English column only. The Merge Language Translation Utility allows you to merge the contents of the Spanish column from the translated Language.mdb to the new Language.mdb for those matched English phrases in each table.

  1. From the Epi Info main menu, select Settings > Manage Translations. The TSETUP window opens.

  2. From the Merge Translation Language section, click Merge. The Merge Table dialog box displays.

Merge Table dialog box

  3. In the Language Name field, type your local language.

  4. In the Source Language.mdb field, type the path and file name of the new Language.mdb for the current version or click the Browse button to locate the file. This file will usually be in C:\Epi_Info\English\Language.mdb and will contain a column for English only.

  5. In the Destination of Merged Language.mdb field, type the path and file name of the location for your merged language database or click the Browse button to locate a folder to put the file in.

  6. Click Merge to merge the contents of the tables. The status bar will display the process until it is completed.

  7. Use Microsoft Access to translate the phrases that are blank in the column for your language.


Create a Translation File

Translated files for distribution to other users of Epi Info must be compressed into an executable (EXE) file accessible by the TSETUP program. A program called SFX is provided with Epi Info that can be used to create an EXE file. The compressed EXE file should be given the name of the language it contains, for example Chinese, and the file should be placed in the same directory with TSETUP. A translation of TSETUP.EXE itself can be provided by translators for end users, if needed. Any language name of eight characters or less is acceptable, and may be substituted for Chinese in the following examples. In file names, case is not important, so .EXE is equivalent to .exe, and they may be used interchangeably.

Translate Epi Info

Use the TSETUP program to create a subdirectory in the Epi_Info folder and name it for the language being translated. For example c:\Epi_Info\Chinese.

  1. From the Epi Info main menu, select Settings > Manage Translations. The TSETUP window opens.

  2. From the Create Language Folder section, click Create. The Create a New Language File dialog box opens.

  3. Enter the name of the new language file to be created. For example, Chinese.

  4. Click OK. The new language file has been created and can be accessed from the Epi_Info folder.

  • Create a subdirectory for any translated help files by creating a folder called Help inside the language folder

  • Do not place the translation in the LANGUAGE.MDB located in the c:\Epi_Info\ENGLISH directory. The structure described above, with separate directories for each language, has many advantages and allows translators in various parts of the world to distribute language modules independently. In this way, revisions can be made for any language without disturbing other translations.

  5. Using Visualize Data or Microsoft Access, open the copied LANGUAGE.MDB from the new language folder.

  6. Translate the program by placing the translated text for the English phrases in the new language column in the same record in the database.

  • If no translation is needed for a particular phrase, leave the item blank, and the English defaults are used. This behavior is useful for single characters or symbols.

  7. Save the translation.

Create the Translated EXE

SFX is the compression program which resides in the c:\Epi_Info directory and is accessible through the TSETUP window. In this example, a translation ‘.EXE’ for the language Chinese is being created.

  1. Verify that all translation files to be compiled are located in the proper directories. For example c:\Epi_Info\Chinese and c:\Epi_Info\Chinese\Help.

  2. From the Epi Info main menu, select Settings > Manage Translations. The TSETUP window opens.

  3. From the Create Language Executable section, click Compress. The Make Self-Extractor dialog box opens.

Make Self-Extractor dialog box

  4. In the Self-Extractor .exe Name field, enter a name for the self-extracting file. Do not include .EXE in the file name.

  5. In the Folder Location for Compression field, type the file name of the folder containing the files to be included in the .exe or click the Browse button to locate the folder.

  • Include the sfx.ini file in the folder for a better quality extraction.

  • If using TSETUP, the sfx.ini file must be included in the .EXE file.

  6. Click OK. The process is completed.

Not for Distribution Translations

To create a translation for personal use and not for distribution, an ‘.EXE’ does not have to be created. After the translation is complete, set the LANGUAGE variable in the Epi Info.INI file and choose the new language from the menu.

  1. From the Epi Info main menu, select Settings > Manage Translations. The TSETUP window opens.

  2. In the Create Language Folder section, click Create. The Create a New Language File dialog box opens.

  3. Enter the name of the new language file to be created. For example, Chinese.

  4. Click OK. The new language file has been created and can be accessed from the Epi_Info folder.

  • Create a subdirectory for any translated help files by creating a folder called Help inside the language folder. For example c:\Epi_Info\Chinese\Help.

  • Do not place the translation in the LANGUAGE.MDB located in the c:\Epi_Info\ENGLISH directory. The structure described above, with separate directories for each language, has many advantages and allows translators in various parts of the world to distribute language modules independently. In this way, revisions can be made for any language without disturbing other translations.

  5. Using Visualize Data or Microsoft Access, open the copied LANGUAGE.MDB from the new language folder.

  6. Translate the program by placing the translated text for the English phrases in the new language column in the same record in the database.

  7. If no translation is needed for a particular phrase, leave the item blank, and the English defaults are used. This behavior is useful for single characters or symbols.

  8. Save the translation.

  9. Download the Epi Graph DLL for the language and place it in the new folder.

  10. Open the EPIINFO.INI file located in the Epi_Info folder.

  11. In the Translation section of the code, add the new language. For example, LANG3=CHINESE.

  12. Save the .INI file.

  13. From the Epi Info main menu, select Settings > Choose Language. The Select a Language dialog box opens.

  14. Select the new language.

  • If the language is non-western, the Regional Options must be changed for the translation to function properly.


Create a Help File Translation

The Epi Info help files are HTML files compiled into a compiled html (.CHM) format file using Robohelp. The CHM file can be decompiled into HTML files and translated using a free tool from Microsoft called HTML Help Workshop. It can be downloaded from Microsoft's HTML Help Workshop website. The file EIHELP.CHM is most likely found in C:\Epi_Info\English\Help directory. The file EpiInfoHelp.hhp is also required by the HTML Help Workshop. This file is provided in the Epi Info install directory usually C:\Epi_Info\English\Help.

  1. Select File > Decompile and decompile the EIHELP.CHM into a new folder.

  2. Copy the EpiInfoHelp.hhp file and paste it into the same folder as the decompiled content.

  3. Select File > Open. Then, select the EpiInfoHelp.hhp file.

  4. Translate the HTML files and the Table of Contents names.

  • Do not change the HTML file names.

  5. From the project panel, open Options.

  6. Set the options for the translated compile.

  • From the Files tab, delete the contents of the Full Text Search Stop List File field.

  • From the Compiler tab, remove the check for Create a Binary Table of Contents (TOC).

  • HTML Workshop does not allow edits to the glossary file (EpiInfoHelp.glo). However, the glossary file can be edited using Notepad. Do not change the file structure.

  7. Select File > Compile to create a translated CHM file.

  • Place the translated EIHELP.CHM in the proper language directory, for example C:\Epi_Info\CHINESE\HELP.


Change Regional Language Options

If the language installed is a non-western language, such as Russian or Chinese, the Regional Settings must be changed. Epi Info is programmed to set its default font to that of the computer on which the program is running. Epi Info is capable of displaying Unicode, the two-character code used for Chinese and other languages for which ASCII is not adequate. Arabic, Hebrew, and other right-to-left languages should display properly on computers that have this feature included in the Windows operating system.

Change Regional Options in Windows 2000

  1. From the Start menu, select Settings > Control Panel.

  2. Double click Regional Options.

  3. From the Select Language Setting for the System drop-down list, change the selected language.

  4. If the language needed is not listed, click Advanced and select from the Code Page Conversion Tables.

  5. Click Apply.

  6. Close the Regional Options dialog box.

  7. Restart the computer.

Change Regional Options in Windows XP

  1. From Start, select Control Panel.

  2. Double click Regional and Language Options.

  3. From the Advanced tab, select a language from Language for Non-Unicode Program drop-down list.

  4. If the needed language is not on the list, select the language from the Code Page Conversion Tables.

  5. From the Regional Options tab, change the Standards and Formats to match the language selection.

  6. Click Apply.

  7. Close the Regional and Language Options dialog box.

  8. Restart the computer.


Introduction to NutStat

NutStat is a program for recording and evaluating measurements of length, stature, weight, head circumference, and arm circumference for children and adolescents. It can be run as a standalone program or linked to an Epi Info View using MakeView. NutStat calculates percentiles, number of standard deviations from the mean (Z-scores), and in some cases, percent of median, using the following references:

  • The sex-specific 1978 CDC/WHO normalized version of the 1977 NCHS reference curves for height-for-age, weight-for-age, and weight-for-height. (Reference DibleyMJ, GoldsbyJB, Staehling NW, Trowbridge FL. Development of normalized curves for the international growth reference: historical and technical considerations. Am JClinNutr 1987;46:736-48.)

  • WHO reference data for arm circumference-for-age (Reference De OnisM, Yip R, Mei Z. The development of MUAC-for-age reference data recommended by a WHO expert committee. Bull WHO 1997;75:11-18.) and arm circumference-for-height. (Reference Mei Z, Grummer-StrawnLM, de OnisM, Yip R. The development of a MUAC-for-height reference, including a comparison to other nutritional status screening indicators. Bull WHO 1997;75:333-342.)

  • The sex-specific 2000 CDC reference curves for head circumference-for-age, length-for-age, weight-for-length, weight-for-age, stature-for-age, weight-for-stature, and body mass index-for-age. (Reference KuczmarskiRJ, Ogden, CL, Grummer-Strawn, LM et al. CDC growth charts: United States. Advance data from vital and health statistics; no. 314. Hyattsville, Maryland: National Center for Health Statistics. 2000.)

NutStat can use English or Metric units to perform calculations with the desired reference data set. Measurements entered in NutStat are automatically stored in a Microsoft Access database and can be retrieved by patient name or identification number. Data from one person or from the entire population can be displayed graphically in several formats. NutStat databases can be read by the Analysis program where summary tables, lists, frequencies, graphs, and complex data manipulations can be performed.

Existing data in Microsoft Access files can be imported to produce a standard NutStat database with selected anthropometric statistics. An Add Statistics feature adds the results of calculations to external Microsoft Access data files that are not necessarily in the NutStat format. The Data Reporter feature allows customization and generation of reports.


Navigate NutStat

The NutStat program is divided into three working sections separated by frames. When opening a previously created table in NutStat, you will be prompted to update tables to the latest version of the application. Tables created using the MakeView relate option can only be opened and data entered using the Enter application. Related tables can be imported using the NutStat Import, if needed.

The Date of Measurement frame displays data associated with a set of measurements on a single date. Individuals can have many measurements on different dates. Navigation arrows in this frame navigate to the other measurements for the current ID Number.

The Results frame contains the calculated statistics for the current measurements. Statistics are calculated upon exit from the relevant data fields.

The ID Number frame corresponds to the records for a single person. Navigation buttons on this frame navigate through the individual IDs in the table and allows for the creation of a new record. The ID Number frame contains the Graph, Grid, and Find options.

  • Graph opens the Customize Anthropometric Data window and allows graph settings to be selected and viewed. The format of the graph is determined by the selections made on the Graph tab of the Customize Anthropometric Data dialog box.

  • Grid displays all of the measurements for a single person in grid format. Values can be viewed, but not edited in the grid. Double clicking a record in the grid closes the Grid window and loads the record into NutStat.

  • Find provides a method of searching for records based on ID Number, First Name, Last Name, Birth Date, Measurement Date or any combination. Results of a search display in a grid. Double clicking a record in the grid closes the Find dialog box and loads the record into NutStat. The ID Number, First Name, and Last Name fields accept wild card characters as part of searches.

  • Delete removes the current measurement date and data. If the measurement date is the only one associated with the current ID Number, the ID Number and data are also deleted. The records are deleted from the table and not just marked for deletion, as in other Epi Info programs. The Delete button is disabled as a NutStat default. To include the Delete button in the program, select Tools > Options > Display and select the Enable Delete checkbox.

  • NutStat menus provide additional functionality within the NutStat application.


Interpretation and Uses of Anthropometry

Anthropometry is used to assess nutritional status at both the individual and the population level. Ideally, children should have several anthropometric measurements over time. A decline in an individual's anthropometric index from one point in time to another could be an indication of illness or nutritional deficiency that may result in serious health outcomes. In some situations, a single set of measurements may be used for screening populations or individuals to identify abnormal nutritional status and priority for treatment.

To calculate anthropometric indices, information is needed on each individual's sex, age, weight, height, head circumference, or arm circumference. From this data it is possible to form different indices, including those that relate to height-for-age (HA), weight-for-age (WA), weight-for-height (WH), head circumference-for-age (HCA), body mass index-for-age (BMIA), mid upper arm circumference-for-age (MUACA) and mid upper arm circumference-for-height (MUACH). These indices can be expressed in terms of Z-scores, percentiles, and percent of median relative to the selected reference population.

At the population level, the prevalence of low or high anthropometric indices can be assessed by determining the proportion of the population that falls below a cutoff value in a reference population. In addition, the mean or median anthropometric value of a population can be compared with the reference value to assess the status of the study population relative to the reference population.

The preferred anthropometric indices for determining nutritional status are weight-for-height, height-for-age and BMI-for-age, as these discriminate between different physiological and biological processes. (References WHO working group. Use and interpretation of anthropometric indicators of nutritional status. Bull WHO 1986;64:929-41. GorsteinJ, SullivanK, Yip R, de OnisM, Trowbridge F, Fajans P, ClugstonG. Issues in the assessment of nutrition status using anthropometry. Bull WHO 1994;72(2):273-83.)

Low weight-for-height or BMI-for-age is considered an indicator of acute under-nutrition (thinness or wasting) and is generally associated with failure to gain weight or a loss of weight. Low height-for-age is considered an indicator of chronic under-nutrition (shortness or stunting), which is frequently associated with poor overall economic conditions or repeated exposure to adverse conditions or both. BMI-for-age is also used to assess overweight and at risk for overweight. Weight-for-age is primarily a composite of weight-for-height and height-for-age, and fails to distinguish tall, thin children from short, well-proportioned children.

The distribution of the indices can be expressed in terms of Z-scores, (Reference DibleyMJ, StaehlingN, Nieburg P, Trowbridge FL. Interpretation of Z-score anthropometric indicators derived from the international growth reference. Am JClinNutr 1987;46:749-62.) percentiles, and percent of median. Z-scores, also referred to as standard deviation (SD) units, are frequently used. The Z-score in the reference population has a normal distribution with a mean of zero and standard deviation of 1. For example, if a study population has a mean WHZ of 0, this indicates that it has the same median WH as the reference population. The Z-score cutoff point recommended by WHO, CDC, and others to classify low anthropometric levels is 2 SD units below the reference median for the three indices. The proportion of the population that falls below a Z-score of -2 is generally compared with the reference population in which 2.3% fall below this cutoff. The cutoff for very low anthropometric levels is usually more than 3 SD units below the median.

Percentiles, or centiles, range from zero to 100, with the 50th percentile representing the median of the reference population. Cutoff points for low anthropometric results are generally <10th percentile, < 5th percentile or < 3rd percentile. In the reference population, 5% of the population falls below the 5th percentile; compare this with the proportion that falls below this cutoff point in the study population. Cutoff points for risk of overweight and overweight are >=85th to <95th percentiles and >=95th percentile of BMI-for-age. In the reference population, 10% and 5% of the population fall within or above these cutoff points, respectively.

The calculation of the percent of median does not take into account the distribution of the reference population around the median. Therefore, interpretation of the percent of median is not consistent across age and height levels or across the different anthropometric indices. (Reference WHO working group. Use and interpretation of anthropometric indicators of nutritional status. Bull WHO 1986;64:929-41.)

Traditionally, in the United States and some other countries, percentiles are more commonly used. In other parts of the world, either Z-scores or percent of median are more frequently used. WHO favors the use of z-scores. (Reference WHO working group. Use and interpretation of anthropometric indicators of nutritional status. Bull WHO 1986;64:929-41. GorsteinJ, SullivanK, Yip R, de OnisM, Trowbridge F, Fajans P, ClugstonG. Issues in the assessment of nutrition status using anthropometry. Bull WHO 1994;72(2):273-83.)

Z-scores and percentiles are directly related. Both rely on the fitted distributions of the indices across age and height values and are consistent in their interpretation across anthropometric indices. Z-scores are useful because they have the statistical property of being normally distributed, thus allowing a meaningful average and standard deviation for a population to be calculated. Percentiles are useful because they are easy to interpret (e.g., in the reference population 3% of the population falls below the 3rd percentile).

Other Sources

Division of Nutrition and Physical Activity

Center for Chronic Disease Prevention and Health Promotion

Centers for Disease Control and Prevention

4770 BufordHWY, NE MS K24

Atlanta, GA 30341-3717 U.S.A.

http://www.cdc.gov/nccdphp/dnpa/

or

Nutrition Unit

World Health Organization

1211 Geneva 27

Switzerland

http://www.wpro.who.int/health_topics/nutrition/


1978 CDC/WHO Growth Reference Curves

The anthropometric calculations using the 1978 CDC/WHO growth reference curves are a normalized version of the 1977 National Center for Health Statistics (NCHS) growth reference curves developed using data from the Fels Research Institute and US Health Examination Surveys. (Reference Dibley MJ, GoldsbyJB, Staehling NW, Trowbridge, FL. Development of normalized curves for the international growth reference: historical and technical considerations. Am JClinNutr 1987;46:736-48.) These normalized growth curves are recommended by the World Health Organization (WHO) for international use. (Reference WHO working group. Use and interpretation of anthropometric indicators of nutritional status. Bull WHO 1986;64:929-41.)

Calculating HA and WA

HA and WA indices can be calculated for individuals from birth up to 18 years of age. WH indices are calculated for males to 138 months (11.5 years) of age and less than 145 cm (57 inches) and for females to 120 months (10 years) of age and less than 137 cm (53 inches). WH cannot be calculated for children less than 49 cm (19.3 inches). For children less than 2 years of age, recumbent (i.e., lying down) length measurements are assumed; for children 2 years of age and older, height refers to standing height.

No anthropometric indices are calculated if sex is unknown or miscoded because there are separate growth reference curves for males and females. If weight is unknown, only HA is calculated; if height is unknown, only WA is calculated; and if age is unknown, only WH is calculated. When age is unknown, children shorter than 85 centimeters are assumed to be less than 2 years of age; otherwise, WH is calculated with the assumption that the child is 2 years of age or older.


2000 CDC Growth Reference Curves

The 2000 CDC growth charts are intended to replace the 1977 NCHS growth charts for the United States (KuczmarskiRJ, Ogden, CL, Grummer-Strawn, LM et al. CDC growth charts: United States. Advance data from vital and health statistics; no. 314. Hyattsville, Maryland: National Center for Health Statistics. 2000). They consist of sex-specific charts for infants, birth to age 36 months (length-for-age, weight-for-length, weight-for-age, and head circumference-for-age) and older children, 2 to 20 years (stature-for-age, weight-for-age and BMI-for-age). Additionally, sex-specific weight-for-stature charts are included for children 77 to 121 centimeters in stature.

The 2000 CDC charts are based primarily on US National Health Examination (NHES) and National Health and Nutrition Examination Surveys (NHANES) data. Supplemental data include the US National distribution of birth weights, birth lengths, and weight-for-lengths from the states of Wisconsin and Missouri, head circumference at birth from the Fels Research Institute, and length data from a select subset of the CDC Pediatric Nutrition Surveillance System (PedNSS) for 0.5 to 4.5 months of age. Two substantial exclusions were made. First, all weight data from NHANES III for children 6 years and above were excluded from the weight-for-age, weight-for-stature, and BMI-for-age charts. Second, all very low birth weight infants (<1500 grams) were excluded from the infant charts.

For more information about the 2000 CDC growth charts, visit http://www.cdc.gov/growthcharts.


NutStat Flags

The Flag feature of NutStat reminds you to double check data when it falls in a too low or too high range. Flags are created when using the 1978 CDC/WHO reference or the CDC 2000 reference; however, they are indicated differently.

2000 CDC Flags

Four flags are defined by CDC for the CDC 2000 reference. Flags are indicated separately by height-for-age, weight-for-age, weight-for-height, and BMI-for-age. Flags appear if the Z-score and Flag option are selected from the Tools > Options menu.

Flag Code | Notes and Interpretation
0 (OK) | No indices flagged - None of the indices were flagged. Acceptable or normal range.
1 (L) | Too low range. Red flag indicator.
2 (H) | Too high range. Red flag indicator.

1978 CDC/WHO Flags

When the 1978 WHO/CDC reference is used, the percentile, Z-score, and median values are calculated and records are flagged with a 0 to 7 code. For Z-scores, a code of 9.99 indicates that the index could not be calculated because of missing data or data values out of the appropriate range. An example of the latter would be an age of 18 years or older if using the WHO reference or 20 years or older if using the CDC reference. A code of 9.98 for Z-scores denotes that the Z-score was greater than or equal to 9.98 and most likely indicates an error in measurement. For percentiles and percent of median, a similar coding scheme is used (99.9 and 99.8 for percentiles and 999.9 and 999.8 for percent of median).

The record Flag field, is used to identify records where there are missing data points or a strong likelihood that some of the data items are incorrect (based on extreme Z-scores). The criteria for flagging an anthropometric index are as follows:

Index | Minimum | Maximum
HAZ | -6.00 | +6.00
WHZ | -4.00 | +6.00
WAZ | -6.00 | +6.00

Two additional criteria for flagging a record are combinations of data items:

(HAZ > 3.09 and WHZ < -3.09) or (HAZ < -3.09 and WHZ > 3.09)

It is recommended that all flagged records be verified for accuracy. Common errors include incorrect data entry, incorrect age/dates, weight or height measurements entered incorrectly or in the wrong units, and missing/blank data. When anthropometric data are analyzed in the Epi Info Analysis module or elsewhere, it is recommended that certain indices be set to missing (and therefore excluded from analyses) based on the coding in the Flag field. When a Z-score is flagged, the corresponding percentiles and percent-of-median values are also flagged.

1978 CDC/WHO Record Flag Coding Scheme

Flag Code | Index Flagged |  |  | Notes and Interpretation
 | HAZ | WHZ | WAZ
0 |  |  |  | No indices flagged - None of the indices were flagged. However, this does not necessarily mean the information is correct. Either sex, age, weight, or height could be incorrect but not extreme enough to be flagged.
1 | Y |  |  | Only HAZ flagged - HA is flagged but not WH or WA. This could be an extremely short or tall individual. Assure that the height information entered onto the computer file is correct. If height is incorrect, then WHZ would generally be close to -3.09 or 3.09 (a WHZ value beyond these would produce a flag error number 5). The alternative is that the age information is incorrect, which would make the WAZ extreme (near -6 or 6).
2 |  | Y |  | Only WHZ flagged - WH is flagged but HA and WA are not. First, check the age and height of the child and make sure they are within the limits described above. If the child is within the age and height limitations, then either height or weight may be incorrect. If height is incorrect, then HAZ would be expected to be near an extreme value (but not extreme enough to be flagged), and if weight is incorrect, then WAZ would be close to an extreme value (but not extreme enough to be flagged). This could truly be an extremely thin or obese child.
3 | Y | Y |  | Both HAZ and WHZ flagged - HA and WH are both flagged but WA is not. This is indicates that height may be incorrect or missing.
4 |  |  | Y | Only WAZ flagged - WA is flagged but not HA or WH. If the weight is incorrect, then WHZ would be near an extreme value (but not extreme enough to be flagged), and if age is incorrect, then HAZ is likely to be near an extreme value (but not extreme enough to be flagged).
5 | Y |  | Y | Both HAZ and WAZ flagged - HA and WA are flagged but not WH. This indicates that the age information is incorrect, missing, or out of range.
6 |  | Y | Y | Both WHZ and WAZ flagged - WH and WA are flagged but not HA. This indicates that weight is likely to be incorrect or missing.
7 | Y | Y | Y | All three indices flagged - All three indices are flagged. This occurs if sex is unknown or incorrectly coded; or at least two of the following are missing, incorrectly coded, or beyond the limitation of the growth curve: age, weight, or height.

Y=Index flagged, blank means index not flagged.

Interpretation of the flags is as follows:

The outlier cutoffs defined for the 1978 CDC/WHO reference could theoretically be applied to the 2000 CDC growth charts. However, there is an important difference between the two charts that must be accounted for. Whereas the Z-scores in the 1978 charts were based on a fixed standard deviation value above and below the median, the 2000 charts allow for a changing standard deviation to account for the skewness of the distributions. Put differently, the 1978 charts were based on an additive model, but the 2000 charts are based on a multiplicative model (using the LMS methodology). (Cole,TJ (1990): The LMS method for constructing normalized growth standards. Eur. J. Clin. Nutr. 44, 45-60.)

While the LMS model captures the distribution of height, weight and head circumference fairly accurately for measurements that actually occur in the data, its projection into the extreme tails of the distribution can be problematic. For highly skewed indices, such as the weight of older children, there comes a point at which high Z-scores become undefined. The problem is simply that the consequence of using a box-cox transformation to account for skewness has the unintended effect of mapping all high values to essentially the same (plausible) Z-score.

For example, consider trying to establish an upper limit for the weight of 17-year old girls. The LMS parameters of weight-for-age in this group are: L= -1.838091576, M= 55.18216811, and S= 0.161752634. To set the cutpoints for outliers, exclude measurements beyond +5.0 Z-scores. Using the equation: C = M (1 + LSZ)**(1/L) and compute the quantity 1 + LSZ = 1+ (-1.8381 * 0.1618 * 5.0) = -0.4870. Since this is a negative value, it is impossible to raise it to the power of 1/L. Thus, the weight corresponding to a +5.0 z-score cannot be computed. In fact, the +4.0 z-score is similarly not calculable.

Alternatively, one can observe the problem in calculating the Z-score for a specific measurement. Consider a 17-year-old girl who weighs 150 kilograms (clearly overweight, but not an unreasonable weight). Her Z-score would be calculated as +2.83. But suppose that her data were inadvertently entered in the computer as 1500 kilos (a clearly impossible value). Her Z-score would not be remarkably different (+3.36) and the value would not be identified as an outlier using the WHO cut-offs.


NutStat Calculations

NutStat uses the following input data to calculate anthropometric indices. English or metric units may be used.

  • Sex– Coded as 1/M/m for males, 2/F/f for females

  • Age (in months or years) or Birth Date and Date of Measurement

  • Weight– If using the CDC/WHO 1978 reference, recumbent length is assumed from birth to age 24 months and standing height 24 months and older; if using the 2000 CDC reference, recumbent length can be used from birth to age 36 months and standing height from age 2 to 20 years. For the overlap period of 24 to 36 months, specify if the measurements are recumbent length or standing height.

  • Height

  • Head Circumference

  • Mid Upper Arm Circumference (MUAC)

NutStat performs calculations and returns the following values:

 | Percentiles | Z-scores | Percent of Median
Height-for-Age | HAP | HAZ | HAM
Weight-for-Height | WHP | WHZ | WHM
Weight-for-Age | WAP | WAZ | WAM
BMI-for_Age** | BMIP | BMIZ | --
Head circumference-for-Age** | HCP | HCZ | --
MUAC-for-Age | -- | MUACAZ | --
MUAC-for-Height | -- | MUACAZ | --

*If using the CDC/WHO 1978 reference

**If using the CDC 2000 reference

Each of the variables created has a prefix (CDC or WHO) indicating which reference was used.


Calculated Age

When possible, it is always preferable to have age calculated from the birth date and the date of the measurement(s). The reference curves are based on "biologic" age rather than calendar age. Biologic age in months divides the year into 12 equal segments as opposed to calendar age in which months have from 28 to 31 days. Although this makes little difference in older children, it can have an effect on the anthropometric calculations for infants. To calculate biologic age, the program calculates the number of days between the two dates. The age in days is divided by 365.25 and then multiplied by 12. Entering age by rounding to the nearest month and/or the most recently attained month can have a substantial effect on the anthropometric calculations, especially for infants. (Reference GorsteinJ. Assessment of nutritional status: effects of different methods to determine age on the classification of undernutrition. Bull WHO 1989;67:143-50.)


NutStat Variable Names

Anthropometric Variables | EPI 6 VARIABLE NAMES | Epi Info 2000 v1.1.2 and later WHO 1977 VARIABLE NAMES | Older Epi Info 2000 versions prior to 1.1.2 NCHS/CDC 2000 (Variable Names for Reference Only) | Epi Info 2000 v 1.1.2 and later CDC 2000 VARIABLE NAMES
Height-for-Age Centile | HAP | fldWHOHAC | fldNCHSHAC | fldCDCHAC
Stature-for-Age Centile |  |  |  | fldCDCSAC
Height-for-Age Z-Score | HAZ | fldWHOHAZ | fldNCHSHAZ | fldCDCHAZ
Stature-for-Age Z-Score |  |  |  | fldCDCSAZ
Height-for-Age Percent of Median | HAM | fldWHOHAPM |  |
Weight-for-Age Centile | WAP | fldWHOWAC | fldNCHSWAC | fldCDCWAC
Weight-for-Age Z-Score | WAZ | fldWHOWAZ | fldNCHSWAZ | fldCDCWAZ
Weight-for-Age Percent of Median | WAM | fldWHOWAPM |  |
Weight-for-Height Centile | WHP | fldWHOWHC | fldNCHSWHC | fldCDCWHC
Weight-for-Stature Centile |  |  |  | fldCDCWSC
Weight-for-Height Z-Score | WHZ | fldWHOWHZ | fldNCHSWHZ | fldCDCWHZ
Weight-for-Stature Centile |  |  |  | fldCDCWSZ
Weight-for-Height Percent of Median | WHM | fldWHOWHPM |  |
Record Flag for extreme of Missing Information | FLAG | fldCDCFLAG | fldNCHSFLAG | fldWHOFlag
Head Circumference-for-Age Percentile |  |  | fldHCircumC | fldHCircumC
Head Circumference-for-Age Z-Score |  |  | fldHCircumZ | fldHCircumZ
Body Mass Index-for-Age |  | fldBMI | fldBMI | fldBMI
Body Mass Index-for-Age Percentile |  | fldBMIC | fldBMIC | fldBMIC
Body Mass Index-for-Age Z-Score |  | fldBMIZ | fldBMIZ | fldBMIZ
Height-for-Age |  |  |  | fldCDCHAFlag
Weight-for-Age |  |  |  | fldCDCWAFlag
Weight-for-Height |  |  |  | fldCDCWHFlag
BMI-for-Age |  |  |  | fldCDCBMIFlag


Customize Anthropometric Data

  1. From the NutStat window, select Tools > Options from the menu. The Customize Anthropometric Data dialog box opens.

  2. Use the Display tab to select a Reference, Enable the Delete button, and select a combination of Data Entry Fields, Results, and Statistics to use for collecting nutrition data.

  • Fields can be added or removed from the NutStat window by selecting the checkbox box next to the field names.

  • If the Reference is changed, the NutStat offers to update all of the existing records with statistics calculated to the newly selected reference.

  • WHO/CDC 1978 and CDC 2000 statistics are stored in separate fields in the data table so that statistics calculated with one reference do not replace statistics calculated with the other reference.

  • Only two statistics can be selected at a time.

  3. Use the Units tab to switch between Metric, English, and User Customized units for data entry fields.

  • Units also allows the selection of date and age field formats.

  4. Use the Graph tab to select a Graph Type, select the ID Numbers or genders to graph, and select the graph units.

  • If a graph is dependent on data from a field that is displayed, the graph type is not included in the list box.


Graph NutStat Data

  1. Click Graph from the NutStat window or open the Graph tab from the Tools > Options > Customize Anthropometric Data dialog box.

  2. Use the Graph tab to select a Graph Type.

  • If a graph is dependent on data from a field that is displayed, the graph type is not included in the list box.

  3. Select the Current ID No. or Genders to graph.

  4. Select the Graph Units.

NutStat Graph tab

  5. Click OK. The graph opens in Epi Chart.

NutStat Graph in Epi Chart

  • Graphs can be further customized, printed, or exported from the Epi Chart Menu.


Use External Data Features

NutStat contains two features for dealing with external data, Import and Add Statistics. The Add Statistics feature adds statistical data to an existing table. The Import feature imports data from an existing table into a new table that has the data structure required by NutStat. The table can be an Epi Info table or a table from Microsoft Access.

Use Import

  1. Select File > External Data > Import. The Database Name dialog box opens.

  2. Locate and select the .mdb to import.

  3. Click Open. The Select a Table list box opens.

  4. Select a table to import and click OK. The Import Table dialog box opens.

  5. Use the Browse button to locate an existing or create a new Output Database.

  6. Type a table name in the Output Table field.

  • If Reference Settings need to be changed, close the Import window and access the Tools > Options menu.

  7. From the Select Fields to Use section, select individual Input Fields.

  • For some field types, a Units dialog box may appear and require the selection of a unit of measurement for the selected field.

  • Sex is a required field. Other field types are required if a statistic is dependent on the field. The sex field must appear as a 1/2 (1 should be male), M/F or Male/Female. If the sex field is not identified as one of these two, the field or the data is not be recognized.

  8. From the Field Type list box, select the corresponding field and click Link.

  • Required table fields are indicated with an asterisk.

  • To cancel a link, select the row from the Linked Fields section and click Unlink.

  • Be sure to link all necessary fields.

NutStat Import Table

  9. Click Process to create the new table.

  • If an ID number is not linked, a unique ID number will be created for each record by the application.

  • Any errors discovered are included in a report that can be viewed in WordPad or Notepad.

  10. Click Exit to close the Import Table dialog box.

  11. Select File > Open Table from the NutStat window to view the imported table.

Use Add Statistics

  1. Select File > External Data > Add Statistics. The Add Anthropometric Statistics dialog box opens.

  • If Reference Settings need to be changed, close the Import window and access the Tools > Options menu.

  2. From the Select Fields to Use section, select individual Input Fields.

  • For some field types, a Units dialog box may appear and require the selection of a unit of measurement for the selected field.

  3. From the Field Type list box, select the corresponding field and click Link.

  • To cancel a link, select the row from the Linked Fields section and click Unlink.

  • Sex is a required field. Other field types are required if a statistic is dependent on the field. The sex field must appear as a 1/2 (1 should be male), M/F or Male/Female. If the sex field is not identified as one of these two, the field or the data is not be recognized.

  • When linking the height field using the CDC 2000 reference, a dialog box appears prompting for the measurement type. Select the method used to measure the subject. The options are Stature (subject was standing), Length (recumbent) or Stature and Length. Stature and Length should be selected if the field contains both Stature and Length measurements. If the source table has both a Stature field and a Length field, then the Add Statistics process must be run twice to add statistics for both measurements. If Add Statistics is run twice, once for length and then again using the file with the length calculations generated in the first run, the final output file contains calculations for both length and stature.

  • Statistics checkboxes activate based on the fields selected and linked. The check boxes are only enabled if the required field types for the statistics have been linked. Hover the mouse pointer above a check box to display a tool tip listing the field types required for the respective statistic.

  4. Select individual statistics or click Select All to include all active statistics.

Add Anthropometric Statistics

  5. Click Process to create the new table.

  6. Click Exit to close the Add Anthropometric Statistics dialog box.


Generate a NutStat Report

Reports are generated using the Videosoft Data Reporter feature.

  1. From the NutStat menu, select Tools > Generate Report. The Report Generator - Source dialog box opens.

  • Click Browse to locate and select a new report template.

  • Click Change to open the Data Source dialog box and create filters for the report data. Data can be selected based on ID numbers, Birth Dates, or Measurement Dates. Select the filter criteria and click Test to view the records. Click OK to accept the filter.

Report Data Source

  2. From the Report Generator - Source dialog box, click OK. The VideoSoft Data Reporter window opens to the report template.

  3. Use the VideoSoft Data Reporter menus and toolbar to customize the report.

  4. Print or Save the report as needed.

  5. Close the VideoSoft Data Reporter to return to the NutStat application.


Import Non-Access Files Using Analysis

Data and statistics that will be used in NutStat must be converted into Microsoft Access files with an extension of .mdb. The Epi Info Analysis program can be used to convert files into the Access format. First, use the READ command to import the file and then use the WRITE command to create the new file with the needed extension.

  • Use the READ command to import the file into Analysis. The READ command can be used to import 24 different file types including .dbf, .xls, and .txt file types.

  • Use the WRITE command to create a new .mdb file.

Once files are converted to the .mdb format the NutStat External Features of Import or Add Statistics can be used to open the file in NutStat.


NutStat and Views

NutStat can be run from within an Epi Info View as though it is a related table. NutStat can also be accessed from a View by creating a button. To protect data entered, NutStat tables created in Make View can only be opened using the Enter module. They can be imported into NutStat, if needed. The option to link to existing NutStat data tables is not supported. NutStat will only provide links to newly created tables.

How to Create a Related View

For example, a relationship and a button called Growth could be created in a View. The relationship criteria could be set so that it becomes active under certain conditions, such as an age value between 0 and 20 years, since the calculations in NutStat are limited to this age group. When the Growth button is clicked during data entry (Enter program), the related NutStat table opens.


Use NutStat Find

  1. To locate a specific record, click Find from the NutStat application or select Edit > Find from the menu. The Find dialog box opens.

  2. Enter search criteria based on a ID Name or Date.

  3. Click Find Now to view the search results in a grid.

  4. Double click a record from the grid to load it into NutStat.

  • If search criteria is entered on the ID Name and Date tabs, both sets of criteria are used in the search.

Wild Card Search Criteria

* Matches any number of characters

! Matches any single character

# Matches any single digit

[] Matches and single character within the brackets

[!] Matches any character not within the brackets

[-] Matches any one of a range of characters


Print from NutStat

NutStat stores printed formats in template files. The File > Print option prints the last selected template. Use File > Print Preview to view data and format prior to printing. Print Preview displays data associated with the current ID Number.

  • From the Print Preview window, select Print Setup to select a printer and print options.

  • From the Print Preview window, select Customize to change document options.

  • Use the General tab to control the Header and Footer text. The Patient Information list box displays all of the checked items directly below the Header information. An image can be added by entering the path name of a bitmap, icon, or Windows metafile name in the Image File text box. The image displays in the upper right corner on the first page of the document. Image size can be adjusted by changing the value in the Image Size combo box. A text or rich text file with additional information can be appended to the document by entering the path name of the file Additional Information File.

  • Use the Graphs tab to place graphs in a document. A title or description can be added to a graph by selecting it from the list and adding the title and/or description in the Graph Title and Graph Description text boxes.

  • Use the Table tab to place tables in a document. Fields are added to the table by moving the field name from the Available Fields list to the Selected Fields list. The text entered in the Table Title field adds a title to the table.

  • Graphs and tables available for selection are dependent fields displayed from the NutStat window. For example, if Height is not displayed, the Weight for Height graph types are not available.

  • Click OK to save the settings to the default template. Use the Save or Save As options if multiple templates are desired.

  • Use navigation buttons to move through pages.


Epi Info Menu Overview

The Epi Info Menu module is customizable and can be used to create command buttons that execute the Epi Info tools or other programs, functions, images, and text. Because Menu can run DOS batch file commands, a series of operations, such as copying files for backup or transmission can be specified as a menu item or button.

The menu items and commands are listed in a text file with the extension .mnu. A Menu (.mnu) file can be created or edited in any word processor such as the WordPad program packaged with Windows. Menu (.mnu) files can also be created in Microsoft Word or Corel WordPerfect, but they must be saved as a text file with the .mnu file extension.

Menus are used by organizations that have many people entering or analyzing data and by those creating custom applications using Epi Info. By creating menu items or buttons, other programs or functions can be called from the Epi Info Menu module. Background pictures, buttons, and menus can be edited to create a theme or customized application.

More than one menu can be created to form a series of connected menus. Each menu can have a different background image, set of menu items and functions, and a language translation.


Create a New Menu

Menus can be created or edited from WordPad, Notepad or any other word processors. Menu allows for the creation and customization of a new menu. For new menus to be activated, a shortcut must be created that reads the menu and applies it to the Epi Info executable file. New menus must be saved with a unique name prior to editing rather than overwriting the installed EpiInfo.mnu file.

  1. From the Epi Info main menu, select Edit > Edit this Menu. The EpiInfo.mnu file opens in the WordPad program.

  2. From the WordPad menu, select File > Save As. The Save As dialog box opens.

  3. Save the original copy of EpiInfo.mnu with a new name. For example, ExampleMenu.mnu.

Tip! A common cause of problems in editing a .mnu file is that some word processors add an extra extension (.txt) when saving to a text file. For example, EpiInfo.mnu. may be saved as EpiInfo.mnu.txt. This will not happen if you enclose the name in quotes.

  4. Change the title for the menu frame by typing new text in the first line of the text file (menu). The default text is MENU EPI INFO.

  5. Add command blocks, buttons, or menu items as needed (see example below).

  • Items that are commented out of the code contain an asterisk (*) in front of each line of code.

  6. Select File > Save to keep changes made to the new menu file. Then, close the file.

  7. Right click on the desktop and select New > Shortcut. The Create Shortcut dialog box opens.

  8. Click Browse to locate the EpiInfo.exe file. The default installation folder is: C:\Epi_Info

  9. Once you locate the EpiInfo.exe file, type the path and file name of the new menu. For example, C:\Epi_Info\EpiInfo.exe C:\Epi_Info\ExampleMenu.mnu.

  10. Click Next. The Select a Title for the Program dialog box opens.

  11. Type a name for the shortcut.

  12. Click Finish. A new Epi Info icon appears on the desktop.

  13. Double click the new icon and Epi Info opens to the customized menu.


Create or Edit a Menu Item

The POPUP command creates a pull-down menu for the main page. You can create or edit menu items using the .mnu file.

  1. From the Epi Info main menu, select Edit > Edit this Menu. The EpiInfo.mnu file opens in WordPad.

  • It is recommended that the menu be saved with a new name prior to editing rather than overwriting the installed EpiInfo.mnu file.

  2. Create a pull-down menu by typing in the POPUP section. MENUITEMS are not active until the command blocks are added.

  • POPUP code blocks must have a Begin and End.

  • A menu entry is created on the POPUP menu within which the MENUITEM occurs. When the item is selected, the commands in the named Command Block are executed.

  • Enclose text that appears on the menu in quotes, followed by a comma, and then the command block name.

  • An ampersand (&) can be used to designate a single character hot key. Hot keys should be different for each item in a pop-up.

  • When the pull-down menu displays, the hot key letter appears with an underline. To activate the menu item, click and hold the ALT key + the hot key letter.

  3. Click Save. Changes are immediately reflected in the Epi Info menu.

  • In this example, the menu pop-up is called Programs. The letter P is a hot key which opens the initial pop-up menu.

  • The first menu item is called Exit. The command block is also called Exit.

  • The second menu item is called MYTEST. The command block is called Tester.

Epi Info Menu example


Create a Command Block

A command block is used to list the Menu commands that should run when a menu item is selected or a button is clicked.

  • A number of menu or DOS commands can be inserted between the Begin and End markers creating a command block.

  • If a command block is not named, the menu items and buttons are dormant.

  1. From the Epi Info main menu, select Edit > Edit this Menu. The EpiInfo.mnu file opens in WordPad.

  • It is recommended that the menu be saved with a new name prior to editing rather than overwriting the installed EpiInfo.mnu file. For more information, see the Create a New Menu topic.

  2. Locate the MENUITEM or BUTTON that needs a command. Note the command block name.

  • For example, in the code MENUITEM "E&xit", Exit; the text Exit is the command block name.

  3. Scroll to the place in the .mnu file where the commands for menu items or buttons are located.

  4. Type the command block name. For example, Tester.

  5. Type Begin.

  6. Type one or more commands to run when the item is selected or clicked. For example, Execute WordPad.Exe “EpiInfo.MNU.”

  7. Type End.

  8. Click Save. Changes are immediately reflected in the menu.

  • In this example, the command block is called Tester. When Tester is selected or clicked, the WordPad program opens the EpiInfo.mnu file.

Epi Info Menu example


Create or Edit Menu Buttons

The BUTTON command creates buttons on the menu. You can create or edit buttons using the .mnu file.

  1. From the Epi Info main menu, select Edit > Edit this Menu. The EpiInfo.mnu file opens in WordPad.

  • It is recommended that the menu be saved with a new name prior to editing rather than overwriting the installed EpiInfo.mnu file. For more information, see the Create a New Menu topic.

  2. Create a button by typing in the BUTTON section. BUTTONS are not active until the command blocks are added.

  • Code blocks must have a Begin and End.

  • Enclose text that appears on the button in quotes, followed by a comma, and then the command block name.

  • Specify a button location as a percentage of the window width and height: half way across the window is 50% and halfway down from the top is 50%. If two or more numbers are entered they are taken as the width and height of the button in screen percentage points.

  • Tool tips are enclosed in quotes at the end of the command line. A tool tip appears when the cursor hovers over the button.

  • An ampersand (&) can be used to designate a single character hot key. Hot keys must be different for each item on the menu.

  3. Save the menu. Changes are immediately reflected in the menu.

  • In this example, the first button is called Exit. The command block is called Exit. The letter X (ALT X) is a hot key which activates the Exit command block.

  • The second button is called Test. The command block is called Tester. The button appears 50% or halfway across the window and 80% down from the top of the window. The tool tip reads "This is a test of buttons."

Epi Info Menu example

Note: A button at 5,80 starts at 5% from the left; one at 50,80 is centered on 50% and one at 95,80 is right-justified at 95%.


Change the Menu Picture

The menu background can be changed using the menu bar, by editing the image name in the EpiInfo.ini file, or by using the PICTURE command in the .mnu file.Set an Image Using the Menu

  1. From the Epi Info main menu, select Edit > Picture. The Open File dialog box opens.

  2. Locate and select the image to be used as the background for the new menu.

  • The selected image can be a .bmp, .jpg, .gif, .emf or .wmf file type.

  3. Click Open. The image is applied to the background.

  • The change updates the EpiInfo.ini file in the MnuEpiInfo section.

Set an Image with the PICTURE Command

If there is no image specified in the ini file, a background image can be specified from the Menu.

  1. Select Edit > Edit this Menu. The Menu opens.

  2. Use the PICTURE command in the command block for a MENUITEM or a BUTTON. For example, to change the background picture to C:\Epi_Info\REFCAMP.bmp, create a command block that contains the PICTURE command. In the example below, the name of the command block is “SETREFCAMP.”

Example

BEGIN
PICTURE REFCAMP.bmp
END

From the (.mnu) Menu file, call the SETREFCAMP command block using MENUITEM or BUTTON.

  • MENUITEM “Change Picture”, SETREFCAMP

  • BUTTON “Change Picture”, SETREFCAMP, 50, 50, “Sets the background picture to REFCAMP”

  3. Click Save. Then, close the Menu and Epi Info.

  4. Open Epi Info and the new image is applied to the background.

  • If a valid image is not available, a search runs for images with the same name as the .exe file that runs the menu. For example, if EpiInfo.exe is renamed or copied to MyMenu.exe, an image called MyMenu.jpg, MyMenu.bmp and MyMenu.gif (in that order) is sought in the same directory with MyMenu.exe. The first image found is selected and applied.


Use Permanent Variables in a Menu

Information can be sent to other programs using permanent variables and the ASSIGN command. In Menu, ASSIGN is used to define and assign a value to a variable.

Example

ASSIGN CurrentYear= "200x"

  • The value of CurrentYear is available as a permanent variable within Analysis and in MakeView Check Code.


Inidir Variable

INIDIR

Menu System Variable

Description

The value of INIDIR is the location of the EpiInfo.ini file.

Syntax

@@INIDir

Comments

The value of INIDIR is stored in the registry. This means only one EpiInfo.ini can be specified for the location where INIDIR is implemented. Changing INIDIR is useful when the preset value is not a writable directory.


Installdir Variable

INSTALLDIR

Menu System Variable

Description

The value of InstallDir is the Epi Info installation directory.

Syntax

@@InstallDir

Comments

The value of the InstallDir is stored in the registry at the time of installation.


Menudir Variable

MENUDIR

Menu System Variable

Description

The value of MenuDir is the directory in which the current .MNU is located.

Syntax

@@MenuDir

Comments

MenuDir can be used with @@ to obtain the directory where the current menu file is located. It makes it very easy to find other files such as PGMs, that you place in the same directory or beneath it. MenuDir is always available and continues to work if the menu file is copied to another directory or renamed and copied.


WorkDir Variable

WORKDIR

Menu System Variable

Description

The value of WORKDIR is the working directory.

Syntax

@@WORKDIR

Comments

WORKDIR can be used with @@ to obtain the working directory. The value of WORKDIR is stored in the EpiInfo.ini file. WorkDir defaults to the current menu folder when there is no WorkDir in the MnuEpiInfo section of the EpiInfo.ini file. Setting WORKDIR is another way to identify where you expect to find files.


Epi Info INI File Overview

Epi Info creates a configuration file called Epi Info.ini. Epi Info programs use the .ini file to store settings. For the end user, the .ini file is almost invisible. The .ini file is organized in sections identified by square brackets [ ]. There is a section for each Epi Info program, and for each .mnu file created and run in the Epi Info.exe menu. Permanent variables are stored in a section called VARIABLES.

If all programs included with Epi Info are not installed initially and are then added later with the installation program, the program detects the existing .ini file and prompts whether to replace it or not.

Warning! If the .ini file is replaced, permanent variables are lost and may have to be reset within application programs.

In general, if the .ini file is lost or deleted, every program recreates its entries the next time it is executed; however, in some cases errors can occur. For example, if the .ini file is deleted or renamed the Menu.exe may ask for the Background Image before displaying the menu window. Once an image is selected, the menu stores the path and filename in the re-created .ini file. When the wrong syntax is used in an entry, the program may not recognize it and it will assume that there is no entry for that property.

Although editing the .ini file is not recommended, it may be possible to remove a problem by doing so, particularly if a corrupt entry can be found for a file path. Generally removing a single-line entry from the .ini file will not harm the file except to make a program use a default value for the item in question. It is very important when editing an .ini file to be sure it is saved in plain DOS text format—not in rich text, WordPerfect, or Microsoft Word formats. The WordPad editor seems to detect and save plain text format satisfactorily.

Sample .ini file


Set the INI File Directory

Epi Info programs use an .INI file to store configuration settings. Within the INI file, there are sections for each Epi Info program, and for each MNU file created and run in the Epi Info.exe menu. Permanent variables are also stored in the INI file. Setting the INI File Directory does not change the default directory settings for any of the Epi Info modules.

  1. From the Epi Info menu, select Settings > Set INI File Directory. The Browse for Folder dialog box opens.

Browse for Folder dialog box

  2. Locate the folder that will be the INI Directory.

  3. Click OK.


Set the Working Directory

Changes to the working directory apply to variables set in the INI file and those used for editing Menus. WorkDir is a system variable used when coding menus that helps to avoid long path names. Setting the working directory does not change the default directory settings for any of the Epi Info modules. The specified working directory is logged into before a program is launched from the menu.

  1. From the Epi Info menu, select Settings > Set Working Directory. The Browse for Folder dialog box opens.

Browse for Folder dialog box

  2. Locate the folder that will be the working directory.

  3. Click OK.


Introduction to StatCalc

StatCalc is an epidemiologic calculator that produces statistics from summary data. Three types of calculations are offered:

  • Statistics from 2-by-2 to 2-by-9 tables similar to those produced in Analysis. Both single and stratified 2-by-2 tables can be analyzed to produce odds ratios and risk ratios (relative risks) with confidence limits, several types of chi square tests, Fisher exact tests, Mantel-Haenszel summary odds ratios and chi squares, and associated p-values.

  • Sample size & power calculations include Population Survey, Cohort or Cross-Sectional, and Unmatched Case-Control Study.

  • Chi-square for trend by the Mantel extension of the Mantel-Haenszel summary odds ratio and chi square. This tests for the presence of a trend in dose response or other case control studies where a series of increasing or decreasing exposures is being studied.


Use StatCalc

  1. From the Epi Info main menu, select Utilities > StatCalc. The StatCalc application main page opens.

  2. Select one of the following calculations using the up and down arrow keys: Tables <2 x 2, 2 x n>, Sample size & power, or Chi square for trend.

  • You can also select calculations by pressing the corresponding key on the keyboard that matches the highlighted letter on the menu. If you select a calculation using the keyboard, the calculation appears immediately.

  • If you select the Sample size & power calculation, the following calculation options appear: Population Survey, Cohort or Cross-Sectional, Unmatched Case-Control.

  • If you are in the Sample size & power calculation secondary options page, press ESC to return to the StatCalc application main page.

  • If you are in a Sample size & power calculation secondary option calculation, press F10 to return to the StatCalc application main page.

  3. Press Enter on the keyboard.

  • Help is available using the F1 key.

  4. Enter data for each calculation type. Then, press Enter to move to a new field.

  5. Press F4 to perform calculations.

  • To clear mistakes, use the arrow keys to navigate to the field and enter the new information. Then, press F4 to complete the calculation.

  • If you are in a StatCalc calculation, press F10 to return to the StatCalc application main page.

  • If you are on the StatCalc application main page, press F10 to exit the application.

  • Press F5 to send results to a printer.

  • Press F6 to send results to a data file.


Analysis of Single and Stratified Tables

These tables are similar to those produced in Analysis. Both single and stratified 2-by-2 tables can be analyzed to produce odds ratios and risk ratios (relative risks) with confidence limits, several types of chi square tests, Fisher exact tests, Mantel-Haenszel summary odds ratios and chi squares, and associated p values

Assumptions

  • The values in the cells must be Counts representing the number of records meeting the specifications in the marginal and stratum labels.

  • A case-control study is one in which the ill and the well individuals are selected and the number of exposed and unexposed is then ascertained. In a cohort study, the exposed and the unexposed are selected and the number of ill in each group is then ascertained. A cross-sectional study starts with neither illness nor exposure determined and ascertains both during the study.

  • In cohort studies, the relative risk may be calculated from the results. In case-control studies, the odds ratio may be used as an approximation of the relative risk if the disease is rare in the general population from which cases and controls are selected. Fewer than 1 case in 20 individuals might be taken as a starting point. Thus, in a foodborne outbreak, selecting cases and controls from those who ate at a particular restaurant in a given week, the odds ratio could not be used to approximate relative risk if half of the individuals became ill. The odds ratio would however be an indicator of the degree of association between illness and the consumption of a particular food.

  • For the results to be valid the outcomes in each record must be independent of those in other records. The values for one individual do not predict those for another. This means that confounding must be removed by stratifying on confounding variables.

Single 2-by-2 Tables

Two-by-two tables are frequently used in epidemiology to explore associations between exposure to risk factors and disease or other outcomes. The table in StatCalc is set up with Exposure on the left and Disease across the top, but not all textbooks and articles use the same conventions; be sure to observe the labels carefully and transpose data items if necessary.

Given a yes-no or other two-choice question describing disease and another describing exposure to a risk factor, StatCalc produces several kinds of statistics that test for relationships between exposure and disease. Generally, an association is suggested by an odds ratio or relative risk larger or smaller than 1.0. The further the odds ratio or relative risk is from 1.0, the stronger the apparent association. Statistical significance can be assessed by p-values for the Chi square tests that are small <.05 if often used, Fisher exact test with a small p value; or confidence limits for the odds ratio that do not include 1.0.

The expected value of a cell is the product of the marginal totals for that cell divided by the grand total for the table. If any expected value is less than 5, it is considered best to use the Fisher Exact test results and the Exact confidence limits. If the numbers in the table are all large, the other tests are likely to indicate nearly the same result.

Stratified Analysis of 2-by-2 Tables

Associations between disease and exposure can be missed or falsely detected if confounding is present. A confounding factor is one that is associated with both the disease and the exposure. Age is a frequent confounder, although any factor other than the main exposure being considered can be treated as a confounder.

Stratification means making a separate table of disease by exposure for each possible combination of confounders. In the simplest case, this could mean separate tables for males and females, if sex is the potential confounder. If Age, Sex, and City are confounders, separate tables would be made for each possible combination of age group, sex, and city.

The Mantel-Haenszel weighted odds ratio, relative risk, summary Chi square, and p-value combine results from different strata to remove confounding caused by the variables used for stratification. Thus, if tables are entered for male and female confounding by sex is removed. The degree of confounding can be judged by comparing the crude and weighted odds ratios; if they are identical, there was no confounding by sex.

The Approximate (Cornfield and Greenland/Robins) and Exact confidence limits provide additional measures. If the weighted odds ratio or relative risk (not for case-control studies) has confidence limits that do not include 1.0, then there is a statistical association with 95% confidence between the disease and the exposure without confounding by the stratifying factor.

If the odds ratio or relative risks for strata in a series of stratified tables for the tests are not similar, then interaction between the stratifying factor and the risk factor are present. Logistic regression or other multivariate methods may be indicated (or the number of subjects is too small to draw definite conclusions). Alternatively, it may be advisable to present the stratum-specific estimates separately.

Experts in logistic regression recommend that a thorough exploration of the data using stratified analysis be performed before undertaking the regression analysis. If the number of confounding factors is fairly small and the odds ratios are homogeneous from stratum to stratum, stratified analysis may be all that is needed.

Example

A study of bladder cancers cases used randomly selected controls to explore the history of artificial sweetener use in the two groups.

 | Bladder Cancer |
Sweetener | Yes | No
Ever Used | 1293 | 2455
Never Used | 1707 | 3321

  1. From the StatCalc application main page, select Tables <2 x 2, 2 x n>. A blank table opens in the StatCalc application window.

  2. Enter the data from the above sample table.

  3. Press F4 to calculate the results.

StatCalc 2x2 Results

The odds ratio of 1.02 and the confidence limits that include 1.0 fail to provide evidence of any association between sweetener use and bladder cancer (cited by Schlesselman, p. 38-39).

Example

Relationship Between Alcohol Consumption and Myocardial Infarction (MI): Confounding Due to Smoking Hypothetical Data from Schlesselman, p. 182

The following case-control study shows and apparent association between alcohol consumption and MI with an odds ratio of 2.26.

 | MI |
Alcohol | Yes | No
Yes | 71 | 52
No | 29 | 48

Smoking is known to be associated with both MI and with alcohol consumption. Stratifying the data by smoking status creates two tables, one for smokers and one for nonsmokers.

Nonsmokers |  |  | Smokers
 | MI |  |  | MI |
Alcohol | Yes | No | Alcohol | Yes | No
Yes | 8 | 16 | Yes | 63 | 36
No | 22 | 44 | No | 7 | 4

The odds ratio for each table is 1.0 and the Mantel summary odds ratio is 1.0. The crude odds ratio and the Mantel summary odds ratio are quite different (4.0 and 1.0), leading to the conclusion that smoking was a confounding factor and that there appears (with this over simplified analysis) to be no association (odds ratio= 1.0) between alcohol and MI. Note that the odds ratio in the two strata are the same (1.0); there is no interaction or effect modification between smoking and alcohol. In other words, the effect of alcohol on MI is the same for smokers and nonsmokers. When the effect varies in the different strata (the odds ratios are different), interaction or effect modification is said to be present.

To view and create a Stratified Analysis Summary of 2-by-2 Tables, take the following steps:

  1. From the StatCalc application main page, select Tables <2 x 2, 2 x n>. A blank table opens in the StatCalc application window.

  2. Enter the data from the above Nonsmokers sample table.

  3. Press Enter to view the Single Table Analysis.

  4. Press F2 to open a new blank table.

  5. Enter the data from the above Smokers sample table.

  6. Press Enter to view the Single Table Analysis.

  7. Press Enter to calculate results for both tables. The Stratified Analysis Summary of 2 Tables window opens.

StatCalc Stratified Table Summary


Population Survey or Descriptive Study

Assumptions

  • The sample to be taken must be a simple random or otherwise representative sample. A systematic sample, such as every fifth person on a list, is acceptable if the sample is representative. Choosing every other person from a list of couples, however, would not give a representative sample, since it might select only males or only females.

  • The question being asked must have a Yes-No or other two-choice answer, leading to a proportion of the population (those answering Yes) as the final result

Example

Suppose one wishes to investigate whether or not the true prevalence of HIV antibody in a population is 10%. A random or systematic sample of the population is planned to estimate the prevalence. A 95% confidence that the true proportion in the entire population will fall within the confidence interval calculated from the sample is desired.

In StatCalc, enter the population size of 5000, the estimate of the true prevalence 10% and either 6% or 14% as the Worst Acceptable value, the end point of the sample confidence interval. Calculate the values with F4. The application then shows the sample size for several different confidence levels including the desired 95%.

  1. From the StatCalc application main page, select Sample size & power. The following calculation options appear: Population survey, Cohort or cross-sectional, Unmatched case-control.

  2. Select Population Survey. The Population Survey or Descriptive Study Using Random (Not Cluster) Sampling window opens.

  3. Enter the Population Size of 5000.

  4. Enter the Expected Frequency of 10%.

  5. Enter the Worst Acceptable Result as 6%.

  6. Press F4. The results appear in the window.

StatCalc Population Survey Example

Notes

Sample size determination is only a rough guide, based on assuming a specific value for the true population proportion, the variability in the sample estimate and its confidence limit. Many other factors like cost, number of subjects available, rate of nonresponse, and the accuracy of answers and data transcription must be considered in study design.

The Worst Acceptable value is one of the confidence limits around the estimated sample proportion. The other confidence limit is calculated automatically by the application. The sample size given is for a two-tailed test, a larger sample size than for a one-tailed test. Pictorially, the equation works with the following values, if confidence is 95%.

In this example, the sample size chosen was n so that if large numbers of samples are taken, 95% of the proportions obtained in the samples will fall between 6% and 14% if the true mean is 10%. It is also true that 95% confidence limits calculated for each of these samples will include 10% (the true population proportion), 95% of the time.

Cluster sampling is not covered by these calculations. Generally, geographic clustering is used to make the study easier or cheaper to perform. The effect on sample size depends on the number of clusters and the variance between and within clusters. In practice, this is determined from previous studies or from studies of similar type in the literature, and expressed as a constant called "Design Effect", often between 1.0 and 2.0. The sample sizes for simple random samples are multiplied by the Design Effect to obtain the sample size for the clustered sample.

Sample sizes must be adjusted upward to allow for nonresponse and other factors that decrease the yield of usable responses. If you expect 10% nonparticipation and 5% non-response to any given question, then the sample size must be multiplied by 100% /85% or 1.18.

Equations

The formula used is available in many textbooks, including Kish and Leslie, Survey Sampling, John Wiley and Sons. NY. 1965.

First the sample size, S, for a very large (infinite) population is calculated as S=Z*Z(P(1-P))/(D*D). In which D is one half the width of the desired sample confidence interval (14%-10% or 10%-6% in the example above). Z is a percentile of the standard normal distribution determined by the specified confidence level. It is 1.96 for a 95% confidence level. S is then adjusted by a finite population correction factor to obtain the final estimate of sample size as follows: Sample Size = S/(1+(S/population)).


Cohort or Cross Sectional Study

Assumptions

  • The sample to be taken must be a simple random or otherwise representative sample. A systematic sample, such as every fifth person on a list, is acceptable if the sample is representative. Choosing every other person from a list of couples, however, would not give a representative sample, since it might select only males or only females.

  • The question being asked must have a Yes-No or other two-choice answer, leading to a proportion of the population (those answering Yes) as the final result.

Provide

  • A guesstimate of the result in one population.

  • The confidence level, (e.g., 95%), power (e.g., 80%), and the ratio of controls to cases.

  • A value for the least extreme Relative Risk, Odds Ratio, or Actual proportion in the other group that is to be detected.

Results

Sample sizes for the values entered and for other combinations of these values with one of the parameters varied systematically.

Example: A Cross-Sectional Study

In a foodborne outbreak, there were 2397 persons at a banquet that was followed by illness. You wish to conduct a cross-sectional study to test for an association between illness and food consumption. With the cook's help, you estimate that about 40% of the crowd had the suspect potato salad and the rest had the green garden salad. You guesstimate that the ratio of unexposed to exposed is 60:40. As a rough guess we choose 5% as the case rate among the unexposed. To detect and odds ratio of 2.0 or greater, StatCalc tells us that a total of 1137 subjects are needed.

Because of the many uncertainties in the guesses, nonresponse, etc., it might be reasonable to choose 1200 subjects. The sample might be chosen by taking every second person on the guest list or by using a random number table to choose 1200 subjects.

  1. From the StatCalc application main page, select Sample size & power. The following calculation options appear: Population survey, Cohort or cross-sectional, Unmatched case-control.

  2. Select Cohort or cross-sectional. The Unmatched Cohort and Cross-Sectional Studies (Exposed and Nonexposed) window opens.

  3. Enter the Probability that the Two Samples Differ as 95%.

  4. Enter the Probability that the Two Populations Differ as 80%.

  5. Enter the Ratio (Number of Unexposed : Number of Exposed) of 60:40.

  6. Enter the Expected Frequency of Disease in Unexposed Group as 5%.

  7. Enter the Odds Ratio of 2%.

  • Once you enter the required data in steps 3-7, the Risk Ratio and Percent disease among exposed fields will automatically populate.

Cross-Sectional Study Example

  8. Press F4. The results appear in a table format

Example: A Cohort (Exposure-based) Study

In a vaccine trial, subjects are to be randomly allocated to receive a vaccine or placebo. The normal rate of disease in the unimmunized is 10%. What sample size will be required to show a two-fold reduction in risk (rate of 5%) associated with immunization? Use a confidence level of 95%, power of 80%, and the rates mentioned, with a 1:1 ratio of immunized and unimmunized subjects, the sample sizes required would be 474 in each group, or a total of 948 subjects.

  1. From the StatCalc application main page, select Sample size & power. The following calculation options appear: Population survey, Cohort or cross-sectional, Unmatched case-control.

  2. Select Cohort or cross-sectional. The Unmatched Cohort and Cross-Sectional Studies (Exposed and Nonexposed) window opens.

  3. Enter the Probability that the Two Samples Differ as 95%.

  4. Enter the Probability that the Two Populations Differ as 80%.

  5. Enter the Ratio (Number of Unexposed : Number of Exposed) of 1:1.

  6. Enter the Expected Frequency of Disease as 10%.

  7. Enter the Percent Disease among Exposed as 5%.

  • Once you enter the required data in steps 3-7, the Risk Ratio and Odds Ratio fields will automatically populate.

  8. Press F4 to calculate the results.

Cohort Study Example

Notes

For matched samples, the required sample size may be larger or smaller, and calculations require guessing the degree of confounding removed by the match. Sample sizes must be increased to allow for nonresponse, tabulation of more than one question, etc. For example, if a 90% response rate is expected, multiply the results by 100% /90% or 1.11.

The equation used for comparison of the two groups of unequal or equal size is found in Fleiss, Statistical Methods for Rates and Proportions, 2nd Edition., Wiley, 1981.


Unmatched Case Control Study

Assumptions

  • This calculation assumes random or representative samples drawn from two populations, the Cases (Ill or Affected persons) and the Controls (Not Ill or Not Affected). The total numbers of potential cases and controls are not known-- a key feature that distinguishes a case-control study from cohort and cross-sectional studies.

  • As with all sample size calculations, this one requires guesses about the final results. The level of confidence (e.g., 95%) and the power (80%) must be specified and the ratio of cases to controls.

  • For matched samples, the required sample size may be smaller, but calculations require guessing the degree of confounding removed by the match. Such calculations have not been included.

  • Sample sizes must be increased to allow for nonresponse, or for tabulation of more than one question, etc. For example, if a 90% response rate is expected, multiply the results by 100% /90% or 1.11.

Example

Twelve infants with staphylococcal infections in a hospital outbreak are to be compared with uninfected infants in the same nursery in a search for risk factors. We do not know the expected proportion of infants in either group having risk factors such as exposure to a particular nurse or kind of skin treatment, but to study the worst case, we choose 50% as the frequency in the controls and calculate sample size for a variety of odds ratios.

Using 95% confidence limits, and a power of 80%, we find by trial and error, that with 4 controls per case, even an odds ratio of 10 would require 15 cases for detection. Raising the number of controls to 6 per case only lowers the requirement to 14. The conclusion is that only a very striking odds ratio can be detected with such a small number of cases, or that failure to demonstrate significant results does not rule out the presence of risk factors.

  1. From the StatCalc application main page, select Sample size & power. The following calculation options appear: Population survey, Cohort or cross-sectional, Unmatched case-control.

  2. Select Unmatched Case-Control. The Unmatched Case-Control Study (Comparison of Ill and Not Ill) window opens.

  3. Enter the Probability that the Two Samples Differ as 95%.

  4. Enter the Probability that the Two Populations Differ as 80%.

  5. Enter the Ratio (Number of Unexposed : Number of Exposed) of 6:1.

  6. Enter the Expected Frequency of Exposure as 50%.

  7. Enter the Odds Ratio of 10%.

  • Once you enter the required data in steps 3-7, the Risk Ratio and Percent disease among exposed fields will automatically populate.

  8. Press F4 to calculate the results.

Unmatched Case Control Example

Equation

The equation used for comparison of two groups of unequal or equal size is found in Fleiss, Statistical Methods for Rates and Proportions, 2nd Ed., Wiley, 1981.


Chi Square for Trend

Chi Square for Trend (Mantel Extension)

Chi-square tests for the presence of a trend in dose response or other case-control studies where a series of increasing or decreasing exposures is being studied.

Epidemiologic Perspective: Analysis for Trend in Proportions: The Mantel Extension

Given a series of proportions representing increasing or decreasing exposure (drug dosage levels, number of cigarettes smoked, etc.) and numbers of affected and non affected people in each group, the Mantel extension tests whether the odds in successive groups increase or decrease compared to the baseline. The baseline is taken to be the first group, usually those with zero exposure. By dividing the data into several strata, confounding due to factors such as age group or sex may be removed.

The results include the odds ratios of successive exposure levels and the Extended Mantel-Haenszel Chi-Square and p-value (one degree of freedom). A p-value less than 0.05 may be taken as reasonable indication of trend in the odds of successive levels compared with the baseline. In a dose-response situation this would provide evidence of dose response. A simple two-by-two table analysis (stratified, if appropriate) could be used to show that exposed persons differed in response from non-exposed persons, (regardless of dose), but the trend in dose response indicated by the Mantel extension provides another, and often more convincing, type of evidence.

Entering Data

Use StatCalc to enter three or more exposure levels, and the number of ill and not ill persons for each level. For example, multiple tables (strata) may be entered using a different table for each age/sex group. Exposure levels must be the same for all tables and are set by entries in the first table. StatCalc calculates Chi-square for trend (Mantel Extension), the associated p-value, and the odds ratio for each exposure level compared with the first exposure level.

Exposure levels may be 1, 2, 3,...etc. for data employing uniform intervals. Levels with nonuniform intervals, like 0, 1-2, 3-4, 5-15 years of exposure, may be handled by entering the mid-points of the intervals, in this case 0, 1.5, 3.5, 5, and 10. The first Exposure Score entered should correspond to baseline or no exposure and is used as the basis for comparison in the calculations. Values which are not entered are taken as zero. Entries (or entire strata) which are zero everywhere except in Exposure Score are dropped from the analysis and have no effect on the results.

Example

To use the test, results must be available for the baseline exposure level and at least two other levels (or doses). The following example uses data from a case-control study of women with and without myocardial infarction (MI) at three different levels of cigarette smoking, measured as cigarettes per day. The analysis is stratified for five different age groups.

Frequency of Cigarette Smoking Among Women with Myocardial Infarction (MI) and Controls (C), Stratified by Age
Stratum Group Cig./Day |  | 25-29 |  | 30-34 |  | 35-39 |  | 40-44 |  | 45-49
 | Score | MI | C | MI | C | MI | C | MI | C | MI | C
None | 0 | 1 | 131 | 0 | 188 | 3 | 161 | 11 | 169 | 23 | 157
1-24 | 1 | 1 | 101 | 6 | 152 | 12 | 130 | 21 | 134 | 42 | 97
>24 | 2 | 4 | 51 | 15 | 83 | 22 | 65 | 39 | 68 | 34 | 52

From Schlesselman, JJ. Case-Control Studies. Oxford University Press, NY, 1982, p.205.

  1. Select the Chi Square for Trend option from StatCalc. The Analysis for Linear Trend in Proportions window opens.

  2. Enter the first Exposure Score of 0. The baseline exposure level, in this case 0, must be entered first in the table. See the sample data provided in the above table.

  • While entering data, use the tab key, shift tab, enter, or arrow keys to move from value to value in the table. The highlighted value may be edited, allowing entry of decimal or integer numbers for Exposure Score (in the first stratum only) and integer numbers for ill and not ill.

  3. Enter the three levels of cigarette smoking for ages 25-29, with the MI data for Cases and the C data for controls.

  4. Enter the three levels and press F2 for another stratum. Each age group will be entered as a separate stratum.

  • The F2 key ends input of the current stratum and begins the trend analysis.

  3. If F2 is pressed by mistake when F4 was intended, press F4 again and ignore subsequent last stratum messages.

  5. Enter the data for ages 30-34. Continue this process until all the groups have been entered.

  6. Press F4 to perform the calculation.

  • The results include the age adjusted odds ratios for Smoking 1-24 vs none and >24 vs none and the Age Adjusted Odds Ratios of 3.16 and 8.56 with the Extended Mantel-Haenszel Chi Square of 129.876 and p-value of 0.


Introduction to Data Compare

Data Compare is an application for finding the differences between two tables. It is useful for checking the accuracy of double entry database creation in which two data entry people enter the same records and Data Compare is used to find differences and correct errors. It can also be used to locate changes in a database updated by more than one organization. Data Compare supports Access 97, Access 2000, and Access 2003 in the following Microsoft Windows platforms: Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, and Windows 7. Data Compare can be run from a new script or an existing script. Data Compare output includes differences, unmatched records, and printable reports including a Table Structure Report and HTML Reports. Data Compare reports can be saved or edited from the toolbar or menu.

Data Compare Overview

The Table 1 and Table 2 sections display the records for the tables being compared. Differences are highlighted in yellow.

Select the Unmatched Records tab to view the records that do not match between the two tables. From the Unmatched Records tab, records can be copied between tables or deleted from tables. Total Unmatched records are those match field values found in one table only.

The Differences section displays the Total and Current differences between the two tables. The Current Difference field displays the number of differences between the compared tables and allows them to be scrolled one at a time using the arrow buttons. The Total Differences field shows the total differences between the tables. The Accept Value buttons activate when a cell containing a difference is selected. Differences that are accepted and transferred from one table to another turn from a yellow highlight to a green highlight.


Data Compare Displays

Table differences are displayed in color coded sections.

Navigate Differences

Use the tab key to move through differences in a forward direction. Use Shift-Tab to move back through the differences. The Current Difference arrow keys can also be used to move one cell at a time or to the end of the records.

Data Compare Unmatched Records tab

Differences

Difference fields are displayed in cells with a background color of yellow. Once a difference field has been copied or accepted into another table, the cell background color changes to green.

Unmatched Records

Unmatched records copied to another table are indicated by a green cell background. Deleted records are color coded red. Rows that fail to copy or delete appear in orange. Once conflicts are resolved, the rows may be copied or deleted and the colors will appears as red or green.

Show Related Record

To access parent records, right click the child row and select Related Record from the menu. Parent records information appears in a new window.

Switch Comparisons

To move between an Epi Info table and grid, use the drop-down list in the toolbar. Both table names appear in the drop-down list separated by a colon. Tables with different names can be compared. Grids must have the same name.

Script Properties

Script Properties can be viewed by selecting File > Script Properties. Property fields and values can be reviewed from the window. Click Edit to open the Data Compare wizard and make changes to the properties.


Data Compare Reports

Two kinds of reports are available from Data Compare.

Structure Differences Report

The Structure Differences Report is generated when there are Field Name and Data Type differences. This report details the reasons why specific fields cannot be compared. Structure Differences Reports are created by the Data Compare wizard, if differences are found. If differences are found during the comparison the Display Table Differences button appears in the Data Compare wizard. The report contains the database name and location, the table name, and a list of differences between the first and second tables. The report can also be accessed from the Epi_Info folder as a text file called StructDiff.txt. The file can be opened and viewed with any text editor.

Data Compare Differences Report

To access reports, select File > Open HTML Report to view a report created by the Data Compare wizard. Data Compare Reports are produced if the Create HMTL Report option is selected when the report is created.

Example of a Data Compare Report

Data Compare and Leading/Trailing Spaces

When comparing fields with numbers, confirm that the variable type is numeric and not text (substring). If comparing two datasets with a text field where one of the values has a trailing space, the space appears as a Difference, even though the trailing space cannot be seen in the report. This can also occur with NULL values. For example, when comparing the contents of two text fields, one field value ‘12’ is not equal to the field value ‘12’ or ‘12’. Best practices indicate that numeric values be stored in numeric format fields as leading or trailing spaces are automatically removed from numeric fields.

Statistics

  • The Total # Compared for Records is the number of records with match field values being compared between the two tables.

  • The Total # Compared for Fields is the number of fields compared to the second table.

  • Unmatched is the number of the records containing match field values that exist only in table 1 or only in table 2.

Differences in Details

Match fields with differences are indicated by a yellow background as long as Don't Display Values of Different Records was not selected in the Data Compare wizard when the report was created.

Unmatched Records

Match fields with values found in only one table are indicated with a red background in the report.


Use Data Compare

  1. From the Epi Info main menu, select Utilities > Data Compare. The Data Compare application main page opens.

  2. Select File > New Script. The Data Compare Wizard opens to the New Script dialog box.

Data Compare Wizard New Script dialog box

  3. From the Type of Tables section, select Epi Info View or Standard Table.

  4. Click the MDB 1 Browse button. Locate and select the MDB file that contains the first table to be compared.

  5. From the Table drop-down list, select from the list of views or tables available in the project.

  6. Click the MDB 2 Browse button. Locate and select the MDB file that contains the first table to be compared.

  7. From the Table drop-down list, select from the list of views or tables available in the project.

  • Select Make Backup to create a backup table inside the project. The new table contains the extension BK indicating that it is a backup table.

  8. Click Next. The Identical Table Structure dialog box opens. This message indicates whether or not the compared tables have the same structure.

  • This message can be customized to appear only if the table structures are different. Select the Do Not Show This Message If Structures are Identical checkbox or from the menu deselect View > Show Message on Structure Identical.

  9. Click Next. The Choose the Match to Get Records dialog box opens

Choose the Match Fields to Get Records

  10. From the Match Fields (Unique Identifiers) list, select the unique identifiers to use when making the matches between the two selected tables.

  • If a Grid Match is used, click inside the Match Field record and select from the drop-down list to indicate matches.

  11. Click Next. The Fields to Compare dialog box opens.

Choose the table fields to compare

  12. From the Fields to Compare list, select the fields to compare between the two tables.

  • Select the Show Unmatched Records checkbox to include unmatched records in the comparison.

  • Click Check All to select all the fields or Clear to remove all the selected fields and choose new fields for the comparison.

  13. Click Next. The Create HTML Report of Comparison dialog box opens.

Create HTML Report of Comparison

  14. Click the Report Name Browse button to open the Select File window.

  15. Select or create a new HTML file and click Open.

  • Select Do Not Display Values of Different Records to include match keys in the HTML report and exclude the values for the differing fields.

  16. Click Next. The Save Script dialog box opens.

  • Click Save As to name and save the script. Scripts are saved as text (.TXT) files.

  17. Click Compare. The Data Compare window opens with the selected table differences displayed.

  • Click the Unmatched tab to access the Unmatched records.

  • Data Compare differences are displayed in color coded sections. Differences that are accepted and transferred from one table to another turn from a yellow highlight to a green highlight.

Data Compare Results


Edit a Comparison

The default mode in Data Compare is Read-Only. To place tables in edit mode, select View > View as Read Only from the menu or click the Read Only Mode button from the toolbar. From Edit Mode, table values can be matched by copying, accepting, or deletion.

Data Compare Unmatched Records tab

Edit A Field From the Differences Tab

Select a field and right click the value to cut, copy, or paste the value. Values can also be typed directly into field with differences.

Copy Records From the Unmatched Records Tab

  • Select a record and click Copy To Table 2 or Copy To Table 1 to copy records from one table to the another. The copied records appear in green.

  • If the compared tables are Epi Info Views and when a record being copied has its own grids, then the grids are copied over with the record. Grid records can be copied from one table to another.

Delete Records from the Unmatched Records Tab

  • Select a record and click Delete to delete the selected records. The deleted records appear in red.

  • If the compared tables are Epi Info Views, then when a record is deleted from a table, the grids record may also be deleted. Direct deletion of a grid record is not allowed.


Use Data Compare from the Command Line

Data Compare can also be run from a command line with a specified script file.

From Menu

EXECUTE C:\Epi_Info\DataComp.exe C:\Epi_Info\Blood Pressure Script.txt /s

From Analysis

EXECUTE "C:\Epi_Info\DataComp.exe C:\Epi_Info\Blood Pressure Script.txt"

From MakeView

EXECUTE "C:\Epi_Info\DataComp.exe C:\Epi_Info\Blood Pressure Script.txt"

When a silent mode /S is used, Data Compare runs without the user interface. From silent mode, a script file which does not include the HTML report option will not produce results. There may be a structure difference report if the tables compared are not the same structure. When an error is detected, Data Compare writes the error message into the HTML report. If an HTML report is not specified, then Data Compare creates an HTML report named after the running script file with an .HTML extension, for example, C:\Epi_Info\DataComp\Script0321.txt.html

The report is saved in the folder the where script file resides. When running from a command line with the /S option for a script which does not exist, a Data Compare .log file is created in the folder where the DataComp program was installed.


Introduction to VisData

VisData is a utility program, supplied by Microsoft with Visual Basic for reading data files and examining and changing their properties. VisData can be used to examine the fields and properties in a variety of data file types, to display the data in spreadsheet (grid) format, and to edit or delete data items, rows, or columns. Utility functions are offered to Compact and Repair data files. Compact does not perform compression as in zip files, VisData allows you to examine and change the innards of views and data tables; therefore, it must be used with caution, but it will reorganize files in which a great deal of editing has been done so that they occupy less disk space. Repair examines damaged files and repairs the damage if possible.


View Data in a Spreadsheet Using VisData

  1. From the Epi Info main menu, select Utilities > Visualize Data. The VisData application main page opens.

  2. Select File > Open Epi Info Project or File > Open Other Database and select the file to open. The Open File dialog box opens.

  3. Locate and select the file to open.

  4. Click Open. The Database Window opens with the following options: Properties, Tables, or Queries.

  5. Click the plus sign next to Tables or double click Tables to expand the menu.

  6. Double click a table name to see the entered data in a spreadsheet format.

  • Click the plus sign next a table to see all files associated with the table.


Delete a View and Rename Fields

Rename Fields and Delete a View

Rename a Field

If data have not been entered or only mock data have been entered, delete the data table from MakeView and field names will be available for editing and name changes. If data are already entered, use VisData to change the field name in two places, the View and the data table.

  1. From the Epi Info main menu, select Utilities > Visualize Data. The VisData application main page opens.

  2. Select File > Open Epi Info Project or File > Open Other Database and select the file to open. The Open File dialog box opens.

  3. Locate and select the file to open.

  4. Click Open. The Database Window opens with Properties, Tables, and Queries displayed.

  5. Double click Tables to expand the menu.

  6. Locate the table file from the list.

  7. Click the plus sign next to the table to expand the menu. Then, locate the field to change.

Tip: Write down the name of the field to be changed.

  8. Right click the field. Then, select Rename from the popup.

  9. Rename the field.

Tip: Write down the new name.

  10. Locate the View table from step 7 and double click it to open the file.

  11. Find the field name from step 7 in the Name column and rename it using the name you designated in step 9. Make sure the field name in the Name column is spelled exactly as it is in the Table menu.

Delete a View

To delete a view, take the following steps:

  1. From the Epi Info main menu, select Utilities > Visualize Data. The VisData application main page opens.

  2. Select File > Open Epi Info Project or File > Open Other Database. The Open File dialog box opens.

  3. Locate and select the file to open.

  4. Click Open. The Database Window opens with the following options: Properties, Tables, or Queries.

  5. Double click Tables or click the plus sign to expand the menu.

  6. Locate the View file from the list.

  7. Right click the file. A pop up opens.

  8. Select Delete. The View is deleted.

Note: If the data table is deleted, any entered data associated with the view is deleted from the project. Be absolutely sure that records are not needed before accepting the warning.


Introduction to Epi Lock

Epi Lock is an encryption tool that controls access to data files and the compression of files to facilitate the transmission of data and the creation of backup copies. With Epi Lock, files can be encrypted with a password. The encryption mechanism also provides some assurance that files have not been altered in transmission, since they will not decrypt properly if altered. Epi Lock also performs the function of properly deleting the unencrypted version (“clear text”) version of the file after testing. This ensures that the encrypted version can be decrypted to produce the identical result.

Encryption programs are subject to regulation and federal legislation when exported to countries outside the US. Prohibitions on export of secure encryption have lessened in recent years, but are subject to change. Encryption algorithms are highly technical and best provided by experts. Even experts sometimes discover holes in the encryption process through the efforts of thousands of hackers who attempt to crack the algorithms for good or bad purposes. For these two reasons, Epi Lock does not provide the modules containing actual encryption algorithms, but uses those that are provided by Microsoft.

Epi Lock Installation and License Information

Epi Lock can be run from the Epi Info directory. It is in the public domain, and may be freely translated or distributed.

Epi Lock Language Translation

Like other Epi Info programs Epi Lock can be translated into non-English languages by placing translated phrases or words into a Language.MDB database in the proper folder.

Epi Lock Naming Conventions

Epi Lock uses a simple naming scheme. When a file is encrypted, the extension .ELH (128 bit) or .ELS (40 bit) is added to the original file name. When the file is decrypted, the original file name is restored. With this method, the original file name is visible at all times.

Epi Lock Compression

The compression feature of Epi Lock is similar to zipping a file. It offers significant reduction in file size, particularly for Microsoft/Epi Info MDB files, some of which are reduced in size by almost 20-fold. Compression can be performed with or without encryption. The compression feature of Epi Lock facilitates storage of backup copies of data files, and can be integrated with the Epi Info menu to perform semi-automatic backup and archiving of files.

Epi Lock Log File

If an error occurs, Epi Lock writes error messages into the EpiLock.LOG file in the directory where EpiLog.EXE resides.


Encryption Levels

Standard encryption and high or strong encryption refer to the length of the keys used. Encryption with a 40-bit key can be cracked with currently available computers, but 128-bit encryption is still considered secure against any feasible attack. High encryption functions are included in the latest versions of the Microsoft Internet Explorer browser. If an earlier version of Internet Explorer without 128-bit encryption is running, download the latest version of Internet Explorer with the High Encryption Pack from the Internet Explorer Download page.

40-Bit and 128-Bit Encryption and Decryption

If 128-bit encryption is available on the host computer, then either 40-bit or 128-bit can be selected during the encryption process. To send a file to a country where only 40-bit encryption is permitted, select 40-bit encryption.

f 128-bit encryption functions are not available, the encryption defaults to 40-bits. The encryption available depends entirely on the functions provided with the version of Windows on the local computer, not on the Epi Lock program. To decrypt an encrypted file, you need to have the same encryption strength as the module used for encrypting. A file encrypted at 128-bits can only be decrypted on a computer with 128-bit encryption, but 40-bit encryption can be decrypted on any Windows computer.

Epi Lock automatically detects whether 128-bit encryption is available on starting the program and offers only the level of encryption available on the host machine.


Deletion of the Original File

During encryption, Epi Lock provides an option to delete the original file. This is necessary if the objective is to make the file unavailable on the local machine, but might not be necessary if an encrypted copy is being produced to send to a remote machine.

  • When Delete Original File is the selected option, Epi Lock first encrypts the file, and then decrypts the encrypted version to produce an unencrypted file in the Temp folder. If the current drive does not have Temp a folder, one is created.

  • Epi Lock compares the original file and the decrypted version. If there are no differences, the encryption and decryption were successful, and Epi Lock then deletes both unencrypted copies of the file.

  • Since files deleted in Windows can normally be restored by widely available software such as Norton Utilities, Epi Lock performs a special deletion that involves first filling the file with 11111111 bytes before it is deleted. This means that a hacker who steals the computer or the file and restores the deleted file will find only 1’s rather than the original data. It also means that passwords must be preserved as there is no backdoor way to restore the file without the password.


Epi Lock Passwords

A password is the basis for encryption in Epi Lock. Anyone in possession of the password can unencrypt files. If the password is lost after encryption and deletion of the original file have been performed, the files are also lost, just as surely as in a hard disk crash. (The following material was adapted from CDC internal educational materials.)

What are the most frequent ways in which passwords are compromised?

  • Easily identifiable personal information (family name, pet’s name).

  • Use of password cracking software.

  • "Brute force “attacks” where every possible combination of letters and numbers is tried (this type of attack can take days or months depending on the strength of your password).

A good password adheres to as many of the following guidelines as a system will accommodate.

  • Do not use familiar names.

  • Avoid using commonly known facts about yourself.

  • Do not use words found in the dictionary.

  • Use least eight (8) characters.

  • Utilize letters and numbers.

  • Use special characters, if possible.

  • Use upper and lower case letters if the system differentiates them.

  • Combine misspelled words.

  • Use Numbers to Abbreviate.

Epi Lock Password Usage

Create a File that Requires Two Passwords to Decrypt

For an extremely confidential file, first encrypt the data with person A’s password and then encrypt the resulting file with person B’s password. The final file can be opened only by first decrypting with person B’s password and then decrypting the resulting file with person A’s password.

Create a File that Can be Decrypted with Either of Two Passwords

Using Epi Lock, the only way to do this is to create two files, one encrypted with the first password, and another encrypted with the second password. Then each of the two passwords will decrypt one file and produce the original file.

Transmit Passwords to a Potential Recipient of an Encrypted File

A number of methods are probably suitable, using a channel that is different from the channel by which the encrypted file is sent. For example, the password could be transmitted by voice telephone (not in a voicemail message) fairly safely unless the phone line is tapped or a radiotelephone is being used. Paper transmission by mail or carried by someone is reasonable, particularly if it is not clear to someone reading the message that it contains a password. Person-to-person transmission is recommended, provided each party is careful about where any written record of the password is kept.


Tools For Controlling Access to Data

Data access control can include the following techniques:

  • Physical security such as door locks, access cards, and storage of backups in a secure area.

  • Training of personnel in the ethics and techniques of data confidentiality, and limiting access to trained and authorized persons.

  • Closing the Door after employees leave a system, so that they cannot continue to access it after leaving or teach others how to do so.

  • Use of passwords for computer access, and of proper password maintenance (frequent changes, adequate password construction, no sharing, passwords not written down near computer). Passwords should not be short, in any dictionary, or proper names, and should make use of numbers and special characters to prevent easy cracking.

  • Authentication of users when possible with key fobs, fingerprint, iris, or face readers, and passwords.

  • Encryption of files being transmitted over the Internet, using the Secure Socket Layer (SSL), with additional password encryption using a program like Epi Lock.

  • Encryption of confidential files after working hours using Epi Lock or other programs.


Tools for Preventing Data Loss or Corruption

The tools available to prevent data loss or corruption include:

  • Anti-virus software that compares files against known virus patterns or detects activity suspicious of computer virus effects.

  • Firewall software or hardware that filters incoming files from the Internet and prevents use of unauthorized ports.

  • Disconnecting computers from the Internet when access is not needed.

  • Physical security of laptop and desktop computers with alarms, steel cables, and where available, locked doors and security personnel.

  • Maintenance of computer equipment for proper ventilation, protection against voltage surges, and physical vibration or shocks.

In the long run, the primary protection against data loss, however, is the maintenance of backup copies so that lost data can be restored if necessary. Tools and techniques for this purpose include:

  • Regular backup of data. The Epi Info menu can be combined with the Epi Lock program to provide single button backup techniques that compress and optionally encrypt backup copies of data files.

  • Storage of copies both on site and off site so that a local disaster will not destroy all copies.

  • Rehearsals of restoring data from the backup copies so that problems do not first appear during real need.


Encrypt a Data File

Encryption protects data file contents during transmission to another computer.

  1. From the Epi Info main menu, select Utilities > Epi Lock. The Epi Lock dialog box opens.

Epi Lock dialog box

  2. Use the File to Encrypt Browse button to locate and select a file.

  • Files produced by encryption or decryption are placed in the same folder as the source file, unless a different folder is specified.

  3. Enter a Password and confirm the Password.

  • Passwords are case sensitive.

  4. From the Options section, select Delete the Original File.

  • Epi Lock encrypts the file and then decrypts the encrypted version to produce an unencrypted file in a Temp folder. Then, the original file and the decrypted version are compared. If there are no differences, the encryption and decryption were successful, and Epi Lock deletes both unencrypted copies of the file.

  5. Select an Encryption Level from 128-Bit or 40-Bit.

  6. Click OK. The file is encrypted and produces a new file with the extension .ELH or .ELS.

  • ELH stands for Epi Lock High encryption. If the less-secure 40-bit encryption is selected, the extension is .ELS, for Epi Lock Standard encryption.


Decrypt a Data File

  1. From the Epi Info main menu, select Utilities > Epi Lock. The Epi Lock dialog box opens.

  2. Select the Decrypt tab.

  3. Click the File to Encrypt Browse button to locate and select a file.

  4. Enter the Password used to encrypt the file.

  5. Click OK. The file is decrypted.

  • Be sure that the level of encryption is the same as the level at which it was encrypted; in most countries, the more secure 128-bits is selected. Epi Lock provides a dialog if 128-bit encryption is not available on the local computer.


Run Epi Lock Interactively

Epi Lock is a Windows executable program written in Visual Basic, Version 6. It can be run from the Epi Info menu, from the RUN command on the START menu of Windows, or from other programs that are able to run Windows executable (EXE) files. It may be advisable to encrypt sensitive data files automatically after entering or analyzing data, and to decrypt them just before further work is performed.

Use Epi Lock from the Command Line of the Menu

Like other Epi Info programs, EpiLock can be launched from a command line. For example the following syntax

EXECUTE c:\EpiLock.exe c:\myfile.mdb.ELH /d

decrypts the encrypted file MYFILE.mdb.ELH, assuming 128-bit encryption because the extension is .ELH rather than .ELS. A password is required for decryption, after which the rest of the process is automatic. Similar command lines can be included in an Epi Info menu (MNU) file so that decryption can be done automatically by clicking a button or choosing a menu item.

Epi Lock Syntax

Can add /k option like:/e /k

  • Execute Epilock.exe d:\demo\EpiLock\ETR_MASTER.MDB /e

  • Execute Epilock.exe d:\demo\epilock\ETR_MASTER.MDB.els /d

  • Execute Epilock.exe d:\demo\epilock\ETR_MASTER.MDB /z /s

Zip to a new folder (only one folder, no sub folder). Zip and unzip can have a destination path and filename.

  • Execute Epilock.exe d:\demo\epilock\ETR_MASTER.MDB d:\demo\epilock\backup\myzip.zip /z /s

  • Execute Epilock.exe d:\demo\epilock\ETR_MASTER.zip /u /s

Unzip to a new folder (could be new folder and a second sub folder) Double quotation if a space embedded folder name

  • Execute Epilock.exe d:\demo\epilock\ETR_MASTER.zip "d:\demo\epilock\data\" /u /s

Zip multiple files. Epi Lock allows multiple files to be zipped from the Command Line using wildcards.

  • Execute epilock.exe d:\Demo\EpiLock\*.mdb "d:\demo\epilock\backup\myzip.zip" /z /s

  • WaitForExitEpiLock.exe

IF Exists("d:\demo\epilock\backup\myzip.zip") = True then

Execute EpiLock.exe "d:\demo\epilock\backup\myzip.zip" /e128

Dialog "File encrypted in d:\demo\epilock\backup\"

ENDIF

End

Parameter | Definition
/e {/k} | Encrypt at the highest level available on the local machine.
/d | Decrypt using the level indicated by the file extension, if available. If the file is encrypted at 128 bits and 128-bit encryption is not available on the computer, decryption cannot be done,although downloading the latest version of Microsoft Internet Explorer or the High Encryption Package for Internet Explorer may provide the desired function.
/e128 {/k} | 128-bit encryption
/e40 {/k} | 40-bit encryption
/z {/s} | Zips a file without encryption.
/u {/s} | Unzips a file.
/k | Optional parameter which deletes the original file
/s | Optional parameter which runs Epi Lock in silent mode.


Zip or Unzip a Data File

Epi Lock provides a Zip or compression function, similar to that provided by WinZip or by recent versions of Windows. The field, Name of Zip File, may be used to specify an existing zip archive to which the file can be added, but Epi Lock otherwise adds .ZIP to the source file name to create a new name. Files to be unzipped from a zip archive can be selected from a list of contents. Encryption also compresses (ZIPs) the file so that it is considerably smaller for transmission or storage. The Zip tab allow files to be compressed without encryption, which means they can be unzipped by other programs such as WinZip or late versions of Windows. Encrypted files cannot be opened by these programs. Epi Lock encryption is more secure than zipping a file with a password in the WinZip program.

Zip Data

  1. From the Epi Info main menu, select Utilities > Epi Lock. The Epi Lock dialog box opens.

  2. Select the Zip tab.

  3. Click the File to Zip Browse button to locate a file. The Name of Zip File field defaults to the same name.

  • A new name can be assigned to the zip file by using the Name of Zip File Browse button.

  4. Click OK. The file is zipped to the selected location; and appears in the Zip Archive Contents section.

Unzip Data

  1. From the Zip tab, select the Unzip option.

  2. Click the File to Unzip Browse button to locate a file.

  3. From the Select an Item to Unzip section, select the file.

  4. Click OK. The file is unzipped to the specified directory.

Remove Data

  1. From the Zip tab, select the Remove option.

  2. Click the Zip Archive Browse button to locate a file to remove.

  3. From the Select an Item to Remove section, select the file.

  4. Click OK. The Epi Lock Delete confirmation dialog box opens.

  5. Click Yes. The file is removed.


Use Compact

Compact is an Epi Info utility for compacting Microsoft Access database files. Files can be compacted from Enter, VisData, or from the Epi Info main menu. When objects or data are deleted from a project, the file can become fragmented and use disk space inefficiently. Compacting the project makes a copy of the file and rearranges how the file is stored on the disk. Compacting optimizes the performance of both databases and projects.

The project to be compacted must be closed prior to using the Compact Utility.

  1. From the Epi Info main menu, select Utilities > Compact. The Compact dialog box opens.

Compact dialog box

  2. Click the MDB File to Compact Browse button to select a project. The Name of Compacted MDB File field populates with the same file name.

  3. Click the Name of Compacted MDB File Browse button to select a different or new file name for the compacted project.

  • Assign a password, if necessary.

  4. Click OK. The Compact dialog box opens.

  5. Click OK to close the dialog box.

  6. Click Exit to close Compact. You can check the size of the .MDB File in Windows.

Compact from the Command Line

Epi Menu command line syntax: Execute Compact.exe

DOS command line syntax: c:\Epi_Info\compact.exec:\Epi_Info\sample.mdb /s.

/s represents silent mode. This switch is optional.


Use Table-to-View

Table-to-View is an Epi Info utility used to generate a View based on an existing data table.

  1. From the Epi Info main menu, select Utilities > Table-to-View. The Table-to-View: Select a MDB File dialog box opens.

  2. Select the desired project (MDB) file.

  3. Click Open. The Select One Table dialog box opens.

  4. Select a table from the list or click Change Project to locate a table in another project.

  5. Click OK. The Table-to-View dialog box opens.

  6. Enter a new View Name or keep the default name.

  • If the opened View does not contain the fields needed, click Change Table.

  7. From the Table Fields list, select a field. Then, click the single forward arrow to move each to the View Fields list.

  • Click the double forward arrows to move all the fields.

  • Fields can be removed from the View Fields list using the back single arrow or back double arrows.

  8. Click Save. The Table-to-View dialog box resets.

  9. Click Exit.

  10. Open the new view using the MakeView module.

  • If there is a field name which is an Epi Info or Microsoft Access reserved word, Table-to-View will change it to filename.

  • A view can also be created from an existing data table using Make View.


Use the Word Processor

The word processor associated with Epi Info can be edited using the EpiInfo.MNU file by changing the menu and button options.

Changing the Default Word Processor using MENU

  1. From the Epi Info main menu, select Utilities > Word Processor. The WordPad application opens.

  2. Edit the word processor menu item.

  3. Edit the word processor command block.

  • The statement should be the same as one that runs the new word processor from Windows. For example, WinWord.exe may work for Microsoft Word.

  4. Save the Epi Info.mnu as a text file and test the menu item.

  • A common cause of problems in editing a .mnu file is that some word processors add an extra extension when saving to a text file, resulting in the naming scheme EpiInfo.mnu.txt. To prevent this, enclose the file name “xyz.mnu” in quotes when saving.


Introduction to the Command Reference

Epi Info is easy to operate in interactive mode, but complex or repeated operations require saving the steps as programs. Programs (similar to “scripts” in other software) can be used to set up menus, to guide and validate data entry, to restructure data, and to do analyses. Template files can be used to save graph and map settings so that customized graphics can be produced more than once. Report templates can be created to facilitate generation of standard reports as data are updated.

In Make View and Analysis, the process of programming consists of interacting with a series of dialogs that produce the actual program statements. Experienced users may want to edit the statements or type them directly in the Program Editor. For this reason, the details of command syntax are provided and include a definition of each command, its syntax and proper usage. Because a single command such as EXECUTE may be found in Make View, Analysis, and Menu, each command is presented in module based chapters with a notation of differences that may exist between implementation in the various programs. Some commands are only available in one or two of the programs. Check Commands are saved in Make View and executed in Enter. Menu commands are inserted into menu (.mnu) files using a text editor and executed by the Menu program. Analysis commands are generated, edited, and executed in the Analysis Program Editor. The Program Editor can be used to save programs for future use within the current project or as PGM files (.pgm).

Functions and operators appear within commands and are used for common tasks such as extracting a year from a date, combining two numeric values, calculating the duration between two dates, or converting numbers to text.


List of Reserved Words

List of Reserved Words in Epi Info

Reserved words in Epi Info may not be used for variable names, field names, or View names. Attempting to use a reserved word for any of these tasks will result in an error message or an automatic renaming.

Parser Reserved Words

ALL
ALWAYS
AND
APPEND
ASCENDING
ASSIGN
AUTOSEARCH
BEEP
BREAK
BITMAP
CLEAR
CLIPBOARD
CLOSEOUT
CMD
COLUMNSIZE
COMBINE
COMMANDLINE
COMPRESS
COXPH
DATABASES
DATEFORMAT
DBVARIABLES
DBVALUES
DBVIEWS
DECOMPRESS
DENOMINATOR
DESCENDING
DELETE
DELETED
DEFINE
DIALOG
DISPLAY
DLLOBJECT
ELSE
ELSEIF
EMIT
END
ENDBEFORE
EXCEPT
EXECUTE
EXIT
EXITFOR
FIELDVAR
FILESPEC
FOREACH
FREQ
FREQGRAPH
GLOBAL
GOTO
GRAPH
GRAPHTYPE
GRIDLINES
GRIDTABLE
GROUPVAR
HEADER
HELP
HIDE
HIVALUE
HYPERLINKS
IF
IGNORE
INTERVAL
KEYVARS
KMSURVIVAL
LET
LIKE
LINENUMBERS
LINKNAME
LIST
LOGISTIC
LOVALUE
MAP
MATCHING
MATCH
MATCHVAR
MEANS
MERGE
MISSING
MOD
MULTIGRAPH
NEWPAGE
NEWRECORD
NEXT
NOIMAGE
NOINTERCEPT
NOT
NOWRAP
NUMERIC
OFF
ON
OR
OUTTABLE
OVERLAYNEXT
PERCENTS
PERMANENT
PGMNAME
PRINTOUT
PROCESS
PSUVAR
PVALUE
QUIT
READ
RECODE
RECDELETED
RECORDCOUNT
REGRESS
RELATE
REPLACE
REPORT
REPORTDATA
RESPONSEVAR
ROUTEOUT
RUNPGM
RUNSILENT
SAVEDATA
SELECT
SET
SHOWOBSERVED
SHOWPROMPTS
SHOWSINGLECASES
SKIP
SORT
STANDARD
STARTFROM
STATISTICS
STATUSBAR
STRATAVAR
SUMMARIZE
SUMOF
SYSTEMDATE
SYSTEMTIME
TABLES
TEMPLATE
TEXTINPUT
TEXTFONT
TEXTOUT
THEN
THREED
TIMEVAR
TIMEUNIT
TITLETEXT
TO
TYPEOUT
UNDEFINE
UNDELETE
UNHIDE
UPDATE
USEBROWSER
VALUEVAR
VIEWNAME
WEIGHTVAR
WRITE
XOR
XTITLE
YN
YTITLE

Jet/ODBC Reserved Words

ABSOLUTE
ACTION
ADA
ADD
ALL
ALLOCATE
ALPHANUMERIC
ALTER
AND
ANY
ARE
AS
ASC
ASSERTION
AT
AUTHORIZATION
AUTOINCREMENT
AVG
BEGIN
BETWEEN
BINARY
BIT
BIT_LENGTH
BOOLEAN
BOTH
BY
BYTE
CASCADE
CASCADED
CASE
CATALOG
CHAR
CHAR_LENGTH
CHARACTER
CHARACTER_LENGTH
CHECK
CLOSE
COALESCE
COLLATE
COLLATION
COLUMN
COMMIT
CONNECT
CONNECTION
CONSTRAINT
CONSTRAINTS
CONTINUE
CONVERT
CORRESPONDING
COUNT
COUNTER
CREATE
CROSS
CURRENCY
CURRENT
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_USER
CURSOR
DATABASE
DATE
DATETIME
DAY
DEALLOCATE
DEC
DECIMAL
DECLARE
DEFAULT
DEFERRABLE
DEFERRED
DELETE
DESC
DESCRIBE
DESCRIPTOR
DISALLOW
DISCONNECT
DISTINCT
DISTINCTROW
DOMAIN
DOUBLE
DROP
ELSE
END
END-EXEC
EQV
ESCAPE
EXCEPT
EXCEPTION
EXEC
EXECUTE
EXISTS
EXTERNAL
EXTRACT
FALSE
FETCH
FIRST
FLOAT
FLOAT8
FLOAT4
FOR
FOREIGN
FORTRAN
FOUND
FROM
FULL
GENERAL
GET
GLOBAL
GO
GOTO
GRANT
GROUP
GUID
HAVING
HOUR
IDENTITY
IEEEDOUBLE
IEEESINGLE
IMMEDIATE
IMP
IN
INCLUDE
INDEX
INDICATOR
INITIALLY
INNER
INPUT
INSENSITIVE
INSERT
INT
INTEGER
INTEGER1
INTEGER2
INTEGER4
INTERSECT
INTERVAL
INTO
IS
ISOLATION
JOIN
KEY
LANGUAGE
LAST
LEADING
LEFT
LEVEL
LIKE
LOCAL
LOGICAL
LOGICAL1
LONG
LONGBINARY
LONGTEXT
LOWER
MATCH
MAX
MEMO
MIN
MINUTE
MODULE
MONEY
MONTH
SQLNULL
NAMES
NATURAL
NCHAR
NEXT
NO
NONE
NOT
NULL
NULLIF
NUMBER
NUMERIC
OCTET_LENGTH
OF
OLEOBJECT
ON
ONLY
OPEN
OPTION
OR
ORDER
OUTER
OUTPUT
OVERLAPS
OWNERACCESS
PAD
PARAMETERS
PARTIAL
PASCAL
PERCENT
PIVOT
POSITION
PRECISION
PREPARE
PRESERVE
PRIMARY
PRIOR
PRIVILEGES
PROCEDURE
PUBLIC
READ
REAL
REFERENCES
RELATIVE
RESTRICT
REVOKE
RIGHT
ROLLBACK
ROWS
SCHEMA
SCROLL
SECOND
SECTION
SELECT
SESSION
SESSION_USER
SET
SHORT
SINGLE
SIZE
SMALLINT
SOME
SPACE
SQL
SQLCA
SQLCODE
SQLERROR
SQLREAL
SQLSTATE
SQLSTRING
SQLWARNING
STDEV
STDEVP
SUBSTRING
SUM
SYSTEM_USER
TABLE
TABLEID
TEMPORARY
TEXT
THEN
TIME
TIMESTAMP
TIMEZONE_HOUR
TIMEZONE_MINUTE
TO
TOP
TRAILING
TRANSACTION
TRANSFORM
TRANSLATE
TRIM
TREE
UNION
UNIQUE
UNKNOWN
UPDATE
UPPER
USAGE
USER
USING
VALUE
VALUES
VAR
VARBINARY
VARCHAR
VARP
VARYING
VIEW
WHEN
WHENEVER
WHERE
WITH
WORK
WRITE
YEAR
YESNO
ZONE


Always Command (Check Code Reference)

ALWAYS

Check Command

Description

ALWAYS causes a block of code in the Record or Page event to execute when navigating between records for both existing records as well as new records. Without the ALWAYS block, check commands in the Record and Page events are only executed for new records.

ALWAYS is often used to assign values to global or permanent variables for use in related Views or in an Analysis program. ALWAYS is also used to hide or unhide fields based on specified conditions or values in fields on existing records.

Syntax

ALWAYS
<any check code>
END

Comments

ALWAYS blocks are intended for the RECORD and PAGE events. The ALWAYS command will be ignored if it is placed in any other event. An easy way to test this is to insert a DIALOG command.

Examples

Example 1: A dialog box is displayed when a new record is created. This code should appear in the BEFORE section of a RECORD event.

ALWAYS
DIALOG "Code in ALWAYS block has run."
END
ENDBEFORE

Example 2: Two dialog boxes are displayed: One in the ALWAYS block and one outside of the ALWAYS block. This code should appear in the BEFORE section of a RECORD event.

ALWAYS
DIALOG "Code inside of the ALWAYS block has run."
END
DIALOG "Code outside of the ALWAYS block has run."
ENDBEFORE

Example 3: The ALWAYS block is used to assign a unique ID to each record. This code should appear in the BEFORE section of a RECORD event, and assumes a read-only text field called 'PatientID' exists in the View.

ALWAYS
ASSIGN PatientID = FORMAT(UniqueKey)
END

Example 4: The ALWAYS block is used to hide or unhide a field. As records are displayed during navigation, the Pregnant, Gestation, and Trimester fields are either hidden or unhidden depending on the value of Sex.

ALWAYS
IF Sex = "Female" THEN
UNHIDE Pregnant Gestation Trimester
ELSE
HIDE Pregnant Gestation Trimester
END
END
ENDBEFORE


Assign Command (Check Code Reference)

ASSIGN

Check Command

Command Generator

Description

This command assigns the result of an arithmetic or string expression to a variable.

Syntax

ASSIGN <variable> = <expression>

ASSIGN <variable> = <defined DLLOBJECT>!<script function>({<parameters>})

  • The <variable> represents a variable in a database or a defined variable created in a program.

  • The <expression> represents any valid arithmetic or string expression.

  • The <defined DLLOBJECT> represents any variable defined as a DLL object.

  • The <script function> represents the name of a class or method inside the DLL or WSC that returns the desired value to be assigned.

  • The <parameters> represent one or more optional function parameters to be passed into the DLL or WSC (do not include the {} or <> symbols in the code, however the parenthesis are required).

Comments

This command assigns the value of an expression to a variable. The variable may be a database variable in a View or Data Table, a user-defined variable created by the DEFINE command, or a system variable.

Examples

Example 1: The patient's age is calculated using the date of birth and the date the survey was last updated. The example assumes a View exists that has the following fields: DOB (Date), SurveyDate (Date), and Age (Numeric). The code below would appear in the AFTER section of the second date field to be filled in by the user.

IF NOT BirthDate = (.) AND NOT SurveyDate = (.) THEN
ASSIGN Age = YEARS(BirthDate, SurveyDate)
END

Example 2: The code below will automatically set the checkbox field 'Minor' to true when the value of the field 'Age' is below 18. The example assumes a View exists that has the following fields: Minor (Checkbox) and Age (Numeric). The code below would appear in the AFTER section of the Age field.

IF Age < 18 THEN
ASSIGN Minor = (+)
END

Example 3: A field is assigned the value of a mathematical expression that is used to calculate body mass index. The example assumes a View exists that has the following fields: BMI (Numeric), Weight (Numeric), and Height (Numeric). The code below would appear in the AFTER section of the last field to be entered. Note that Weight and Height in this formula are being measured in pounds and inches, respectively.

ASSIGN BMI = (Weight / (Height * Height)) * 703

Example 4: A patient ID field is automatically generated using the patient's last name, gender, and middle initial. The example assumes a View exists that has the following fields: ID (Text), LastName (Text), Sex (Text), and MI (Text). The code below would appear in the AFTER section of the last of the above fields to be entered.

ASSIGN ID = LastName & " - " & Sex & " (" & MI & ")"

Example 5: A global unique identifier is automatically generated using a registered Windows Scripting Component (in this case, GetGlobalUniqueID.wsc). The example assumes a View exists that has a text field named GUID. It also assumes that in the DEFINEDVARIABLES section of check code, the variable MyGUID was defined as a DLL object. In this example, GUID is only assigned a value if the field is blank. The code below would appear in the RECORD section of check code.

ALWAYS
IF GUID = (.) OR GUID = "" THEN
ASSIGN GUID = MyGUID!GetGlobalUniqueID()
END
END
ENDBEFORE


Autosearch Command (Check Code Reference)

AUTOSEARCH

Check Command

Command Generator

Description

AUTOSEARCH causes Enter to search for records with values in the specified fields that match those of the current record. If a match is found, it can be displayed and edited or ignored and the current record can continue to be entered.

Syntax

AUTOSEARCH [<field(s)>]

  • The <field(s)> represents one or more fields to search.

Comments

The results are displayed as a spreadsheet. If there are more records returned than can be viewed in a single screen, a scroll bar appears to the right of the spreadsheet. With the mouse, use the scroll bar to see the additional matched records.

To quickly navigate to one of the matched records returned, double-click the row to navigate to. Alternatively, move the cursor to the desired row and press Enter or click OK. Navigating to a matched record will discard any data entered to the new record. All fields will show data from the selected record. The record number indicator at the lower left will show the record number of the selected record. To avoid selecting any of the matched records, press Esc or click Cancel. This returns to the current new record and data entry will continue for the new record.

Fields displayed as the result of a search are determined as follows:

  • If a single field is the key field, that field and as many other fields as possible are displayed.

  • If there are multiple key fields, these are displayed first and then as many of the remaining fields as possible are shown.

  • AUTOSEARCH will use the Soundex key on all search fields that have them.

Example

The AUTOSEARCH command is used to find duplicate entries during data entry. Duplicates are, in this example, identified by a matching first name and last name as in a name-based registry system. The example assumes a View exists that has the following fields: FirstName (Text) and LastName (Text). The code below would appear in the AFTER section of the second field to be filled in by the user.

AUTOSEARCH FirstName LastName

Note: When searching on multiple fields, put the AUTOSEARCH command in check code for a field after all the key values have been entered. In the example above, since both FirstName and LastName are key fields and LastName is the last of the key fields to be entered, the AUTOSEARCH command should appear in the Check Code for LastName.

Soundex is a phonetic algorithm for indexing names by sound. With this algorithm, the names “Smith” and “Smythe”, while spelled differently, but having the same sound, would result in the same Soundex code. If a text type field is defined with the Soundex property checked, and this field is specified as a key field in the AUTOSEARCH command in Check Code, the Soundex key is used for the seach rather than the actual field value. This provides for a “fuzzy search” on similar sounding names where the correct spelling may be uncertain. See also the topic on Soundex for more information.


Beep Command (Check Code Reference)

BEEP

Check Command

Description

This command causes the computer to generate a beep sound. This is often used to emphasize a customized message or warning dialog during data entry.

Syntax

BEEP

Comments

Command must be typed into the Program Editor as it is not available using the Command Tree.

Example

The computer emits a beep when invalid data is detected in the Age field. This code should appear in the AFTER section of the Age field.

IF Age > 5 THEN
BEEP
DIALOG "Do not include records for children over 5."
END


Clear Command (Check Code Reference)

CLEAR

Check Command

Command Generator

Description

CLEAR sets the field named to the missing value, as though the field had been left blank. It is used to clear a previous entry when an error has been detected or a change occurs. More than one field may be specified. CLEAR is frequently followed by a GOTO command which places the cursor in position for further entry after an error.

Note: More than one field can be used with the CLEAR command.

Syntax

CLEAR [<field(s)>]

  • The <field> represents the name of a field on the View. If more than one field is specified, fields are separated with a space.

Comments

CLEAR will delete the value only for the current record. CLEAR cannot be used in grid tables. In Analysis, to clear a variable it is necessary to use the ASSIGN command to assign it a value of null (.).

Examples

Example 1: The code below prevents invalid data from being saved to the current record by erasing it as soon as it is detected. The example assumes a View exists that has the following fields: Age (Numeric). The code below would appear in the AFTER section of the Age field.

IF Age >= 18 THEN
BEEP
DIALOG "Do not include records for adults."
CLEAR Age
END

Example 2: The code below prevents an invalid date from being saved to the current record by erasing it as soon as it is detected. The example assumes a View exists that has the following fields: DOB (Date) and SurveyDate (Date). The code below would appear in the AFTER section of the SurveyDate field.

IF (DOB > SurveyDate) OR (SurveyDate > SYSTEMDATE) THEN
CLEAR DOB SurveyDate
DIALOG "Invalid date detected. Please try again."
END

Example 3: The code below prevents an invalid date from being saved to the current record by erasing it as soon as it is detected. By using a GOTO command to move the cursor back to the SurveyDate field, the user is forced to keep entering data until valid data is detected. The example assumes a View exists that has the following fields: DOB (Date) and SurveyDate (Date). The code below would appear in the AFTER section of the SurveyDate field.

IF DOB > SurveyDate THEN
CLEAR SurveyDate
GOTO SurveyDate
DIALOG "Survey date invalid. Please try again."
END


Comments (*) (Check Code Reference)

COMMENTS (*)

Check Command

Description

In Check Code, Analysis, and Menu, the asterisk symbol is used to comment a line. Commented lines are not executed. This allows for entering user-defined comments to identifying tasks, describing variable names or code blocks for documentation, and to assist with trouble-shooting or debugging.

Syntax

* <text>

  • The <text> represents any alphanumeric text as a comment or a block of code that is to be ignored.

Comments

The * character must be placed in the first column of a line for it to be recognized as comment mark. For comments longer than one line, the * character should be added for each new line. Use comments to disable commands.

Examples

Example 1: Comments are used to note the date of the code's generation, the purpose of the code, and the author of the code.

*****************************************************************
* Written by Jason D. Veloper, MPH – 06/30/2010
* The block of code below uses the YEARS function
*****************************************************************
ASSIGN AGE = YEARS(DOB, SYSTEMDATE)

Example 2: Comments are used to disable certain commands from executing.

* The next few lines are incomplete and are commented for later
* DEFINE PatientID Numeric – Note: need to determine ID should be a
* Text type variable.
* LIST – ToDo: need to add the variables to list


Define Command (Check Code Reference)

DEFINE

Check Command

Command Generator

Description

This command creates a new variable. In Check Code, all user defined variables are saved in the DEFINEDVARIABLES section.

Syntax

DEFINE <variable> {<scope>} {<type indicator>}

  • <variable> represents the name of the variable to be created. <variable> cannot be a reserved word. For a list of reserved words see the List of Reserved Words.

  • <scope> is optional and is the level of visibility and availability of the new variable. <scope> must be one of the reserved words: STANDARD, GLOBAL, or PERMANENT. If omitted, STANDARD is assumed and a type indicator cannot be used. For information on defining a variable as a DLL OBJECT, see the DEFINE DLLOBJECT command.

  • <type indicator> is optional and cannot be used if <scope> is omitted. <type indicator> is the data type of the new variable and must be one of the following reserved words: NUMERIC, TEXTINPUT, YN, or DATEFORMAT. If omitted, the variable type will be inferred based on the data type of the first value assigned to the variable. Thereafter the variable type cannot be changed. An attempt to assign data of a different type to the variable will result in an error.

Comments

A custom variable defined in Epi Info might not have a predefined data type if the <type indicator> is omitted when the variable is defined. If the variable does not have a predefined type and it has not been used, then the variable will accept a value in any of the four data types (Text, Number, Date, Yes/No (Boolean)) that is assigned to the variable the first time. Thereafter, the variable takes on the data type of the value assigned and variable’s data type cannot be changed. An attempt to assign data of a different data type will result in an error. Various functions can be used to manipulate data, changing data type of values to match the data type of the variable. Some of these functions include FORMAT, TXTTONUM, TXTTODATE, and NUMTODATE.

Variable Scope

  • STANDARD variables retain their value only within the current record and are reset when a new record is loaded. Standard variables are used as temporary variables behaving like other fields in the database. In Analysis, Standard variables lose their values and definitions with each READ statement.

  • GLOBAL variables retain values across related Views and when a new View is opened by the program, but are removed when the Enter program is closed. Global variables persist for the duration of program execution. Global variables are also used in Analysis to store values between changes of data source.

  • PERMANENT variables are stored in the EpiInfo.INI file and retain any value assigned until the value is changed by another assignment or the variable is undefined. Permanent variables are shared among Epi Info programs (Menu, Enter, Analysis, etc.) and persist even if the computer is shut down. Permanent variables in Analysis may not have values that depend directly or indirectly on table fields. A <prompt/description> created for a permanent variable will exist for one session and must be re-established each time it is used.

Type Indicators

  • TEXTINPUT - Variables of this data type can receive any alpha-numeric characters including symbols and the output of functions such as FORMAT.

  • NUMERIC - Variables of this data type can receive numbers and the output of functions such as TXTTONUM.

  • DATEFORMAT - Variables of this data type can receive date values including the output of functions such as TXTTODATE and NUMTODATE.

  • YN - Variables of this data type can receive the boolean values of (+) for Yes and (-) for No. Until an assignment is made, YN type variable values are (.) or missing.

Examples

Example 1: A variable is defined without <scope>, <type indicator>, and <prompt/description>. Standard scope thus becomes the default scope. As no type is specified, the variable can be assigned number, date, text, or boolean data. However, once assigned a value, the data type of the variable becomes the data type of the value that has been assigned and may not be changed.

DEFINE BodyMassIndex

Example 2: A variable with permanent scope is defined, but with no <type indicator>. As described above in Example 1, the data type of the variable will be set with the first assignment of data and cannot be changed thereafter.

DEFINE StateID PERMANENT

Example 3: A variable with global scope and of type text is defined.

DEFINE PatientID GLOBAL TEXTINPUT

Example 4: A variable with standard scope and of type YN is defined.

DEFINE DoYouSmoke YN
IF DateSmokingStarted = (+) THEN
ASSIGN DoYouSmoke = (+)
ELSE
ASSIGN DoYouSmoke = (.)
END

Example 5: A variable with standard scope and in date format is defined.

DEFINE DateOfBirth DATEFORMAT

Example 6: A variable with permanent scope and text format is defined. This example illustrates how a permanent variable can be set in Check Code and influence the behavior of a button in a Menu (.mnu). Another button or block of Check Code might reset the variable for some purpose in Analysis, for example. The following code would appear in the DEFINEDVARIABLES section of Check Code.

DEFINE NextView PERMANENT TEXTINPUT

* The following Check Code might exist in a Command Button. This
* example assumes a CommandButton named "CloseCurrentView" exists
* and the Check Code would be in the section pertaining to that
* button. When the CloseCurrentView button is clicked, the Check
* Code assigns the permanent variable, NextView, the value of
* "Surveillance", then it closes the Enter program with the QUIT
* command.

*** CloseCurrentView section of Check Code
ASSIGN NextView = "Surveillance"
QUIT

In a Menu (.mnu) file, the following code block might be used to call the Enter program to open a view based on the value of the NextView variable. In this example, the Surveillance view from the Sample.mdb database would be opened. The system variable WorkDir is also used and specifies the current working directory which may be different than the default "C:\Epi_Info\" folder. This Menu code assumes there is a Button or MenuItem that calls the block of code labeled "OpenNextView".

*SampleMenu.mnu
OpenNextView
Begin
* After opening the Surveillance View, the next line of Menu
* code resets the value of NextView to “Oswego”—another View
* in the Sample.mdb.
EXECUTE Enter.exe '@@WorkDir \Sample.mdb:@@NextView '
ASSIGN NextView = "Oswego"
End


Define DLLObject Command (Check Code Reference)

DEFINE DLLOBJECT

Check Command

Description

This command creates a variable that represents an ActiveX object and a class within either an ActiveX DLL (dynamic link library) file, and ActiveX EXE (executable file), or a Windows Scripting Component (WSC) file.

Syntax

ActiveX DLL File

DEFINE <variable> DLLOBJECT "<ActiveX name>.<class>"

Windows Scripting Component (WSC) File

DEFINE <variable> DLLOBJECT "<filename>"

  • The <variable> represents the name of the variable to be created. <variable> cannot be a reserved word.

  • The <ActiveX name> represents the internal name of the ActiveX object that contains the class object for the DLL or EXE file.

  • The <class> represents a internal class name that is defined within the ActiveX component.

  • The <filename> represents the name of the Windows Scripting Component (WSC) file in which the script component resides.

Comments

The ActiveX name may not be the same as the actual name of the dll (dynamic link library) or executable (exe) file. When an ActiveX object is developed, it is given a project name. This is the name that is required to create the object. The ActiveX object (executable or dll) must be registered before it can be used. Windows Scripting Component (WSC) objects can also be used.

Examples

Example 1: A variable is created that points to a class object within the Epiweek DLL file. This variable can subsequently be used to find the Epi Week for any given date.

DEFINE Week DLLOBJECT "EIEpiwk.Epiweek"

Example 2: A variable is created that points to a class object within the GetGlobalUniqueID.WSC file. This variable can then be used to assign a field a unique ID.

DEFINE Global_ID DLLOBJECT "GetGlobalUniqueID.WSC"


Dialog Command (Check Code Reference)

DIALOG

Check Command

Command Generator

Description

This command provides information to the user from within a program. Dialogs can display information such as custom error or warning messages; they can ask for and receive input; and they offer lists from which the user may select a choice. There are three forms that DIALOG may take: Simple form, Get Variable form, and List of Values form.

Syntax

Simple Form

DIALOG "<prompt>" {TITLETEXT="<title>"}

  • <prompt> represents the text to be displayed as the message to the user. The quotes around <prompt> are required, even if the quotes contain nothing.

  • <title> represents the text to be used as the caption for the dialog window. If <title> is omitted in the Dialog command, a blank title bar will be displayed for the dialog box.

Get Variable Form

DIALOG "<prompt>" <variable> {<entry type>} {TITLETEXT="<title>"}

DIALOG "<prompt>" <variable> "<value 1>", "<value 2>", "<value 3>", … ,"<value n>" {TITLETEXT="<title>"}

DIALOG "<file type selection>" <variable> READ {TITLETEXT="<title>"}

DIALOG "<file type selection>" <variable> WRITE {TITLETEXT="<title>"}

  • <variable> represents the variable to store value entered.

  • <entry type> represents a reserved word and/or mask that defines the type of input to be accepted and stored in the variable. The following are valid entry types:

    1. TEXTINPUT specifies the input as text.

    2. YN specifies the input as Yes or No (Boolean).

    3. DATEFORMAT {"<date mask>"} specifies the input as a date; if a date mask is not specified, the system short date is used. The mask must be contained within quotation marks. See valid date masks below.

    4. "<numeric mask>" specifies the input as numeric. This option is identified as "Number Only". The numeric mask should be a text string such as "####" or "##.###" that indicates the type of data to be entered. # indicates a digit. The mask must be contained within quotation marks. See valid numeric masks below.

    5. If no <entry type> is specified, the input variable is interpreted as a number if possible; if the value is not a valid number but is a valid date, it is interpreted as a date; otherwise an error occurs.

  • <value> represents a value in a drop-down list of choices. Each value included in the command will be shown as a single item in the list.

  • <file type selection> controls the type of files that are displayed for selection. It consists of alternating description and filter elements separated by vertical bars. The description is displayed for the user to select. The corresponding filter element selects the files. If this element is left blank, all files will be available for selection. Syntax is created using the File Open and File Save options from the Dialog Format drop down menu.

List of Values Form

DIALOG "<prompt>" <variable> [<list type>] {TITLETEXT="<title>"}

DIALOG "<prompt>" <variable> DBVALUES <table name> {TITLETEXT="<title>"}

  • The [<list type>] are DATABASES and DBVIEWS

Comments

The Simple form of DIALOG places a dialog box on the screen, using the text provided, with an OK button.

The Get Variable form of DIALOG displays the text prompt and provides a means for entering a value. If YN is specified, “Yes,” “No” and “Cancel” buttons are presented and the specified variable is set to (+), (-), or (.). If TEXTINPUT or no entry type is specified, an entry field for user response is provided, with OK and Cancel buttons. The variable is assigned the value of the user’s input, with a missing value if Cancel is chosen.

The Get Variable form of the DIALOG command can also display a file selection dialog. If READ is used, only existing files are displayed. If WRITE is used and an existing file is selected, the user is presented with the Overwrite? prompt. The Multiple Choice form of DIALOG displays the text prompt and provides a combo box for selecting among the values with OK and Cancel buttons presented. The variable is assigned the value of the user’s input, with a missing value if Cancel is chosen. Variable will text type. The Date form of the DIALOG command uses a special control for accepting the user's input. Each section of the date (year, month, and day) can be increased or decreased independently using the drop down calendar. Using this control, it is impossible to select an invalid date.

The List of Values form of DIALOG displays a combo box of databases or view variables with OK and Cancel presented. The variable is assigned the value of the user’s input, with a missing value if Cancel is chosen. Variable will be text type. The VARIABLE VALUE form of DIALOG displays a combo box of distinct values of the specified variable in the specified database. OK and Cancel buttons are presented. The variable is assigned the value of the user’s input, with a missing value if Cancel is chosen. The variable will be of the same type as the database variable.

Date Mask
* | System Time Format
! | System Long Date

Numeric Mask
# | Digit placeholder (Entry required)
. | Decimal placeholder. The actual character used is the one specified as the decimal placeholder in the computer's international settings.
, | Thousand separator. The actual character used is the one specified as the thousands placeholder in the computer's international settings.
9 | Digit placeholder. (Entry optional)
Punctuation | Included in the display

Custom Formats
D | One- or two-digit day.
Dd | Two-digit day. Single digit day values are preceded by a zero.
Ddd | Three-character weekday abbreviation.
dddd | Full weekday name.
H | One- or two-digit in 12 hour format.
Hh | Two-digit hour in a 12-hour format. Single digit values are preceded by a zero.
H | One- or two-digit hour in 24-hour format.
HH | Two-digit hour in a 24-hour format. Single digit values are preceded by a zero.
M | One- or two-digit minute.
Mm | Two-digit minute. Single digit values are preceded by a zero.
M | One- or two-digit month number.
MM | Two-digit month number. Single digit values are preceded by a zero.
MMM | Three-character month abbreviation.
MMMM | Full month name.
S | One- or two-digit seconds.
Ss | Two-digit seconds. Single digit day values are preceded by a zero.
T | One-letter AM/PM abbreviation. AM displays as A.
Tt | Two-letter AM/PM abbreviation. AM displays as AM.
Y | One-digit year. 1997 displays as 7.
Yy | Last two digits of the year. 1997 displays as 97.
Yyyy | Full year. 1997 displays as 1997.
Punctuation | Included in the display

Examples - Simple Form

Example 1: A dialog box is displayed for informational purposes. The code below would appear in the BEFORE section of a RECORD or PAGE event.

DIALOG "Welcome to the ENTER module!" TITLETEXT="Welcome!"

Example 2: A dialog box is used to show a potential data entry error using an IF-THEN block. The example assumes a View exists that has the following fields: Age (Numeric) and Pregnant (Yes/No). The code below would appear in the AFTER section of either Age or Pregnant, depending on the order of entry.

IF Age < 10 AND Pregnant = (+) THEN
DIALOG "Warning: Please verify Age and Pregnant responses."
END

Examples - Get Variable Form

Example 1: The dialog box shows a prompt that allows the user to enter the text of their choice. The text that is entered will be saved to the Name variable. The example assumes a View exists that has the following fields: Name (Text). The code below would appear in the BEFORE section of the Name field.

DIALOG "Enter your name" Name TITLETEXT="Name"

Example 2: A dialog box is displayed that will prompt the user for a file. Upon choosing the file, the full path and filename of the file are saved to the specified variable. The example assumes a View exists that has the following fields: FileName (Text). The code below would appear in the BEFORE section of the FileName field.

DIALOG "Open a file" FileName READ TITLETEXT="New File"

Example 3: A dialog box is displayed that will prompt the user for an image file in either JPG or bitmap format. Upon choosing the file, the full path and filename of the file are saved to the specified variable. The example assumes a View exists that has the following fields: FileName (Text). The code below would appear in the BEFORE section of the FileName field.

DIALOG "Image files|*.bmp;*.jpg;|Allfiles|*.*" FileName READ TITLETEXT="Get image files"

Example 4: A dialog box is displayed that allows the user to enter a number. An input mask is used in order to force the user's input to three whole digits and one decimal.

DIALOG "Enter patient weight" Weight "###.#"

Example 5: A dialog box is displayed that allows the user to enter a number. An input mask is used in order to force the user's input to either one or two whole digits and one decimal digit. (The 9 represents an optional digit.)

DIALOG "Enter patient age" Age "9##.#"

Example 6: The dialog box shows a prompt that allows the user to select a date from a date selector. The example assumes a View exists that has field or variable named InitialDate (Date).

DIALOG "Select the program start date:" StartDate DATEFORMAT "MM-DD-YYYY"

Examples - List of Values Form

Example 1: The dialog box asks the user to choose a database file. Upon choosing the file, the full path and filename of the file are saved to the specified variable. The example assumes a View exists that has the following fields: TableName (Text). The code below would appear in the BEFORE section of the TableName field.

DIALOG "Select a database" TableName DATABASES

Example 2: The user is presented with a drop-down list of choices. The list of choices that the user sees are a part of the command; in this case, GA, CA, AZ, NY and NJ. The example assumes a View exists that has the following fields: State (Text). The code below would appear in the BEFORE section of the State field.

DIALOG "Select a state" State "GA", "CA", "AZ", "NY", "NJ" TITLETEXT="States"

Example 3: A drop-down list of choices is displayed. Each list item is retreived from the X_COORD column of the SohoDead data table. The example assumes a View exists that has the following fields: Coordinates (Numeric). The code below would appear in the BEFORE section of the Coordinates field.

DIALOG "Select Coordinates" Coordinates DBVALUES SohoDead X_COORD TITLETEXT="Coordinates"


EndBefore Command (Check Code Reference)

ENDBEFORE

Check Command

Description

This command divides Check Commands to be executed before data entry from those executed after entry. All commands that are above ENDBEFORE are executed before data entry to the field, page, or View. If ENDBEFORE is omitted, all commands are executed after data entry, when the Enter or Tab keys are pressed.

Syntax

ENDBEFORE

  • ENDBEFORE is only used in Check Code. Command buttons will not take ENDBEFORE since all code inserted will be executed when the user clicks the button.

Comments

This command controls actions so that they occur before or after accessing a View, record, page, or field. The default time for execution of commands associated with a variable is after entry.

ENDBEFORE must be placed starting in the first position of the line. No other command can be placed in the same line. If end before is not present, Epi Info will execute all commands after the condition.

Example

The following commands represent the Check Code for a variable called Demo1

DIALOG "This is Before entry"
ENDBEFORE
DIALOG "This is After entry"


Execute Command (Check Code Reference)

EXECUTE

Check Command

Command Generator

Description

Executes a Windows or DOS program - either one explicitly named in the command or one designated within the Windows registry as appropriate for a document with the file extension that is named. This provides a mechanism for bringing up whatever word processor or browser is the default on a computer without first knowing its name. The EXECUTE command accepts a series of paths, separated by semicolons, as in:

EXECUTE c:\epi_info\myfile.exe;d:\myfile.exe

If the first is not found, the others are tried in succession. In Check Code, the EXECUTE command can be placed in any command block, but is often used with a button. A button does not have a Before Entry section.

Syntax

EXECUTE <filename>

EXECUTE "<filename> <command-line parameters>"

EXECUTE NOWAITFOREXIT <filename>

EXECUTE NOWAITFOREXIT '<filename>'

EXECUTE NOWAITFOREXIT "<filename>"

EXECUTE WAITFOREXIT <filename>

EXECUTE WAITFOREXIT '<filename>'

EXECUTE WAITFOREXIT "<filename>"

  • The <filename> represents the path and program name for .exe (filename for registered Windows programs) and .com (filename for MS-DOS binary executables) files.

  • The <command-line parameters> represent any additional command-line arguments that the program can accept.

  • When Wait for Command to Execute (modal) is specified, the command should run and Enter should also continue running. When Wait for Command to Execute is not specified (non-modal), Enter should wait until the executed program closes before continuing. When EXECUTE is run modally, permanent variables are written before the command is executed and reloaded after the command is executed.

Comments

If the name of an executable program, such as ENTER.EXE or MYBATCH.BAT or even MYWEB.HTM is given, the program will be run in a separate window. When the program terminates, the window is closed.

If the name given is not a program, but a file with an extension (the 3 characters after the ".") registered by Windows for displaying the document, the correct program to display the file will be activated. For example, WRITEUP.DOC might cause Microsoft Word© to run and load the file on one computer. On another machine, however, .DOC might correspond to Corel WordPerfect©. Usually .TXT will run NOTEPAD.EXE© or WORDPAD.EXE©, and image files will appear either in a browser or in a graphics program on your computer. An .HTM file will bring up the default browser on your computer.

The location or even the name of the program that will be run does not need to be supplied. These details are stored in the Windows registry for common file extensions. The same concept applies to Internet addresses (URLs). Give a URL (Universal Resource Locator) that ends in .HTM or begins with HTTP:// “http://www.cdc.gov/epiinfo/” and Windows brings up the default browser on the computer, connects to the Internet (if possible), and goes directly to the site indicated.

Examples

Example 1: A text file on the C drive is opened. The operating system will select an application with which to open the file.

EXECUTE 'C:\logfile.txt'

Example 2: An executable file is run.

EXECUTE "C:\Windows\Notepad.exe"

Example 3: Windows Internet Explorer is run and passed http://www.cdc.gov/epiinfo as a command-line parameter. Because WAITFOREXIT is specified, Enter will not allow the user to continue entering data until the browser window is closed.

EXECUTE WAITFOREXIT "C:\Program Files\Internet Explorer\iexplore.exe http://www.cdc.gov/epiinfo"


GoTo Command (Check Code Reference)

GOTO

Check Command

Command Generator

Description

This command can be used alone or in an IF statement to transfer the cursor to a named variable field.

Syntax

GOTO <event>

  • The <event> can be a +1, -1, page number or a variable.

Event and Description

  • +1 Automatically saves the current page, if changes have been made, and goes to the next page.

  • -1 Automatically saves the current page, if changes have been made, and goes to the previous page.

  • <page number> Automatically saves the current page, if changes have been made, and goes to the page indicated by the number.

  • <variable name> Goes to the variable indicated. Will automatically saves the current page, if changes have been made, if the variable is on another page.

Comments

If GoTo is in the Before or After Record event, it will be ignored. The GoTo command makes all the variables in between unavailable for data entry or Read Only.

Examples

Example 1: The View will skip directly from one field to another based on certain user input. The example assumes a View exists that has the following fields: DoYouSmoke (Yes/No), PacksPerDay(Numeric), and HeartDisease (Yes/No). The code below would appear in the AFTER section of the DoYouSmoke field.

IF DoYouSmoke = (+) THEN
GOTO HeartDisease
ELSE
GOTO PacksPerDay
END

Example 2: The user is taken to the second page on the View based upon an answer they give to a question on lung disease. The example assumes a View exists that has two pages and the following fields: LungDisease (Yes/No). The code below would appear in the AFTER section of the LungDisease field.

IF LungDisease = (-) THEN
GOTO 2
END

Example 3: The user is taken to the page immediately following the one they are on currently. The example assumes a View exists that has two pages and the following fields: DOB (Date) on page 1. The code below would appear in the AFTER section of the DOB field.

IF NOT DOB = (.) THEN
GOTO +1
END


Help Command (Check Code Reference)

HELP

Check Command

Command Generator

Description

This command displays an .HTM or .CHM document.

Syntax

HELP '<filename>' "{block name}"

  • The <filename> represents the full path and file name of the help file to be opened.

  • The {block name} represents an optional bookmark or named anchor. In .CHM files, the block name can be a path to an .HTM document within the file.

Comments

The <filename> must end in .htm, .html, or. .chm. If an optional {block name} is given, the browser searches for named anchors ("bookmarks") in the HTML file and positions the anchor at the top of the screen. An anchor in HTML can be created by using a tag like <a name="Bali Hai">.

If no directory path is given, the HELP command will look first in the HELP directory under the currently designated language directory (e.g., .\SPANISH\HELP. If the file is not found, it looks in the default HELP directory, .\ENGLISH\HELP. That failing, it looks in the currently logged directory. This allows translated help files to be accessed automatically as long as they retain the name (and block names) of the corresponding English versions.

Filenames must be enclosed in single quotes, and anchor names must be surrounded by double quotes.

Examples

Example 1: The HELP command loads the file 'South Pacific.HTM' in the computer's default web browser, and then automatically scrolls down to the location of the anchor named 'Bali Hai'.

HELP 'South Pacific.HTM' "Bali Hai"

Example 2: The HELP command loads the file 'Function.HTM' in the computer's default web browser. As no anchor is specified, the browser does not scroll to any predetermined location.

HELP 'Function.HTM' ""

Example 3: The HELP command loads the file 'EIHelp.CHM' in the Windows Help application. The path and file name that appear in the second part of the command point to a specific topic in the CHM file.

HELP 'EIHelp.CHM' "Command_Reference\CHECK\MV_Define_Command.htm"


Hide/Unhide Command (Check Code Reference)

HIDE/UNHIDE

Check Command

Hide Command Generator

Unhide Command Generator

Description

(HIDE) This command hides a field from view and prevents data entry.

(UNHIDE) This command makes a field visible and returns it to the status it had before it was hidden.

Syntax

HIDE [<field(s)>]

UNHIDE [<field(s)>]

  • The <field(s)> represents one or more valid field names.

Comments

If no field name is specified, the current field (the one to which the Check Code block pertains) is assumed. Text fields can be hidden or unhidden, allowing for the positioning of messages on the screen, and the display of alternate messages. Label/Title fields cannot be hidden.

Examples

Example 1: Questions relating to pregnacy will not be displayed if the patient is a male. The ELSE section of the IF command allows the fields to be unhidden if the user goes back and changes their answer in the Sex field. The example assumes a View exists that has the following fields: Sex (Text), Pregnant (Yes/No), and ChildBirth (Yes/No). The code below would appear in the AFTER section of the Sex field.

IF Sex = "M" THEN
HIDE Pregnant
HIDE ChildBirth
ELSE
UNHIDE Pregnant
UNHIDE ChildBirth
END

Example 2: The field that the HIDE command appears in will be hidden. The example assumes a View exists that has two pages and the following fields: LungDisease (Yes/No). The code below would appear in the AFTER section of the LungDisease field.

IF LungDisease = (-) THEN
HIDE
END

Example 3: Questions relating to pregnacy will not be displayed if the patient is a male. The example assumes a View exists that has the following fields: Sex (Text), Pregnant (Yes/No), Complications (Yes/No), and ChildBirth (Yes/No). The code below would appear in the AFTER section of the Sex field.

IF Sex = "M" THEN
HIDE Pregnant ChildBirth Complications
END

Note: When hiding a field, it is important that be unhidden (with an If…Then…Else…) if the value entered is changed. To make sure the field is displayed correctly when paging back through existing records, copy the same code into an Always end EndBefore block in RECORD.


If Then Else Command (Check Code Reference)

IF THEN ELSE

Check Command

Command Generator

Description

This command defines conditions and one or more consequences which result when the conditions are met. An alternative consequence can be given after the ELSE statement, to be realized if the first set of conditions is not true. The ELSE statement is optional.

Syntax

IF <expression> THEN
[command(s)]
END

IF <expression> THEN
[command(s)]
ELSE
[command(s)]
END

  • The <expression> represents a condition that determines whether or not subsequent commands will be run. If the condition evaluates to true, the commands inside of the IF block will be run. If the condition evaluates to false, the commands inside of the ELSE block will be run instead. If no ELSE exists and the condition is false, then no commands inside of the IF block are run.

  • The [command(s)] represents at least one valid command.

  • The ELSE statement is optional and will run any code contained inside of it when the <expression> evaluates to false.

Comments

The IF statement is executed immediately if it does not refer to a database variable, any characteristic or attribute that can be measured, or if any defined variables have been assigned literal values. If the statement YEAR = 97 has already occurred, then an IF statement dependent on it, such as IF YEAR = 97 THEN …., will be executed immediately.

Examples

Example 1: If the user selects "Male" for the patient's sex then the fields named Pregnancy and ChildBirth are hidden. The example assumes a View exists that has the following fields all on the same page: Sex (Text), Pregnancy (Yes/No), and ChildBirth (Yes/No). The code below would appear in the AFTER section of the Sex field.

IF (Sex = "Male") THEN
HIDE Pregnancy Childbirth
END

Example 2: If the date of birth supplied by the user occurs prior to January 1st, 1900, the Enter module provides a warning beep and a warning dialog indicating invalid input. However, if the date of birth supplied is on on or after January 1st, 1900, the GOTO command is executed instead, taking the user to the following page. The example assumes a View exists that has the following fields: DOB (Date). The example also assumes that there is a page following the page upon which DOB resides. The code below would appear in the AFTER section of the DOB field.

IF DOB < 01/01/1900 THEN
BEEP
DIALOG "Warning: Invalid date of birth detected"
ELSE
GOTO +1
END

Example 3: The date of birth field is validated to ensure correct input. The date of birth field must not be less than January 1st 1900, must not be greater than the current time, and most not be greater than the date of the survey. If any of these conditions is not met, a warning dialog is displayed and the invalid input is erased. The example assumes a View exists that has the following fields: DOB (Date) and SurveyDate (Date). The code below would appear in the AFTER section of either DOB or SurveyDate, depending on whichever once is to be filled in last by the user.

IF (DOB < 01/01/1900) OR (DOB > SYSTEMDATE) OR \
(DOB > SurveyDate) THEN
BEEP
DIALOG "Warning: Invalid date of birth detected"
CLEAR DOB
END

  • The backward slash "\" is used to indicate continuation of a long line.

Example 4: An IF command is used to check if a field has been left blank. The example assumes a View exists that has the following fields: LastName (Text). The code below would appear in the AFTER section of the LastName field.

IF NOT LastName = (.) THEN
BEEP
DIALOG "Last name field should not be blank."
END

Example 5: Multiple IF commands are used to generate more than two possible outcomes. The example assumes a View exists that has the following fields: AgeType (Text), AgeYears (Numeric), and Age (Numeric). The code below would appear in the AFTER section of either AgeType or Age, depending on whichever once is to be filled in last by the user.

IF AgeType = "Days" THEN
ASSIGN AgeYears = Age / 365.25
END

IF AgeType = "Months" THEN
ASSIGN AgeYears = Age / 12
END

IF AgeType = "Years" THEN
ASSIGN AgeYears = Age
END

Example 6: The AND operator requires both Sex to be "F" and Pregnancy to be true in order for the GOTO command to be executed. The example assumes a View exists that has the following fields: Sex (Text), Pregnancy (Yes/No), and ChildBirth (Yes/No). The code below would appear in the AFTER section of either Sex or Pregnancy, depending on whichever once is to be filled in last by the user.

IF (Sex = "F") AND (Pregnancy = (+)) THEN
GOTO ChildBirth
END

Example 7: Several IF commands are used to determine if a patient is ill. If any one of the symptoms listed in the View are true, the field ill is assigned true. The example assumes a View exists that has the following fields: Ill (Yes/No), Vomiting (Yes/No), Fever (Yes/No), and Diarrhea (Yes/No). The code below would appear in the AFTER section of the ill field.

ASSIGN Ill = (-)
IF Vomiting = (+) THEN
ASSIGN Ill = (+)
END

IF Diarrhea = (+) THEN
ASSIGN Ill = (+)
END

IF Fever = (+) THEN
ASSIGN Ill = (+)
END

Example 8: Several IF commands are used to determine the number of symptoms a patient is presenting with. If the number of symptoms is greater than or equal to 2, the Case variable is assigned true. If the number of symptoms is less than 2, the Case variable is assigned false. The example assumes a View exists that has the following fields: MajorSymp (Numeric), Vomiting (Yes/No), Fever (Yes/No), Diarrhea (Yes/No), and Case (Yes/No).

ASSIGN MajorSymp = 0
IF Diarrhea = (+) THEN
ASSIGN MajorSymp = MajorSymp + 1
END

IF Fever = (+) THEN
ASSIGN MajorSymp = MajorSymp + 1
END

IF Vomiting = (+) THEN
ASSIGN MajorSymp = MajorSymp + 1
END

IF MajorSymp >= 2 THEN
ASSIGN Case = (+)
ELSE
ASSIGN Case = (-)
END


NewRecord Command (Check Code Reference)

NEWRECORD

Check Command

Command Generator

Description

This command saves the current records data and opens a new record for data entry.

Syntax

NEWRECORD

Example

DIALOG "This is the last field in my view."
NEWRECORD

Epi Info™

Version 3.5.3

January 26, 2011

Epi Info for Windows Icon


Quit Command (Check Code Reference)

QUIT

Check Command

Command Generator

Description

The QUIT command closes the current data files and terminates the current program.

Syntax

QUIT

Example

DIALOG "This is the last field in my view."
QUIT

Epi Info™

Version 3.5.3

January 26, 2011

Epi Info for Windows Icon


Assign Command (Analysis Reference)

ASSIGN

Analysis Command

Command Generator

How to Use the ASSIGN Command

Description

This command assigns the result of numeric or string expression to a variable. The variable may be a database variable in a View or data table or a user-defined variable, created by the DEFINE command in a program.

Syntax

ASSIGN <variable> = <expression>

LET <variable> = <expression>

(ASSIGN and LET may be omitted)

<variable> = <expression>

  • The <variable> represents a variable in a database or a defined variable created in a program.

  • The <expression> represents any valid arithmetic or string expression.

Program Specific Feature

If the right side of the assignment does not contain a field variable (one in a database table), or a variable that depends on a field variable, then the assignment is made immediately.

DEFINE YEAR PERMANENT

YEAR = 2000

The following code contains two view variables, ONSETDATE and EXPOSUREDATE.

DEFINE INCUBATION

INCUBATION = ONSETDATE-EXPOSUREDATE

In this example, INCUBATION is only calculated during processing of the current dataset. It is calculated for each record during processing and may be used like a dataset variable in procedures like TABLES, FREQ, and GRAPH. Prior to and after processing a dataset, INCUBATION will have a "missing" value, although it could be assigned a value with another statement such as INCUBATION = 999.

The value is calculated each time a record that meets the conditions of SELECT is read from the dataset. Any legal expression can be used that combines functions or literal values and operators like &, +, -, *, /, ^, and MOD. Boolean expressions are not supported in assign commands. Standard variables that depend on database fields must be saved to a table using WRITE before they can be edited using LIST UPDATE.

Comments

Temporary variables must be defined before being used, except in the Menu program. Temporary variables will accept any type of data (text, numeric, or date); however, once they have been assigned a non-missing value or an expression, their type cannot be changed.

If an attempt is made to assign an invalid expression to a variable, it retains its previous assignment, if any.

Examples

Example 1: The ASSIGN command is used to assign values to defined variables and database variables. Note that literal values such as 42, other variables, and functions can be used on the right side of the = operator.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE State
ASSIGN City = "Atlanta"
ASSIGN State = "GA"
ASSIGN Address = City & ", " & State
DEFINE Now
ASSIGN Now = SYSTEMTIME
DEFINE Duration
ASSIGN Duration = YEARS(01/01/1998, ReportDate)
DEFINE Ill
ASSIGN Ill = (-)
ASSIGN Age = 42
ASSIGN Occupation = "Doctor"
LIST Address City State Duration Now Ill Occupation Age GRIDTABLE

Example 2: The value of a mathematic expression, in this case to calculate a patient's body mass index, is assigned to the variable BMI.

READ 'C:\Epi_Info\Refugee.MDB':viewAssmnt
DEFINE BMI NUMERIC
DEFINE Height NUMERIC
ASSIGN Height = (Feet * 12) + Inches
ASSIGN BMI = (Weight / (Height * Height)) * 703
LIST BMI Weight Inches


Beep Command (Analysis Reference)

BEEP

Analysis Command

Command Generator

Description

This command generates a sound.

Syntax

BEEP

Example

If the number of records in the database is greater than 1000, a beep is generated and a dialog box appears.

READ 'C:\Epi_Info\Refugee.MDB':viewPatient
IF RECORDCOUNT > 1000 THEN
BEEP
DIALOG "Large record set detected."
END


Cancel Select or Sort (Analysis Reference)

CANCEL SELECT or SORT

Analysis Command

Command Generator

How to Use the Cancel Select Command

How to Use the Cancel Sort Command

Description

This command cancels a previous SELECT or SORT command.

Syntax

SORT

SELECT

Comments

The Cancel Select and Cancel Sort commands automatically close the current output file.

Example

The commands below should be run one-by-one in order to better understand how the cancel sort and cancel select commands function.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
SELECT Ill = (+)
LIST Age Ill Sex
SELECT
SORT Age
LIST Age Ill Sex
SORT


CloseOut Command (Analysis Reference)

CLOSEOUT

Analysis Command

Command Generator

Description

This command closes the current output file. It is normally used after a ROUTEOUT command when all the information to be included in the ROUTEOUT file has been produced.

Syntax

CLOSEOUT

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
ROUTEOUT 'C:\Epi_Info\Outbreak1.htm' REPLACE
TABLES Vanilla Ill STRATAVAR=Sex
MEANS Age Ill
CLOSEOUT

Epi Info™

Version 3.5.3

January 26, 2011

Epi Info for Windows Icon


CMD Command (Analysis Reference)

User Command (CMD)

Analysis Command

Define User Command (CMD) Command Generator

User Command Generator

Description

The CMD command is used to define a block of commands that will act as a unit, similar to a subroutine or procedure in other languages.

Syntax

CMD <command name>
[commands]
END

  • The <command name> executes the defined block of instructions.

  • The [commands] represents at least one valid Epi Info for Windows command.

Program Specific Features

Use of the command generator within a CMD is limited, as these commands are not actually run until CommandName is encountered in a program; however, any command that will be legitimate at the time it is actually run can be put into a CMD block using the text editor.

CMD cannot be use to circumvent the prohibition against nested IFs in Analysis.

Comments

Whenever <command name> appears elsewhere in the program, the block of commands is executed.

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
CMD Hello
DIALOG "Welcome to Epi Info" TITLETEXT="Greetings"
END
Hello


CoxPH Command (Analysis Reference)

COXPH

Analysis Command

Command Generator

How to Use the COXPH Command

Description

This command performs Cox-Proportional Hazards and Extended Cox-Proportional Hazards survival analysis. This form of survival analysis relates covariates to failure through hazard ratios. A covariate with a hazard ratio greater than one causes failure. A covariate with a hazard ratio less than one improves survival. Some of the subjects may become unavailable prior to failure; the term "censored" is applied to them. COXPH is especially constructed to deal with this situation. Statistics showing the risk set by group and time can be written to an OUTTABLE for later formatting.

Syntax

COXPH <time variable>= <covariate(s)>[: <time function>:] * <censor variable> (<value>) [TIMEUNIT="<time unit>"] [OUTTABLE=<tablename>] [GRAPHTYPE="<graph type>"] [WEIGHTVAR=<weight variable>] [STRATAVAR=<strata variable(s)>] [GRAPH=<graph variable(s)>]

  • The <time variable> represents a numeric or date variable, specifying the time at which failure or censorship occurred.

  • The <covariate(s)> represent a numeric variable, a non-numeric variable, or a variable specified as non-numeric by parenthesis. Any non-numeric variable, even a variable specified as non-numeric by surrounding with parenthesis, is automatically recoded into dummy variables. For all but one of the levels of a variable a dummy variable will be created. This dummy variable measures the contribution of its level to the excluded level. A covariate may be followed by a time function. This causes COXPH to run the Extended Cox procedure.

  • The <time function> represents a numeric expression involving the time variable.

  • The <censor variable> indicates whether the event is a failure or a censor.

  • The <value> indicates which value of the CensorVar represents failure.

  • The <strata variable(s)> represents a list of variables indicating the different levels of strata.

  • The <weight variable> represents a variable to specify the contribution each data row has on the output.

  • The <time unit> represents a value for labeling the time axis.

  • The <tablename> represents a valid table name.

  • The <graph type> causes the generation of one indicated graphs as follows:

    • Survival Probability shows the adjusted survival curves.

    • Observed shows the observed survival curves.

    • Survival-Observed shows the adjusted and observed survival curves.

    • Log-log Survival shows the logarithm of the negative of the logarithm of the adjusted survival curve.

    • Log-log Observed shows the logarithm of the negative of the logarithm of the observed survival curve.

    • Hazard Function shows the adjusted hazard function.

    • None

  • The <graph variable(s)> represent a list of variables used to generate survival curves. Graph variables that are covariates or strata variables create curves adjusted by the covariates at all possible combinations of these graph variables. If a variable is numeric, it is plotted at its average value. Otherwise the graph variable splits the data into separate groups each with its own curve.

Comments

COXPH uses the Breslow method to handle ties in the data.

Example

In this example, the regressed curves do not match the observed curves. Compute a time dependent analysis separating clinic at 365 days with the STEP function.

READ 'C:\Epi_Info\Sample.mdb':Addicts
COXPH Survival_Time_Days = (Clinic) Methadone_dose__mg_day_ Prison_Record * Status ( 1 ) GRAPH=Clinic GRAPHTYPE="Survival-Observed"

The improved example:

DEFINE Clinic1
ASSIGN Clinic1 = Clinic
COXPH Survival_Time_Days = (Clinic):STEP(365,Survival_Time_Days):(Clinic1):1-STEP(365,Survival_Time_Days):Methadone_dose__mg_day_
 Prison_Record * Status ( 1 ) GRAPH=Clinic GRAPHTYPE="Survival-Observed"


Define Command (Analysis Reference)

DEFINE

Analysis Command

Command Generator

How to Use the DEFINE Command

Description

This command creates a new variable.

Syntax

DEFINE <variable> {<scope>} {<type indicator>} {("<prompt>")}

  • <variable> represents the name of the variable to be created.

  • <scope> is the level of visibility and availability of the new variable and must be one of the reserved words STANDARD, GLOBAL, or PERMANENT. If omitted, STANDARD is assumed and a type indicator may not be used.

  • <type indicator> is the data type of the new variable and must be one of the reserved words NUMERIC, TEXTINPUT, YN, or DATEFORMAT. If omitted, the variable type will be inferred based on the data type of the first value assigned to the variable. Thereafter the variable type cannot be changed.

  • <prompt> is a description of the variable which can be displayed in place of the variable name by use of the SHOWPROMPTS setting. The prompt must be in quotes with parentheses around the prompt. For example, ("A Date").

Comments

A custom variable defined in Epi Info might not have a predefined data type if the <type indicator> is omitted when the variable is defined. If the variable does not have a predefined type and it has not been used, then the variable will accept a value in any of the four data types (Text, Number, Date, Yes/No (Boolean)) that is assigned to the variable the first time. Thereafter, the variable takes on the data type of the value assigned and variable’s data type cannot be changed. An attempt to assign data of a different data type will result in an error. Various functions can be used to manipulate data, changing data type of values to match the data type of the variable. Some of these functions include FORMAT, TXTTONUM, TXTTODATE, and NUMTODATE.

Variable Scope

  • STANDARD variables retain their value only within the current record and are reset when a new record is loaded. Standard variables are used as temporary variables behaving like other fields in the database. In Analysis, Standard variables lose their values and definitions with each READ statement.

  • GLOBAL variables retain values across related Views and when a new View is opened by the program, but are removed when the Analysis program is closed. Global variables persist for the duration of program execution. Global variables are also used to store values between changes of data source, such as when the READ command is used. Global variables in Analysis may not depend directly or indirectly on table fields.

  • PERMANENT variables are stored in the EpiInfo.INI file and retain any value assigned until the value is changed by another assignment or the variable is undefined. Permanent variables are shared among Epi Info programs (Menu, Enter, Analysis, etc.) and persist even if the computer is shut down. Permanent variables in Analysis may not have values that depend directly or indirectly on table fields. A <prompt/description> created for a permanent variable will exist for one session and must be re-established each time it is used.

Type Indicators

  • TEXTINPUT - Variables of this data type can receive any alpha-numeric characters including symbols and the output of functions such as FORMAT.

  • NUMERIC - Variables of this data type can receive numbers and the output of functions such as TXTTONUM.

  • DATEFORMAT - Variables of this data type can receive date values including the output of functions such as TXTTODATE and NUMTODATE.

  • YN - Variables of this data type can receive the boolean values of (+) for Yes and (-) for No. Until an assignment is made, YN type variable values are (.) or missing.

Example

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE Birthday DATEFORMAT
ASSIGN Birthday = 01/01/2006
DEFINE HospitalCode NUMERIC
ASSIGN HospitalCode = 854
DEFINE Smoke YN
ASSIGN Smoke = (+)
LIST BirthdayHospitalCode Smoke


Define DLLObject Command (Analysis Reference)

DEFINE DLLObject

Analysis Command

Command Generator

Description

This command allows for the creation of an ActiveX (dynamic link library or executable) object.

Syntax

DLL File

DEFINE <variable> DLLOBJECT "<ActiveX name>.<class>"

WSC File

DEFINE <variable> DLLOBJECT "<filename>"

  • The <variable> represents the name of the variable to be created.

  • The <ActiveX name> represents the internal name of the ActiveX object that contains the class object for DLL files.

  • The <class> represents a class name defined within the DLL.

  • The <filename> represents the name of the WSC file in which the script component resides.

Comments

The ActiveX name may not be the same as the actual name of the dll (dynamic link library) or executable. When an ActiveX object is developed, it is given a project name. This is the name that is required to create the object. The ActiveX object (executable or dll) must be registered before it can be used. Windows Scripting Component (WSC) objects can also be used.

Example

DEFINE Week DLLOBJECT "EIEpiwk.Epiweek"


Define Group Command (Analysis Reference)

Analysis Command

Command Generator

Description

This command allows for the creation of temporary group variables

Syntax

DEFINE <variable> GROUPVAR <variable 1> [<variable 1> ...]

  • <variable> represents the new group variable being defined

  • <variable 1> ... represent the existing variables to which the new group variable will be equivalent

Program Specific Feature

The variables in the group must be field variables, they cannot be defined variables. The variables in the group may be from different pages of the same view or different views, in any combination. The variables in the group may themselves be group variables, but each variable will be represented in the new group only once no matter how many times it appears in the variable list or in group variables in the variable list.

If the group variable being defined exists and is not a group variable, an error message is displayed and the command is not processed. If it is a group variable, the new variable list replaces the existing variable list until the next READ or MERGE command or until it is redefined again. Group variables cannot be undefined.

Comments

This command is useful when there are many variables so that the use of * is impractical or invalid. Group variables can be used in the LIST and WRITE commands and in some statistical commands, such as FREQ, TABLES, and MEANS. Group variables cannot be used in Complex Sample commands.

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Exposure GROUPVARJELLO CAKES VANILLA CHOCOLATE FRUITSALAD
LIST Exposure


Delete File/Table Command (Analysis Reference)

DELETE FILE/TABLES

Analysis Command

Command Generator

Description

This command deletes files, tables, and views.

Syntax

DELETE filename | wildcard {RUNSILENT}

DELETE TABLES tablename | filename:tablename {RUNSILENT | SAVEDATA}

Comments

Delete file specifies explicitly or implicitly (via wildcards) files to be deleted. If no files are specified, or if some of the specified files cannot be deleted, a message is produced unless RUNSILENT is specified. Wildcards are not permitted in the suffix.

Delete table specifies a table to be deleted. If the table does not exist or cannot be deleted, a message is produced unless RUNSILENT is specified. A confirmatory message is displayed prior to deletion unless RUNSILENT is specified.

To delete tables with spaces in their names, specify both the file and the table even if the table is in the current project. The table must be enclosed in single quotes. It is possible to read a table with a space in its name and then delete it, resulting in errors during subsequent procedures. To delete a table with space in its name, specify the database even if the table is in the current database.

DELETE TABLES will not delete, and produce a message, if any of the tables specified are data, grid, or program tables. Code tables are deleted only if they are not referenced by any view.

SAVEDATA does not delete the data tables, but removes the RECStatus property from the table.

Space is not reclaimed until the Compact utility is run.

Analysis will not delete the current project MDB, nor will it delete any table in use by the current view.

Example

DELETE TABLES Backup2005


Delete Records Command (Analysis Reference)

DELETE RECORDS

Analysis Command

Command Generator

Description

This command deletes selected records.

Syntax

DELETE * {PERMANENT | RUNSILENT}

DELETE expression {PERMANENT | RUNSILENT}

Comments

All records in the current selection are set to deleted status, or if PERMANENT is specified, physically deleted. A confirmation message is displayed unless RUNSILENT is selected. This applies to Access tables and may not be used when related tables are in use. Space is not reclaimed until the Compact Utility is run.

Examples

Example 1: The code below will permanently erase all records in the current data source where the AgeInDays variable contains a value greater than 5. Permanent deletions cannot be undone.

DELETE AgeInDays > 5 PERMANENT

Example 2: The code below will mark all records in the database for deletion. Records that have been marked for deletion can be undeleted (restored) by using the UNDELETE Command.

DELETE *


Dialog Command (Analysis Reference)

DIALOG

Analysis Command

Command Generator

How to Use the DIALOG Command

Description

This command provides interaction with the user from within a program. Dialogs can display information, ask for and receive input, and offer lists for making choices.

Syntax

Simple Form

DIALOG "<prompt>" {TITLETEXT="<title>"}

  • <prompt> represents the text to be displayed as message.

  • <title> represents the text to be used as the caption for the dialog window. If <title> is omitted in the Dialog command, "Analysis" will be displayed on the dialog box's title bar.

Get Variable Form

DIALOG "<prompt>" <variable> <entry type> {TITLETEXT="<title>"}

DIALOG "<prompt>" <variable> "<value 1>", "<value 2>", "<value 3>", … ,"<value n>" {TITLETEXT="<title>"}

DIALOG "<file type selection>" <variable> READ {TITLETEXT="<title>"}

DIALOG "<file type selection>" <variable> WRITE {TITLETEXT="<title>"}

  • <variable> represents the variable to store value entered.

  • <entry type> represents a reserved word and/or mask that defines the type of input to be accepted and stored in the variable. The following are valid entry types:

    1. TEXTINPUT specifies the input as text.

    2. YN specifies the input as Boolean.

    3. DATEFORMAT {"<date mask>"} specifies the input as a date; if a date mask is not specified, the system short date is used.

    4. "<numeric mask>" specifies the input as numeric. This option is identified as "Number Only". The numeric mask should be a text string such as "####" or "##.###" that indicates the type of data to be entered. # indicates a digit.

    5. If no <entry type> is specified, the input variable is interpreted as a number if possible; if the value is not a valid number but is a valid date, it is interpreted as a date; otherwise an error occurs.

  • <value> represents a value in a drop-down list of choices. Each value included in the command will be shown as a single item in the list.

  • <file type selection> controls the type of files that are displayed for selection. It consists of alternating description and filter elements separated by vertical bars. The description is displayed for the user to select. The corresponding filter element selects the files. If this element is left blank, all files will be available for selection. Syntax is created using the File Open and File Save options from the Dialog Format drop down menu.

List of Values Form

DIALOG "<prompt>" <variable> [<list type>] {TITLETEXT="<title>"}

DIALOG "<prompt>" <variable> DBVALUES <table name> {TITLETEXT="<title>"}

  • The [<list type>] are DATABASES and DBVIEWS

Comments

The Simple form of DIALOG places a dialog box on the screen, using the text provided, with an OK button.

The Get Variable form of DIALOG displays the text prompt and provides a means for entering a value.

  • If YN is specified, "Yes," "No" and "Cancel" buttons are presented and the specified variable is set to (+), (-), or (.).

  • If TEXTINPUT or no entry type is specified, an entry field for user response is provided, with OK and Cancel buttons. The variable is assigned the value of the input, with a missing value if Cancel is chosen.

  • The Get Variable form of the DIALOG command can also display a file selection dialog. If READ is used, only existing files are displayed. If WRITE is used and an existing file is selected, the user is presented with the Overwrite? prompt.

  • The Multiple Choice form of DIALOG displays the text prompt and provides a combo box for selecting among the values with OK and Cancel buttons presented. The variable is assigned the value of the input, with a missing value if Cancel is chosen. Variable will text type.

  • The Date form of the DIALOG command uses a special control for accepting input. Each section of the date (year, month, and day) can be increased or decreased independently using the drop down calendar. Using this control, it is impossible to select an invalid date.

The List of Values form of DIALOG displays a combo box of databases or view variables with OK and Cancel presented. The variable is assigned the value of the user's input, with a missing value if Cancel is chosen. Variable will be text type. The VARIABLE VALUE form of DIALOG displays a combo box of distinct values of the specified variable in the specified database. The variable is assigned the value of input, with a missing value if Cancel is chosen. The variable will be of the same type as the database variable.

Date Mask
* | System Time Format
! | System Long Date

Numeric Mask
# | Digit placeholder (Entry required)
. | Decimal placeholder. The actual character used is the one specified as the decimal placeholder in the computer's international settings.
, | Thousand separator. The actual character used is the one specified as the thousands placeholder in the computer's international settings.
9 | Digit placeholder. (Entry optional)
Punctuation | Included in the display

Custom Formats
D | One- or two-digit day.
Dd | Two-digit day. Single digit day values are preceded by a zero.
Ddd | Three-character weekday abbreviation.
dddd | Full weekday name.
H | One- or two-digit in 12 hour format.
Hh | Two-digit hour in a 12-hour format. Single digit values are preceded by a zero.
H | One- or two-digit hour in 24-hour format.
HH | Two-digit hour in a 24-hour format. Single digit values are preceded by a zero.
M | One- or two-digit minute.
Mm | Two-digit minute. Single digit values are preceded by a zero.
M | One- or two-digit month number.
MM | Two-digit month number. Single digit values are preceded by a zero.
MMM | Three-character month abbreviation.
MMMM | Full month name.
S | One- or two-digit seconds.
Ss | Two-digit seconds. Single digit day values are preceded by a zero.
T | One-letter AM/PM abbreviation. AM displays as A.
Tt | Two-letter AM/PM abbreviation. AM displays as AM.
Y | One-digit year. 1997 displays as 7.
Yy | Last two digits of the year. 1997 displays as 97.
Yyyy | Full year. 1997 displays as 1997.
Punctuation | Included in the display

Examples

Example 1: A prompt is displayed letting the user know that the following commands may take several minutes to complete due to their complexity.

DIALOG "Warning: This script may take several minutes to complete" TITLETEXT="Warning"

Example 2: The DIALOG command is used to obtain a user-supplied date by which to calculate the patient's age. If the user does not supply a date (that is, the press the Cancel button), the default ending date contained in the survey data source is used instead.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE UpdateDate DATEFORMAT
ASSIGN UpdateDate = TodayDate
DIALOG "Enter a new ending date for survey data:" UpdateDate DATEFORMAT "MM-DD-YYYY"
ASSIGN TodayDate = UpdateDate

DEFINE NewAge
ASSIGN NewAge = YEARS(DOB, TodayDate)
GRAPH NewAge GRAPHTYPE="Histogram" STARTFROM=0

Example 3: An Open File dialog is displayed prompting the user to select an MDB (database) file. Upon choosing the file, the full path and filename of the file are saved to the specified variable.

DEFINE DatabaseName
DIALOG "Select a database" DatabaseName DATABASES

Example 4: The user is presented with a drop-down list of choices. The list of choices that the user sees are a part of the command; in this case, several counties in the state of Georgia. The user's selection is then temporarily assigned to all records in the View.

READ 'C:\Epi_Info\Sample.MDB':viewSurveillance
DEFINE NewCounty
DIALOG "Select a county" NewCounty "Fulton", "Baldwin", "DeKalb", "Cobb"
ASSIGN CountyName = NewCounty
LIST CountyName

Example 5: A drop-down list of choices is displayed. Each list item is retreived from the X_COORD column of the SohoDead data table.

READ 'C:\Epi_Info\Sample.mdb':SohoDead
DEFINE Coordinates TEXTINPUT
DIALOG "Select Coordinates" Coordinates DBVALUES SohoDead X_COORD TITLETEXT="Coordinates"

Example 6: A dialog box is displayed that will prompt the user for an image file in either JPG or bitmap format. Upon choosing the file, the full path and filename of the file are saved to the specified variable.

DEFINE FileName
DIALOG "Image files|*.bmp;*.jpg;|Allfiles|*.*" FileName READ TITLETEXT="Get image files"

Example 7: A dialog box is displayed that allows the user to enter a number. An input mask is used in order to force the user's input to three whole digits and one decimal digit. The user's input is then temporarily assigned to each record in the View.

READ 'C:\Epi_Info\Sample.MDB':viewOswego
DEFINE NewAge NUMERIC
DIALOG "Enter patient age" NewAge "###.#"
ASSIGN Age = NewAge
LIST Age

Example 8: A dialog box is displayed that allows the user to enter a number. An input mask is used in order to force the user's input to either one or two whole digits and one decimal digit. (The 9 represents an optional digit.) The user's input is then temporarily assigned to each record in the View.

READ 'C:\Epi_Info\Sample.MDB':viewOswego
DEFINE NewAge NUMERIC
DIALOG "Enter patient age" NewAge "9##.#"
ASSIGN Age = NewAge
LIST Age


Display Command (Analysis Reference)

DISPLAY

Analysis Command

Command Generator

How to Use the DISPLAY Command

Description

This command displays a table, view, and database information.

Syntax

DISPLAY <option> [<sub-option>] [OUTTABLE=<tablename>]

  • The <option> determines the type and source of information displayed.

  • The <tablename> represents the name of the outtable to receive results (optional).

  • The [<sub-option>] refers to the type of displayed information.

    • Option DBVARIABLES- Displays information about variables. Sub-option DEFINE displays only defined variables. Sub-option FIELDVAR displays only table/view variables for the current READ and RELATE tables. Sub-option LIST followed by a list of variable names displays only the specified variables.

    • Option DBVIEWS- Displays information about views and other Epi Info specific tables in a database. The sub-option is the path of the database. Omitting the sub-option displays information for the current project database.

    • Option TABLES- Displays information about tables in a database, whether Epi Info specific or generic. The sub-option is the path of the database. Omitting the sub-option displays information for the current project database.

Examples

Example 1: The DISPLAY command is used to show the tables, views, and variables from an existing data source.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DISPLAY TABLES
DISPLAY DBVIEWS
DISPLAY DBVARIABLES

Example 2: The DISPLAY command is used to show the value stored in the Language permanent variable. As permanent variables exist outside of a database, no READ command is required.

DISPLAY DBVARIABLES LIST Language

Example 3: The DISPLAY command is used to show only user-defined variables.

DISPLAY DBVARIABLES DEFINE

Example 4: All Views in the Sample database are displayed.

DISPLAY DBVIEWS 'C:\Epi_Info\Sample.mdb'

Example 5: All tables in the Sample database are displayed.

DISPLAY TABLES 'C:\Epi_Info\Sample.mdb'

Example 6: All variables in viewOswego are written to a new table in the Sample database called VarInfo.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DISPLAY DBVARIABLES OUTTABLE=VarInfo


Execute Command (Analysis Reference)

EXECUTE

Analysis Command

Command Generator

Description

This command executes a Windows program; either one explicitly named in the command, or one designated within the Windows registry as appropriate for a document with the file extension that is named. This provides a mechanism for bringing up whatever word processor or browser is the default on a computer without first knowing its name.

If the pathname is a long filename, it must be surrounded in single quotes. If the command takes parameters, surround the command and the parameters with a single set of double quotes; do not use single quotes.

Program Specific Feature

Link and Activate are not valid command names.

Syntax

EXECUTE <filename>

EXECUTE "<filename> <command-line parameters>"

EXECUTE NOWAITFOREXIT <filename>

EXECUTE NOWAITFOREXIT '<filename>'

EXECUTE NOWAITFOREXIT "<filename>"

EXECUTE WAITFOREXIT <filename>

EXECUTE WAITFOREXIT '<filename>'

EXECUTE WAITFOREXIT "<filename>"

  • The <filename> represents the path and program name for .exe (filename for registered Windows programs) and .com (filename for MS-DOS binary executables) files.

  • The <command-line parameters> represent any additional command-line arguments that the program can accept. When used, the entire string should be enclosed within double quotes.

  • When Wait for Command to Execute (modal) is specified, the command should run and Analysis should also continue running. When Wait for Command to Execute is not specified (non-modal), Analysis should wait until the executed program closes before continuing. When EXECUTE is run modally, permanent variables are written before the command is executed and reloaded after the command is executed.

Comments

If the name given is not a program, but a file with an extension (the 3 characters after the ".") registered by Windows for displaying the document, the correct program to display the file will be activated. For example, WRITEUP.DOC might cause Microsoft Word © to run and load the file on one computer. On another machine, however, .DOC might correspond to Corel WordPerfect©. Usually .TXT will run NOTEPAD.EXE© or WORDPAD.EXE©, and image files will appear either in a browser or in a graphics program on the computer. An .HTM file will bring up the default browser on your computer.

Examples

Example 1: The EXECUTE command is used to start the Enter module. The command-line parameter is used to load the Oswego View from the Sample database.

EXECUTE "C:\Epi_Info\Enter.exe Sample.mdb:Oswego"

Example 2: The output file that is generated (in this case, Outbreak1.htm) is opened in the computer's default web browser.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
ROUTEOUT 'C:\Epi_Info\Outbreak1.htm' REPLACE
SET STATISTICS=COMPLETE
TABLES Vanilla Ill STRATAVAR=Sex
MEANS Chocolate Ill
CLOSEOUT
EXECUTE 'C:\Epi_Info\Outbreak1.htm'

Example 3: Windows Notepad opens and the output file Oswego.txt is automatically loaded into it.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
WRITE REPLACE "Text" 'C:\Epi_Info\Oswego.txt' *
EXECUTE "C:\Windows\notepad.exe C:\Epi_Info\Oswego.txt"


Freq Command (Analysis Reference)

FREQ

Analysis Command

Command Generator

How to Use the FREQ Command

Complex Sample Information

Description

FREQ produces a table from the table(s) specified in the last READ statement, showing how many records have each value of the variable. Exact Confidence limits for each proportion are included.

Syntax

FREQ [<variable(s)>] {<settings>}

FREQ * {EXCEPT [<variable(s)>]} {<settings>}

  • <variable(s)> represents one or more variable names. Group variables may be used.

  • <settings> represent clauses from the SET command indicating a value of a setting (except PROCESS and HYPERLINKS) which is to be used for the duration of the statistical command only.

Comments

Records may be included or excluded from the count by using SELECT statements. Those marked as deleted in Enter will be handled according to the current setting for SET PROCESS. If more than one variable name is given, FREQ makes a separate table for each variable. Confidence limits for the binomial proportions are produced.

If a WEIGHTVAR is specified, the value of the WEIGHTVAR variable is treated as a count of instances of the variable being computed in the frequency. For example, in the following command a record containing the value 30 for AGE and 15 for COUNT would give a result equivalent to 15 individuals of age 30.

FREQ AGE WEIGHTVAR = COUNT

If STRATUM is specified, a separate frequency is produced for each value of the stratifying variable.

FREQ ILL STRATAVAR=SEX, for example, produces a table showing ILL (Yes/No/Unknown) for Males and another for Females. The same numbers can be obtained using TABLES ILL SEX, but the latter produces results in one table rather than in separate tables, and produces statistics to test for an association between ILL and SEX.

FREQ * makes a table for each variable in the current view other than unique identifiers. It is often used to begin analyses of a new data set.

To do frequencies of all variables except a few, use FREQ * EXCEPT VarName(s) followed by the names of the variables to be excluded.

Multiline (memo) variables cannot be used in Frequencies. 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 frequency.

Examples

Example 1: The number of ill and healthy people are displayed along with their percentages and the total.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
FREQ Ill

Example 2: In this case, the variable 'Desserts' is a group variable containing the Yes/No variables Chocolate, Vanilla, and Cakes. Running a frequency on a group variable automatically runs a frequency on every variable contained in the group.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
FREQ Desserts

Example 3: A frequency on two variables is produced, in this case BakedHam and Milk.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
FREQ BakedHam Milk

Example 4: A frequency on every variable in the current data source is produced.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
FREQ *

Example 5: A frequency on every variable in the current data source (except Age, Code_RW, DateOnset, Name and TimeSupper) is produced.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
FREQ * EXCEPT Age Code_RW DateOnset Name TimeSupper

Example 6: A frequency of ill people is produced, stratified by sex. Using the stratification option will produce two frequencies, in this case one for males and one for females.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
FREQ Ill STRATAVAR=Sex

Example 7: A weighted frequency is conducted. For each record, the value stored in Count is used to represent that record's weight.

READ 'C:\Epi_Info\Sample.mdb':viewLasum
FREQ Outcome WEIGHTVAR=Count

Example 8: A complex sample frequency is run using the Epi1 data set.

READ 'C:\Epi_Info\Sample.mdb':viewEpi1
SET STATISTICS=COMPLETE
FREQ VAC PSUVAR=Cluster


Graph Command (Analysis Reference)

GRAPH

Analysis Command

Command Generator

How to Use the GRAPH Command

Description

This command produces graphs from data in Analysis.

Syntax

GRAPH [<variable(s)>] GRAPHTYPE="<graph type>" [<option name>=option value]

GRAPH [<variable(s)>] * <crosstab> GRAPHTYPE="<graph type>" [<option name>=option value]

GRAPH [<variable(s)>] GRAPHTYPE="<graph type>"
 XTITLE="<string>"
 YTITLE="<string>"

  • The <variable(s)> represents the (main) variable(s) to be graphed.

  • The <crosstab> represents a variable to be used for classification of the main variable(s).

  • The <graph type> represents one of the graph types described below.

  • option name represents a keyword described below. OptionValue represents the value to be assigned to the option. Unless specified below, the valid values are YES, NO, (+) or (=). The following options apply to most or all of the graph types:

  • STRATAVAR=<variable> generates a graph for each value of VarName. When saving a template, the template stores the current graph's background including the main title and the subtitle if it exists; however, if the sub-title is stratified, (under "One Graph for Each Value of" in the dialog screen), it will be filtered out.

  • WEIGHTVAR=<variable> weights each record by the value of <VarName>.

  • WEIGHTVAR=<agg func>(<variable>) allows multiple records referring to the same values of the main variable, crosstab variable (if any) and strata variable (if any) are represented by the aggregate of VarName. Permissible AggFunc values are MIN (minimum), MAX (maximum), AVG (average), STDEV (standard deviation), SUM, SUMPCT (percent based on total of VarName), COUNT (number of records), or PERCENT (percent based on number of records).

  • TITLETEXT="<string>" represents a title for each page of graphs. This title is in addition to the title for each graph, which is set by customization.

  • TEMPLATE='<filename>' is the name of a template file to create or use. Templates are the means of holding customizations applied during a development session for later use. A template should only be used with the same graph type as it originated. For example, if a template was created with a Bar graph, it should only be used with a Bar graph.

  • MULTIGRAPH=<horizontal> * <vertical> refers to the number of graphs to fit on a page horizontally and vertically. This is used with a strata variable, or when sizing images for incorporation into another document. There is a limit of 3 horizontal and 3 vertical.

  • DATEFORMAT="<format string>" is used when a main variable is a date variable to determine the format in which it will be displayed. Uses the same coding scheme as the FORMAT function.

  • THREED enables the 3-D version of this graph type. By default, THREED is not enabled.

  • RUNSILENT enables Analysis to continue running when the command is run from a PGM, meaning it will not pause for customization. By default, RUNSILENT is not enabled.

  • DIALOG enables Analysis to pause for customization when the command is run from the program editor. By default, DIALOG is enabled.

  • LEGEND enables the legend to display. By default, LEGEND is enabled.

  • OVERLAYNEXT enables the current data and graph type to be stored but not displayed. Data from the next graph command is added to it and displayed (unless that command also has OVERLAYNEXT enabled). There are strict limitations about the types of graphs which may use OVERLAYNEXT. By default, OVERLAYNEXT is not enabled.

  • XTITLE="<string>", YTITLE="<string>" are used to pass X- and Y-axis labels from the GRAPH command.

Program Specific Feature

Unless DIALOG is disabled, Analysis pauses after the GRAPH command is generated and before its output is saved to permit customization. Features such as comparison lines, axis ranges, axis labels, line colors and styles, titles, the display of data on the graph, and the use of a log scale may be set from the customization menus available at this point in command execution. Once customizations are set, the features can be saved in a template file for reuse with other data.

Multiline (memo) fields cannot be graphed. 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 graph.

The following are the graph types capable of being generated by the GRAPH command, along with type-specific information ("series" refers to the values of a main variable for a specific value of any crosstab and strata variables):

  • Line graphs connect X-Y points with lines. The main variables are the X and Y variables. Each series is represented by a different style of line. Both variables must be numeric. To generate a line graph with categorical data, generate a Bar graph and use customization.

  • Bar graphs use vertical bars to represent the count or weight for each value of the main variable(s). Each series results in an additional vertical bar at each point; the bars are distinguished by their style.

  • Rotated Bar graphs use horizontal bars to represent the count or weight of each value of the main variable(s). Each series results in an additional horizontal bar at each point.

  • Histograms use vertical bars to represent the count or weight for each value of the main variable. Each series results in an additional vertical bar at each point. The main variable must be numeric. This graph differs from the bar graph in that adjacent bars represent equal ranges of the main variable. Histograms options include:

    • SHOWSINGLECASES which causes a horizontal line to break the vertical bars indicating each case. This option and THREED may not both be enabled. By default, it is disabled.

    • STARTFROM=<value> which specifies the lowest value of the leftmost bar of the graph.

    • INTERVAL=<value> [<TimeUnit>] which specifies the width of each bar of the graph. If the main variable is of date type, the time unit is specified as seconds, minutes, hours, days, months or years.

  • Spline is similar to a bar, except values are indicated by points connected by a smooth curve.

  • Points is similar to a bar, except values are indicated by points.

  • Pie in which each series is represented by a circle, and each value of the main variable has a slice of the circle proportional to the value associated with it

  • Area is similar to a line, except that the area below the line contains a solid fill.

  • Pareto in which the X axis contains the values of the main variable in descending order of frequency. A vertical bar indicates the proportion associated with each value of the main variable, and a line indicates the cumulative frequency.

  • Scatter XY graphs display X-Y points as a scattergram. The main variables are X and Y variables. Each series is represented by a different style of point.

  • Stacked Bar is similar to bar, except that each series value is "stacked" on the value of previous series, instead of being set out side-by-side.

  • Box-Whisker graphs show the central, two intermediate, and two extreme values of the main variable, or of the values of main variable corresponding to each value of the crosstab variable. Box-Whisker graphs require DISPLAY=<Specification>: <specification> which determines the central, intermediate, and extreme values to be displayed. It can have one of the following values: "Mean-1SD-2SD", "Median-25%-10%", or "Median-25%-5%" (SD indicates standard deviation, % indicates percentile).

  • Hi-Low displays X-Y or X-Y-Z points as a vertical bar running from X to Y, with a marker at the Z point (if present). The main variables are the X, Y, and (if present) Z point. The crosstab variable is the X-axis variable. The aggregate function describes the manner in which multiple X, Y, or Z points are combined per X-axis value; the default is maximum for X, minimum for Y, and average for Z.

  • Moving Average is similar to histogram, except each X-axis point represents the average for a period specified by the INTERVAL option.

  • Polar is similar to line, except that the X variable is displayed as an angle and the Y variable is displayed as a radius, resulting in a circular plot.

  • Stacked Histogram is similar to histogram, except that each series value is "stacked" on the value of previous series, instead of being set out side-by-side.

  • Scatter 3D displays X-Y-Z points as a scattergram. The main variables are X, Y, and Z variables. Each series is represented by a different style of point.

  • Pyramid uses horizontal bars to represent the count or weight of each value of the main variable. The crosstab variable must be present and have exactly two values. The horizontal bars for each value of the crosstab variable start from a common vertical line in the center of the graph and extend in opposite directions. This type of graph is typically used to display population by age and sex.

  • Step is similar to line, except that the points are connected by right-angle lines in a stair-step fashion.

Comments

If it is desired to plot several variables from each record, many graph types require the production of an intermediate table in the appropriate format for using a crosstab variable. A sequence such as the following may be necessary:

READ PopByCounty

DEFINE Population

DEFINE PopYear

ASSIGN Population = Pop80

ASSIGN PopYear = 1980

WRITE REPLACE GraphTable County Population PopYear

ASSIGN Population = Pop90

ASSIGN PopYear = 1990

WRITE APPEND GraphTable County Population PopYear

ASSIGN Population = Pop00

ASSIGN PopYear = 2000

WRITE APPEND GraphTable County Population PopYear

READ GraphTable

GRAPH County * PopYearGraphType="Bar" WEIGHTVAR=Population

Examples

Example 1: A graph showing the age of all survey respondents is displayed.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
GRAPH Age GraphType="Bar"

Example 2: A pyramid-style graph showing age by sex is displayed.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
GRAPH Age * Sex GraphType="Pyramid"

Example 3: A Box-Whisker plot showing the 1st and 2nd standard deviations from the mean is displayed. Because Sex is also specified, two plots (one for male and one for female) are shown in the graph window.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
GRAPH Age * Sex GraphType="Box-Whisker" Display="Mean-1SD-2SD"

Example 4: A graph showing the number of ill persons and vanilla eaters is displayed using the View for the Oswego outbreak investigation.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
FREQ Vanilla Ill STRATAVAR=Sex OUTTABLE=VanillaOut
READ VanillaOut
SELECT Vanilla = (+) OR Ill = (+)
SET Missing = (-)
DEFINE Vanilla2
DEFINE Ill2
IF Ill = (+) THEN
ASSIGN Ill2 = Sex
END
IF Vanilla = (+) THEN
ASSIGN Vanilla2 = Sex
END
GRAPH Ill2 Vanilla2 GRAPHTYPE="Bar" TITLETEXT="Number of Ill Persons and Vanilla Eaters by Sex" WEIGHTVAR=Count THREED=(+)

Example 5: A 3D scatter graph showing Age by Incubation time by the number of food items eaten is displayed. Note that the 3D graph can be rotated in the Graph window.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE NumberOfFoodItems NUMERIC
LET NumberOfFoodItems = 0
ASSIGN NumberOfFoodItems = NumberOfFoodItems + Vanilla + Chocolate + Brownbread + Spinach + Rolls + Milk + Mashedpota + Jello + FruitSalad + Coffee + BakedHam + CabbageSal + Cakes
GRAPH AGE Incubation NumberOfFoodItems GRAPHTYPE="Scatter 3D" THREED=(+)

Example 6: A pie chart showing age categories is displayed.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE AgeCategory NUMERIC

RECODE Age TO AgeCategory
LOVALUE - 0 = "Unknown"
0 - 10 = "0 - 10"
10 - 20 = "11 - 20"
20 - 30 = "21 - 30"
30 - 50 = "31 - 50"
50 - 70 = "51 - 70"
70 - HIVALUE = ">70"
END

GRAPH AgeCategory GRAPHTYPE="Pie" THREED=(+) TITLETEXT="Church Supper Attendees"

Example 7: A scatter graph is displayed showing age by time of supper.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
GRAPH TimeSupper Age GRAPHTYPE="Scatter XY" DATEFORMAT="hh:nn"

Example 8: A pie chart is displayed. Note the TEMPLATE parameter in the command. When viewing a Graph, and after having made customizations to the graph's apperance, a template file may be saved that stores those visual settings for future use. When the GRAPH command is run and a template is specified, any visual settings stores in the template being referenced will automatically be applied.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
GRAPH Ill GRAPHTYPE="Pie" TEMPLATE='C:\Epi_Info\Oswego.CHT'

Example 9: A histogram showing the incubation time for an unknown pathogen is displayed. Note that the DIALOG=(-) parameter ensures the Graph window does not appear. Instead, the Graph is generated and sent to the Analysis output window. This option can be useful when running automated scripts as it does not require user interaction in order to continue processing commandss.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Incubation NUMERIC
ASSIGN Incubation = MINUTES(TimeSupper, DateOnset) / 60
GRAPH Incubation GRAPHTYPE="Histogram" TITLETEXT="Incubation Period Histogram" XTITLE="Incubation Period (Hours)" YTITLE="Number of Cases" STARTFROM=0 INTERVAL=0.5 Hours DIALOG=(-)

Example 10: Two graphs are displayed in the same window. Each shows the number of people that ate vanilla by age, with one graph showing males and the second graph showing females.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
GRAPH Age * Vanilla GRAPHTYPE="Histogram" STRATAVAR=Sex MULTIGRAPH=2 * 2


Header Command (Analysis Reference)

HEADER

Analysis Command

Command Generator

Description

This command sets up specific headings as part of the output in Analysis.

Syntax

HEADER <level> ["<text>" [(<font property>)] [APPEND]] [TEXTFONT <color> <size>]

HEADER <level> DROP|RESET

  • The <level> can represent the Body Text, Window Title, File Title, Data Source Title, Procedure Title, Variable Title, or Stratum Title.

  • The <text> represents the heading to be displayed.

  • The <font property> represents the properties (underline, bold and italic) which will be separated by commas (,).

  • The <color> represents Aqua, Lime, Red, Black, Silver, Maroon, Blue, Navy, Teal, Fuchsia, Olive, White, Grey, Purple, Yellow, or Green. Color can also be represented by hexadecimal digits ###### with pairs of digits representing the amount of red, green, and blue on a scale of 0-255.

  • The <size> represents any number in the ranges -7 to -1, 1 to 7, or +1 to +7.

Comments

Values for font size represent standard values for HTML font sizes. Numbers preceded by + or - increase or decrease the default size by the specified number of levels.

In the first format, use of the APPEND keyword will result in the specified title line being added to any title already defined for that level.

In the second format, use of the DROP keyword will result in the last title line for that level being removed. Use of the RESET keyword will result in the title line(s) and font characteristics for that level being reset to their Epi Info defaults (in most cases, blank).

Headers 0 and 1 will not take effect until the next output file is opened. Header 2 will not take effect until the datasource is changed.

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
HEADER 0 "This is HEADER 0" (BOLD) TEXTFONT Green 7
HEADER 1 "This is HEADER 1" (ITALIC) TEXTFONT Yellow 6
HEADER 2 "This is HEADER 2" (UNDERLINE) TEXTFONT Blue 5
HEADER 3 "This is HEADER 3" (BOLD,ITALIC) TEXTFONT Red 4
HEADER 4 "This is HEADER 4" (BOLD,ITALIC,UNDERLINE) TEXTFONT Teal 3
HEADER 5 "This is HEADER 5" (BOLD,ITALIC,UNDERLINE) TEXTFONT Olive 2
HEADER 6 "This is HEADER 6" (BOLD,ITALIC,UNDERLINE) TEXTFONT White 1
FREQ Ill
TABLES Vanilla Ill
TABLES Vanilla Ill STRATAVAR=Sex


Help Command (Analysis Reference)

HELP

Analysis Command

Command Generator

Description

This command displays an .HTM or .CHM document.

Syntax

HELP '<filename>' "{block name}"

  • The <filename> represents the full path and file name of the help file to be opened.

  • The {block name} represents an optional bookmark or named anchor. In .CHM files, the block name can be a path to an .HTM document within the file.

Comments

The <filename> must end in .htm, .html, or. .chm. If an optional {block name} is given, the browser searches for named anchors ("bookmarks") in the HTML file and positions the anchor at the top of the screen. An anchor in HTML can be created by using a tag like <a name="MyData">.

If no directory path is given, the HELP command will look first in the HELP directory under the currently designated language directory (e.g., .\SPANISH\HELP. If the file is not found, it looks in the default HELP directory, .\ENGLISH\HELP. That failing, it looks in the currently logged directory. This allows translated help files to be accessed automatically as long as they retain the name (and block names) of the corresponding English versions.

Filenames must be enclosed in single quotes, and anchor names must be surrounded by double quotes.

Examples

Example 1: The HELP command loads the file 'South Pacific.HTM' in the computer's default web browser, and then automatically scrolls down to the location of the anchor named 'Bali Hai'.

HELP 'South Pacific.HTM' "Bali Hai"

Example 2: The HELP command loads the file 'Function.HTM' in the computer's default web browser. As no anchor is specified, the browser does not scroll to any predetermined location.

HELP 'Function.HTM' ""

Example 3: The HELP command loads the file 'EIHelp.CHM' in the Windows Help application. The path and file name that appear in the second part of the command point to a specific topic in the CHM file.

HELP 'EIHelp.CHM' "Command_Reference\CHECK\MV_Define_Command.htm"


If Then Else Command (Analysis Reference)

IF THEN ELSE

Analysis Command

Command Generator

Description

This command defines conditions and one or more consequences which result when the conditions are met. An alternative consequence can be given after the ELSE statement, to be realized if the first set of conditions is not true. If the condition is true, then the first statement is executed. If the statement is false, the statement is bypassed. If there is an ELSE statement, it is executed instead. THEN is part of the If Condition statement. It starts the section of code executed when the If condition is true.

Syntax

IF <expression> THEN
[command(s)]
END

IF <expression> THEN
[command(s)]
ELSE
[command(s)]
END

  • The <expression> represents a condition that determines whether or not subsequent commands will be run. If the condition evaluates to true, the commands inside of the IF block will be run. If the condition evaluates to false, the commands inside of the ELSE block will be run instead. If no ELSE exists and the condition is false, then no commands inside of the IF block are run.

  • The [command(s)] represents at least one valid command.

  • The ELSE statement is optional and will run any code contained inside of it when the <expression> evaluates to false.

Comments

An IF statement is executed immediately if it does not refer to a database variable, any characteristic or attribute that can be measured, or if any defined variables have been assigned literal values. If the statement, YEAR = 97 has already occurred, then an IF statement dependent on it, such as IF YEAR = 97 then …., is executed immediately.

IF Age > 15 THEN
ASSIGN Group = "ADULT"
ELSE
ASSIGN Group = "CHILD"
END

It is important to cover all the conditions in IF statements, to avoid gaps in the logic and results. Sometimes it is important to have an ELSE condition that covers conditions not included in other IF clauses. This effect is best achieved by setting the variable initially to something other than missing.

DEFINE ILL
ASSIGN ILL = (-)

IF Vomiting = (+) THEN
ASSIGN ILL = (+)
END

IF Diarrhea = (+) THEN
ASSIGN ILL = (+)
END

IF Fever = (+) THEN
ASSIGN ILL = (+)
END

Set Ill = (+) only if one or more symptoms are present.

The same result could be achieved with this code:

IF (Diarrhea = (+)) OR (Vomiting = (+)) OR \
(Fever = (+)) THEN
ASSIGN ILL = (+)
ELSE
ASSIGN ILL = (-)
END

Examples

Example 1: The Group variable for all records in the data set is assigned the value of "Young Adult" if the Age variable has a value between (but not including) 17 and 30. If the value in Age falls outside of this range, no value is assigned to Group.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Group
IF Age < 30 AND Age > 17 THEN
ASSIGN Group = "Young Adult"
END
LIST Group

Example 2: Several different values are assigned to the Group variable depending on the value of the Age variable.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Group
IF Age < 30 AND Age > 17 THEN
ASSIGN Group = "Young Adult"
END

IF Age <= 17 THEN
ASSIGN Group = "Minor"
END

IF Age >= 30 THEN
ASSIGN Group = "Adult"
END

LIST Group

Example 3: If the patient ate either chocolate or vanilla ice cream, the variable IceCream is assigned a value of true. Otherwise, it is assigned the value of false.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE IceCream

IF Vanilla = (+) OR Chocolate = (+) THEN
ASSIGN IceCream = (+)
ELSE
ASSIGN IceCream = (-)
END

LIST Vanilla Chocolate IceCream

Example 4: An age grouping is assigned based upon the patient's date of birth and the current system date.

READ 'C:\Epi_Info\Refugee.MDB':viewPatient
DEFINE AgeGroup
IF YEARS(DOB, SYSTEMDATE) > 65 THEN
ASSIGN AgeGroup = "Senior"
END

IF YEARS(DOB, SYSTEMDATE) < 18 THEN
ASSIGN AgeGroup = "Minor"
END

IF AgeGroup = (.) THEN
ASSIGN AgeGroup = "Adult"
END

LIST AgeGroup DOB


KMSurvival Command (Analysis Reference)

KMSURVIVAL

Analysis Command

Command Generator

How to Use the KMSURVIVAL Command

Kaplan-Meier Survival Analysis Overview

Computing KMSURVIVAL

Description

This command performs the Kaplan-Meier Survival Analysis and produces graphs and statistics for one or several groups of subjects being followed in a clinical study. At any given time, some of the subjects may be "censored," that is, not have information available on their status. KMSurvival is especially constructed to deal with this situation. Statistics showing the risk set by group and time can be written to an OUTTABLE for later formatting.

Syntax

KMSURVIVAL <time variable>=<group variable> * <censor variable> (<value>) [TIMEUNIT="<time unit>"] [OUTTABLE=<tablename>] [GRAPHTYPE="<graph type>"] [WEIGHTVAR=<weight variable>]

  • The <time variable> represents the variable specifying the time of the event.

  • The <group variable> represents the variable that indicates to which treatment or control group the subject belongs.

  • The <censor variable> represents the variable to describe an event as failure or censored.

  • The <value> represents the value of the censor variable indicating uncensored (failure).

  • The <time unit> represents a value for labeling the time axis.

  • The <graph type> represents the following:

    • Survival Probability is the observed survival over the different groups.

    • Log-Log Survival is the log of the negative log of the survival probability.

    • None produces no graph. If no graph type is specified, the default Survival Probability curve is plotted.

  • The <weight variable> represents a variable in the database that specifies the contribution or each data row to the output.

Example

The commands below show a comparison between two groups.

READ 'C:\Epi_Info\Sample.mdb':Addicts
KMSURVIVAL Survival_Time_Days = Clinic * Status ( 1 ) TIMEUNIT="Days"


List Command (Analysis Reference)

LIST

Analysis Command

Command Generator

How to Use the LIST Command

Description

This command does a line listing of the current dataset. If variable names are given, LIST displays only these variables. LIST * displays all variables of all active records. LIST * EXCEPT displays all variables of all active records except those named.

Syntax

LIST {* EXCEPT} [<variable(s)>] {COLUMNSIZE=<num1>, <num2>, <num3>} {NOIMAGE} {NOWRAP} {LINENUMBERS}

LIST {* EXCEPT} [<variable(s)>] {GRIDTABLE | UPDATE}

  • The * asterisk is used to represent all variables

  • The <variable(s)> represents one or more variable names.

  • The <num1> represents a number from 0 to 99 representing the number of columns to be displayed before splitting a table (default=6). If zero, all specified columns are displayed without splitting the table.

  • The <num2> represents a number from 0 to 99 representing the number of columns to be allocated per image (default=0 for rendered images, 3 for unrendered images). If zero, each image column is allocated space based on its width in the view.

  • The <num3> represents a number from 0 to 99 representing the number of columns to be allocated per memo field (default=0). If zero, each memo column is displayed separately.

  • If the keyword NOIMAGE is used, the image filename is displayed, but not the image itself.

  • The keyword NOWRAP prevents line breaks from being inserted in to the text fields, so that columns are as wide as the longest line in the field.

  • The keyword LINENUMBERS causes line numbers to be displayed when automatic splitting is not being used.

  • The keyword GRIDTABLE specifies that data is displayed as a grid for viewing only instead of HTML format.

  • The keyword UPDATE specifies that data is displayed as a grid for updating instead of in HTML format. This command allows for permanent changes in the database.

  • The Allow Updates option is not functional with Microsoft Excel, Foxpro, or dbase file formats; however, it is functional with Epi6 REC files.

Comments

Changes made to the database using UPDATE do not use Check Code or the properties set in Make View (for example, MUSTENTER or NOENTER). If Check Code features are desired, use Enter to edit data. List Update is convenient for correcting data entry errors. There is not an undo feature; therefore, the results are permanent unless you have made a copy of the .MDB first.

Adding an EXCEPT Variable list excludes all the named variables from a LIST or LIST *. Record numbers are listed automatically as the first item on each line when the program determines that a table must be split; when splitting is disabled, line numbers may be included by use of the LINENUMBERS keyword.

If the dataset has been sorted with the SORT command, the records are listed in sorted order. Otherwise, they are listed in an order determined by the database.

If UPDATE is used, the data in the grid can be edited. Edits take effect when the cursor is moved to a new table row or when the grid is closed.

Examples

Example 1: All variables are listed using the grid format.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
LIST * GRIDTABLE

Example 2: The Age variable is listed using the web (HTML) format.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
LIST Age

Example 3: The variables Sex, Vanilla, Chocolate, Ill, and Age are listed using the grid format.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
LIST Sex Vanilla Chocolate Ill Age GRIDTABLE

Example 4: All variables are listed except those in the Desserts group. The UPDATE parameter allows the user to make changes to the items displayed. In this example, Vanilla, Chocolate, and Cakes belong to the Desserts group variable.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
LIST * EXCEPT Desserts UPDATE

Note:


Logistic Command (Analysis Reference)

LOGISTIC

Analysis Command

Command Generator

How to Use the LOGISTIC Command

Logistic Regression Overview

Description

This command performs conditional or unconditional multivariate logistic regression with automatic dummy variables and support for multiple interactions.

Syntax

LOGISTIC <dependent variable> = <independent variable(s)> [MATCHVAR=<match variable>] [NOINTERCEPT] [OUTTABLE=<tablename>] [WEIGHTVAR=<weight variable>] [PVALUE=<PValue>]

  • The <dependent variable> represents the dependent variable.

  • The <independent variable(s)> represents an independent variable that can be a numeric variable, a non-numeric variable, or a variable surrounded by parenthesis. Any text or yes-no variable, or a variable surrounded with parenthesis, is automatically recoded into dummy variables. A dummy variable is created for all but one of the levels of a variable. This dummy variable measures the contribution of its level relative to the excluded level. Interactions are specified by * between variables.

  • The <weight variable> represents a variable to specify the contribution each data row has to the output.

  • The <match variable> represents a variable to specify the different groups for a conditional analysis. If a match variable is specified a conditional analysis will be performed

  • The <tablename> represents a table where the residuals are stored. If no table name is present, no residuals are produced.

  • The <PValue> represents the size of the confidence intervals; this may be specified as percent or decimal; if greater than .5, 1-PValue is used. The default is 95%.

Comments

LOGISTIC uses the Newton-Rhapson method for maximizing likelihood.

Example

To do an unconditional regression run the following:

READ 'Sample.Mdb':viewOswego
LOGISTIC Ill = BrownBread CabbageSal Water Milk Chocolate Vanilla


Map Command (Analysis Reference)

MAP

Analysis Command

Command Generator

How to Use the MAP Command

Description

This command produces a choropleth map by summarizing data based on a geographic field which matches the geographic filed of a SHP file. It uses Epi Map to create the map. Maps can be customized and saved into a MAP template. When a MAP template is specified, an output table should also be specified to ensure that the correct data is referenced.

Syntax

MAP <Aggregate Function>(<variable>) <geographic variable> ::
 '<shapefile>':<shape variable> {TITLETEXT="<text>"} {TEMPLATE='<filename>'}
 {OUTTABLE=<tablename>}{DENOMINATOR=<denominator>[*<multiplier>]}
 {WEIGHTVAR=<weight variable> } [RUNSILENT]

  • Aggregate Function can be one of the following:

    • Count is the number of values in the expression or number of selected rows.

    • Sum is the total of the values in the numeric expression.

    • Average is the average of the values in the numeric expression.

    • Minimum is the lowest value in the expression.

    • Maximum is the highest value in the expression.

    • Case-Based is an advanced display process that allows different symbols to mark levels of classification (e.g., Confirmed, Probable, Discarded, Suspected).

  • <variable> represents the variable in the dataset that contains information about the geographic region.

  • <geographic variable> represents the variable in the dataset that identifies the geographic region.

  • <shapefile> represents the path and file name for the Shapefile (SHP) to be used. Shapefiles are those used by ArcView and Arc/Info.

  • <shape variable> represents the variable in the SHP file that corresponds to the GeoVarName in the dataset.

  • <denominator> represents the variable in the SHP file that contains the denominator for population or area-based rates.

  • <multiplier> is a number used to create rates.

  • <weight variable> represents the variable containing the frequency for the event.

  • <text> represents the tile of the map.

  • <filename> represents the name of the MAP template to use. If a template is used, an OUTTABLE must also be specified.

  • <tablename> represents the name of the table in which the summarized data is stored for mapping.

  • RUNSILENT, if present, indicates that Epi Map should not stop to allow customization, but return to Analysis without intervention.

Comments

All rates are given using the denominator units; to create other rates, specify a multiplier (e.g., use a multiplier of 1000 to create a rate per 1000 population). The multiplier can also be used to convert between metric and English units.

Values to be used as denominator should be included in the DBF file associated to the shape map.

Examples

READ 'C:\Epi_Info\Sample.mdb':viewMexMap95
MAP AVG(PerTeenBirths95) STATE :: 'C:\Epi_Info\MXState.shp':NAME

READ 'C:\Epi_Info\Sample.mdb':BFMeasles
MAP COUNT(DIED) DISTRICT :: 'C:\Epi_Info\BurkinaFaso.shp':NAME2


Match Command (Analysis Reference)

Match

Analysis Command

Command Generator

How to Use the MATCH Command

Description

This command performs a matched analysis of the specified exposure and outcome variables, which are assumed to be yes/no variables. One table is produced for each number of cases in a match group. The first variable appears in the left margin and contains values from zero to the number of cases in the match group. The second variable appears on the top margin and contains values from zero to the number of cases in the match group. The cells contain the number of match groups showing the combination of positive exposures and positive outcomes shown in the margins. The output table produced by the command is similar to the summary table produced by TABLES.

Syntax

MATCH <exposure> <outcome> MATCHVAR=<variable(s)> {WEIGHTVAR=<variable>}
{OUTTABLE=<tablename>} {COLUMNSIZE=<number>}
{NOWRAP}

  • The <exposure> represents a variable in the database to be considered the risk factor.

  • The <outcome> represents a variable in the database considered disease of consequence.

  • The <variable(s)> represent the variable(s) used to identify the match group to which each case belongs.

  • The <variable> represents a variable containing the frequency for the event.

  • The <tablename> represents a name for a table to store summarized data.

  • The <number> represents the number of columns per line of output; zero means do not split lines.

  • NOWRAP prevents line breaks from being inserted in to the text fields, so that columns are as wide as the longest line in the field.

Comments

The MATCHVAR variable is used for stratification. For example, if every case has a corresponding control, then each pair is given an identifier, perhaps PAIRID, that identifies the pair. The MATCHVAR variable is PAIRID and the MATCH command internally performs a Mantel-Haenszel stratified analysis using PAIRID as the stratifier. Matched groups can have several controls per case, or even more than one case matched to several controls.

Multiline (memo) variables cannot be used in MATCH. 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 match.

WEIGHTVAR is intended for summary data in which the number of cases will be stored in a variable such as count.

Examples

The MATCH command is used to analyze a case-control study about Rely tampons and Toxic Shock Syndrome. The exposure variable is the use of Rely tampons. The ID variable is a number that links the case with each of her three controls. Case is a Yes/No variable representing whether the record is a case or a control.

READ 'C:\Epi_Info\Sample.mdb':viewRely
MATCH Rely Case MATCHVAR=ID


Means Command (Analysis Reference)

MEANS

Analysis Command

Command Generator

How to Use the MEANS Command

Complex Sample Information

Description

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.

Syntax

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

  • The <variable 1> represents a numeric variable to be used to calculate means (or * for all numeric variables).

  • The <variable 2> represents any variable used for cross-tabulation (optional).

  • The <variable(s)> represent variable(s) to be used for stratified analysis.

  • The <variable> represents a variable containing the frequency for the event.

  • The <tablename> represents a name for a table to be created.

Comments

The MEANS command has two formats. If only one variable is supplied, the program produces a table like that 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 like that 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 2 groups while the f-test works with any number of groups.

MEANS produces the following statistical tests:

  • Parametric tests

  • ANOVA (for two or more samples)

  • Student's t-test (for two samples)

  • Non-parametric tests

  • Kruskal-Wallis one-way analysis of variance (for two or more samples)

  • Mann-Whitney U Test = Wilcoxon Rank Sum Test (for two samples)

Examples

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%, maximumm, minimum, and mode.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
MEANS Age

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 'C:\Epi_Info\Sample.mdb':viewEvansCounty
MEANS CHL CHD

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

READ 'C:\Epi_Info\Sample.mdb':viewSmoke
MEANS NumCigar Sex STRATAVAR=Strata WEIGHTVAR=SampW PSUVAR=PSUID


Merge Command (Analysis Reference)

MERGE

Analysis Command

Command Generator

How to Use the MERGE Command

Description

This command merges records in one dataset with those in another, using one or more defined identifiers to establish the match between records. Records in the second dataset that do not have matching keys can be appended to the end of a dataset. Records in the second dataset that do have matching keys can be used to update records in the main dataset. Records in the second dataset can be use as the parent in defining an Epi Info parent-child relationship after records have been merged into both the parent and child views.

Syntax

MERGE <table specification> {LINKNAME=<text>} [<key(s)>] <type> {FileSpec}

  • The <table specification> represents the type and name of a data table to be read as the Merge file.

  • The <key(s)> represent one or more data fields that designate keys on which the match or relate will be performed. These are in the form:

  • <ExpressionCurrntTable>::<ExpressionMergeTable>

  • Multiple key expressions may be connected with AND. The UniqueKey field may not be specified as a merge expression.

  • The <MergeType>, may be APPEND, UPDATE or RELATE. If no type is specified, both APPEND and UPDATE are performed. For matching records, UPDATE replaces the value of any field in the READ table whose name matches on in the MERGE table with the value from the MERGE table unless it has a missing value. For unmatched records, APPEND creates a new record in the READ table with values only for those fields which exist in the MERGE table.

  • The FILESPEC represents a special set of instructions for accessing files other than Access files, often those with password security set.

  • Merge is only supported when the READ data source is an Epi Info or MS Access table. The MERGE data source can be of any type.

Comments

APPEND adds unmatched records in the Merge table to the currently active dataset. Only fields found in both datasets are added.

UPDATE replaces fields of records in the active table with those in the Merge table if the key expressions match. Only fields found in both datasets with a non-empty value in the Merge table are replaced.

RELATE moves the unique key of the current table to the foreign key of the related table to make a permanent relationship. The related (Merge) table must be an Access/Epi2000 table. Both the READ table and the RELATE table must be Epi Info views.

Example

MERGE 'C:\Epi_Info\BabyData.MDB':viewBabyInfoAgeInDays :: Age


Printout Command (Analysis Reference)

PRINTOUT

Analysis Command

Command Generator

Description

This command sends the contents of the current output file (the one visible in the output window) or some other specified file, to the default printer.

Syntax

PRINTOUT <filename>

Example

The output file Oswego.txt is sent to the printer.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
WRITE REPLACE "Text" 'C:\Epi_Info\Oswego.txt' *
PRINTOUT 'C:\Epi_Info\Oswego.txt'


Quit Command (Analysis Reference)

QUIT

Analysis Command

Command Generator

Description

This command closes the current data files and terminates the current program, closing Analysis.

Syntax

QUIT

Program Specific Features

Quit will stop the execution of a program and close Analysis. If there is no QUIT at the end of a .PGM program, Analysis continues to run and offer user-interaction.

Example

The user is presented with a dialog box asking if they would like to close Analysis. Selecting 'Yes' closes Analysis.

DEFINE Results YN
DIALOG "Do you wish to close Analysis?" Results YN
IF Results = (+) THEN
QUIT
END


Read Command (Analysis Reference)

READ

Analysis Command

Command Generator

How to Use the READ Command

Description

This command makes one or more Views the active dataset. It also removes any previously active datasets and associated defined variables, and dataset-specific commands such as RELATE, SORT, SELECT or IF statements.

Syntax

READ <table specification> LINKNAME=<linktable name>
FILESPEC HDR=["YES" | "NO"]
 FMT="<file
 format>" UID="<username>" PWD="<password>" END

  • The <table specification> and FILESPEC are referred to in the following paragraphs:

  • The READ, RELATE, and MERGE commands can operate on many different types of data. Each type requires a different table specification, and some types required additional information in a file specification. Table specifications usually consist of a data type (contained in double quotes), a space, a file path (which may be enclosed in single quotes, and must be if it includes a space), a colon, and a table name. File specifications must start on a new line with the word FILESPEC; this may be followed by keyword parameters in the form <keyword>="<value>"; this may be followed by field definitions, each on a separate line, in the form <fieldname> <start>-<end> <fieldtype>; followed by END (on the same line if only keywords are present, on a new line if field definitions are present).

  • The various file types that can be used are as follows:

    • Epi Info Views and Access Tables – If the View or table is in the current project, the first form may be used. The second form is like the first, but explicitly specifies the file path; it may be used with old-style (8.3) path and filenames. The third form specifies an Access database; single quotes must be used around the path because it contains a space. The fourth form shows a password-protected Access database (using the database password method, not the workgroup file method).

    • Desktop Databases – These databases have only one table per file, so there is no need to specify a table. Note that later versions of Paradox must be read using the ODBC driver supplied with professional versions of the product. Also note that the Epi6 driver actually reads the REC file into the database, so changes made through Epi6 after the READ will not be saved to Epi Info and changes made through Epi Info will not be saved to Epi6 (unless the Epi6 file is rewritten with the WRITE REPLACE command).

    • Microsoft Excel – Excel 3.0 had only one spreadsheet per file, so there is no need to specify a table if the entire spreadsheet is to be read, as shown in the first example. The FILESPEC uses the HDR keyword to indicate whether the first row contains field names or not. The second example shows how to use a cell range with Excel 3. Later versions of Excel allow multiple spreadsheets per file; to refer to a particular spreadsheet, use its sheet name followed by a dollar sign, as shown in the third example. Alternatively, a named range may be specified. The fifth example shows how to specify a cell range in conjunction with a sheet name.

    • ODBC Databases – Data sources, which must be accessed via ODBC drivers, include SQL Server, Oracle, SAS and later versions of Paradox. ODBC drivers are not part of Epi Info and must be obtained from the database vendor or a third party provider. Once an ODBC driver is installed, data source names must usually be established for each database to be accessed using the driver; this is done through the ODBC Manager program in the Control Panel, and is usually done by the database administrator. The FILESPEC may be used to supply a username and password, but if none is supplied and the database is password-protected, the program will prompt the user to supply them.

    • Text Files – There are two basically different forms of text files. Both forms have only one table per file, so there is no need to specify a table. Both forms puts the data for one record on a single line. The difference is in how the fields are indicated. One form, called "delimited", uses designated characters to separate fields. The first example shows the CSV version, where commas separate fields and text fields are surrounded by double quotes. The second example shows the TAB version, where tab characters separate fields. The third example shows the DLM version, which explicitly includes the ASCII value of the delimiter character (in this case, space). The command generator allows the delimiter character to be set explicitly. The second form, shown in the fourth example, is called "fixed", because each field occupies the same positions in each line. All character positions through the last field must be accounted for, even if they do not contain useful data (the command generator will automatically generate filler fields as required). Even if the first line of the file contains field names (HDR="YES"), the names specified in field definitions will be used. The text file driver actually reads the file into the database, so changes made to the file after the READ will not be saved to Epi Info and changes made through Epi Info will not be saved to the text file (unless it is rewritten with the WRITE REPLACE command, which is available only in CSV format).

    • HTML Files – An HTML file may contain more than one table, but since the tables do not have names, the table name portion of the specification is not used. Instead, the line and offset in the file at which the table starts is specified. The command generator examines the entire file and finds the locations of the tables, which it then displays for the user to preview and select; it is extremely difficult to determine the line and offset without using the command generator. The HTML file driver actually reads the file into the database, so changes made to the file after the READ will not be saved to Epi Info and changes made through Epi Info will not be saved to the HTML file.

  • LinkTable Name – The name of a link table in the current (home) MDB that constitutes a link to an external file or data table. If not specified and the table specification refers to an Epi Info or Access database, that database becomes the current MDB.

  • READ "Epi 6" can optionally have a FILESPEC with one or both of the following:

    • YEAR="yyyy" SPLITYEAR="zz"

    • If an Epi 6 date field does not have a year, the year yyyy will be used; if no YEAR is provided, the current year will be used.

    • If an Epi 6 date field has a 2-digit year, values less than or equal to zz will be treated as the current century, values greater than zz will be treated as the previous century. If no SPLITYEAR is provided, the value in the system's locale setting will be used; if the operating system does not support this setting, 30 will be used.

Examples

Example 1: The Oswego View is read. Note that the database file is not specified, meaning that unless viewOswego is contained within the current data source, an error will occur.

READ viewOswego

Example 2: The Oswego View is read. Unlike in example 1, the full path to the database file is specified meaning that the current data source can be ignored.

READ 'C:\Epi_Info\Sample.mdb':viewOswego

Example 3: When reading Access and ODBC tables where a space appears in the table name, it must be enclosed in single quotation marks.

READ 'C:\Epi_Info\Sample.mdb':'Table Name with Spaces'

Example 4: The Epi 6 database file EPIDEMIC.REC is read.

READ "Epi6 Direct Read" 'C:\Epi_Info\EPIDEMIC.REC'

Example 5: The Epi 6 database file EPIDEMIC.REC is read.

READ "Epi6" 'C:\Epi_Info\EPIDEMIC.REC' LINKNAME=EPIDEMIC

Example 6: A dBASE database is read.

READ "dBASE 5.0" 'C:\Epi_Info\SHPumps.dbf'

Example 7: A FoxPro database is read.

READ "FoxPro 3.0" 'C:\Epi_Info\ExerFiles\ESMortality.MDB'

Example 8: A Paradox database is read.

READ "Paradox 5.x" 'C:\Epi_Info\STATPDX.DB'

Example 9: An Excel spreadsheet is read.

READ "Excel 8.0" 'C:\Epi_Info\ExerFiles\jamaica.xls':'Sheet1$'
FILESPEC HDR="YES" END

Example 10: An ODBC connection is read.

READ "ODBC" 'my report':'dbo.AgeWithCount'

Example 11: An ODBC connection is read. FILESPEC is used to provide a username and password for the connection.

READ "ODBC" 'my report':'dbo.AgeWithCount'
FILESPEC UID="epilink" PWD="epipass" END

Example 12: A text file with variable column sizes is read.

READ "Text (Delimited)" 'C:\Epi_Info\xytest.txt'
FILESPEC HDR="YES" FMT="DLM(9)" END

Example 13: A text file with fixed column sizes is read.

READ "Text (Fixed)" 'C:\Epi_Info\xytest.txt'
FILESPEC HDR="YES" FMT="FIX"
X_Axis 1-15 Number
Y_Axis 16-30 Number
END

Example 14: An HTML file is read.

READ "HTML" 'C:\Epi_Info\Out205.htm'
FILESPEC LINE="24" OFFSET="1" END


Recode Command (Analysis Reference)

RECODE

Analysis Command

Command Generator

Description

This command is used to change some or all the values of a variable. New values can be stored in the same variable or in a new one. It can also be used to convert a numeric variable into a character variable or the reverse, or to create a new variable based on recoded values of an existing variable.

Syntax

RECODE <variable1> TO <variable2>
value1 - value2 = <recoded value>
value1 – HIVALUE = <recoded value>
LOVALUE - value2 = <recoded value>
value3 = <recoded value>
ELSE = <recoded value>
END

  • The <variable1> represents the donor variable (where the values are).

  • The <variable2> represents the receiver variable (where recoded values will be).

Comments

Text values must be enclosed in quotation marks; numeric, date and yes/no values must not be. All recoded values must be of the same type. Numeric ranges are separated by a space, hyphen, and space, as in 1 - 5. Negative values are permitted, as in -10, -9, and -8. The words LOVALUE and HIVALUE may be used to indicate the smallest and largest values representable in the database. The word ELSE may be used to indicate all values not falling in the preceding ranges. Recodes take place in the order stated; if two ranges overlap, the first in order will apply. Analysis cannot RECODE more than about 12 levels of values. If this a problem, do as many recodes as possible, then write a new table, READ it and do more recodes.

Examples

Example 1: The RECODE command is used to generate an age range.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE AgeRange
RECODE Age TO AgeRange
LOVALUE - 0 = "<=0"
0 - 10 = ">0 - 10"
10 - 20 = ">10 - 20"
20 - 30 = ">20 - 30"
30 - 40 = ">30 - 40"
40 - 50 = ">40 - 50"
50 - 60 = ">50 - 60"
60 - 70 = ">60 - 70"
70 - 80 = ">70 - 80"
80 - 90 = ">80 - 90"
90 - 99 = ">90 - 99"
99 - HIVALUE = ">99"
END
LIST Age AgeRange

Example 2: The RECODE command is used to generate an age range. The ELSE clause ensures that any values not captured in the recoding process are assigned a default value. In this case, any values greater than 60 are assigned "Senior."

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE AgeRange
RECODE Age TO AgeRange
LOVALUE - 0 = "<=0"
0 - 10 = ">0 - 10"
10 - 20 = ">10 - 20"
20 - 30 = ">20 - 30"
30 - 50 = ">30 - 50"
50 - 65 = ">50 - 65"
ELSE = "Senior"
END
LIST Age AgeRange

Example 3: The RECODE command is used to generate a detailed age range from 0 to 70 in increments of three. Note that a single RECODE command is limited to approximately 12 conditions due to query size limitations inherent in the Access database format. The desired age categories would require more than 12 recodes. To work around this problem, only ten recodes are done at a time and they are separated by a series of SELECT, WRITE, and READ commands. The first WRITE command creates a new temporary table (or overwrites an existing one) that stores only records that contain recoded values. The remaining records are not written out due to the SELECT command. Each subsequent block of recoded values is then written to the same file using the APPEND parameter. By the time the code is done executing, the table T1 contains all of the recoded data.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE AgeRange
RECODE AGE TO AgeRange
LOVALUE - 0 = "<=0"
0 - 3 = ">0 - 3"
3 - 6 = ">3 - 6"
6 - 9 = ">6 - 9"
9 - 12 = ">9 - 12"
12 - 15 = ">12 - 15"
15 - 18 = ">15 - 18"
18 - 21 = ">18 - 21"
21 - 24 = ">21 - 24"
24 - 27 = ">24 - 27"
END

SELECT NOT AgeRange = (.)
WRITE REPLACE "Epi 2000" 'C:\Epi_Info\Sample.mdb':T1 *

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE AgeRange
RECODE Age TO AgeRange
27 - 30 = ">27 - 30"
30 - 33 = ">30 - 33"
33 - 36 = ">33 - 36"
36 - 39 = ">36 - 39"
39 - 42 = ">39 - 42"
42 - 45 = ">42 - 45"
45 - 48 = ">45 - 48"
48 - 51 = ">48 - 51"
51 - 54 = ">51 - 54"
54 - 57 = ">54 - 57"
END

SELECT NOT AgeRange = (.)
WRITE APPEND "Epi 2000" 'C:\Epi_Info\Sample.mdb':T1 *

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE AgeRange
RECODE Age TO AgeRange
57 - 60 = ">57 - 60"
60 - 63 = ">60 - 63"
63 - 66 = ">63 - 66"
66 - 69 = ">66 - 69"
69 - 70 = ">69 - 70"
70 - HIVALUE = ">70"
END

SELECT NOT AgeRange = (.)
WRITE APPEND "Epi 2000" 'C:\Epi_Info\Sample.mdb':T1 *
READ T1

LIST Age AgeRange


Regress Command (Analysis Reference)

REGRESS

Analysis Command

Command Generator

How to Use the REGRESS Command

Description

This command performs multivariate linear regression with support for automatic dummy variables and multiple interactions. If a variable has more than two values it is automatically turned into a series of 'yes/no' variables called 'dummy variables', one for each extra value.

Syntax

REGRESS <dependent variable> = <independent variable(s)> [NOINTERCEPT] [OUTTABLE=<tablename>] [WEIGHTVAR=<weight variable>] [PVALUE=<PValue>]

  • The <dependent variable> represents the dependent variable.

  • The <independent variable(s)> is an independent variable that can be a numeric variable, a non-numeric variable, or a variable surrounded by parenthesis. Any text or yes-no variable, or a variable surrounded with parenthesis, is automatically recoded into dummy variables. A dummy variable is created for all but one of the levels of a variable. This dummy variable measures the contribution of its level relative to the excluded level. Interactions are specified by * between variables.

  • The <weight variable> represents a variable describing each data row's contribution to the regression

  • The <tablename> is the table to store the residuals. If no table name is present, no residuals are produced.

  • The <PValue> represents the size of the confidence intervals; may be specified as percent or decimal; if greater than .5, 1-PValue is used. The default is 95%.

Comments

REGRESS uses the least-squares method for determining coefficients.

Example

READ 'C:\Epi_Info\Sample.mdb':viewBabyBloodPressure
REGRESS SystolicBlood = AgeInDaysBirthweightOUTTABLE=LNR
READ LNR
GRAPH SystolicBlood RESIDUAL GRAPHTYPE="Scatter XY"


Relate Command (Analysis Reference)

RELATE

Analysis Command

Command Generator

How to Analyze Related Views

Description

This command links one or more tables to the current dataset during analysis, using a common identifier to find matching records. The identifier may span several fields, in which case values in each of the fields must match. The linked tables remain separate on the disk.

Syntax

RELATE <table specification> {LINKNAME=<text>} [<key(s)>] {ALL}
FILESPEC

  • The <table specification> represents the type and name of a data table to be read as the Related file.

  • The <key(s)> represent one or more expressions that designate keys on which the match or relate will be performed. When multiple expressions are used, they are connected with AND. These are in the form:

<ExpressionCurrentTable> :: <ExpressionRelateTable>

  • The ALL represents records in the table(s) already READ or related for which there is no corresponding record in the RELATE table will be included in the data with null values for variables in the RELATE table. If absent, only records with corresponding records in the RELATE table will be included in the data.

Program Specific Features

Analysis

If the relationship was created in Make View, Analysis can relate the two tables without need of a key expression.

MakeView

  • Grid tables and relate buttons cause the creation of parent-child relationships.

  • Grid tables have a prefix of recgrid table.

Comments

To use RELATE, at least one table must have been made active with the READ command. The table to be linked must have a key field that identifies related records in the other table. In Epi Info, the keys in the main and related tables or files do not have to have the same name.

The expressions in the key are the names of variables in the tables that will be used to determine which records match each other. More than one key pair ("multiple keys") can be designated, separated by AND.

After issuing the RELATE command, the variables in the related table may be used as though they were part of the main table. Where variable names are duplicated in the related tables, the variable names will be suffixed with a sequence number. In referring to a variable in a related table, you may (optionally) use the form: HOUSE.AGE to represent the variable AGE in the View HOUSE. This will distinguish it from another variable AGE that might be in the main table.

Frequencies, cross-tabulations, and other operations involving data in both the main and related tables can be performed. To preserve the linked structure, the WRITE command may be used to create a new table. More than one table may be related to the main table or related table by using successive RELATE commands.

Example

The records from the Patient and Assmnt data tables are related to the Family data table.

READ 'C:\Epi_Info\Refugee.MDB':viewFamily
RELATE viewPatient FAMIDNUM :: FAMIDNUM
RELATE viewAssmnt BOH :: BOH


Report Command (Analysis Reference)

REPORT

Analysis Command

Command Generator

Description

This command prints a report using Epi Report.

Syntax

REPORT '<report file>' {'<printer name>'}

REPORT '<report file>' DISPLAY

REPORT '<report file>' TO '<output file>'

  • <report file> represents the report template (.EPT) file to be run.

  • <printer name> represents a printer defined on the machine to where the report is sent. If omitted, the report prints to the default printer.

  • If the word "DISPLAY" is used, the report is shown on the screen and from there, it can be printed or published manually.

  • <output file> represents either a file name or a file path to receive published output. If <output file> represents an existing directory, the output is created in that directory with the same name as the report template but with an .htm suffix. Otherwise, it is treated as a file name and created if necessary. Existing files of the same name are overwritten without warning.

Program Specific Feature

From the command generation dialog box, report templates can be created or edited, and existing reports can be previewed. If it is desired to use the current Analysis output file as a data source for Epi Report, use the command dialog box rather than running Epi Report as a separate task.

Comments

If no printer is specified, the report will be printed on the user's default printer.

Epi Report cannot accept duplicate identical commands in the same output file. In the following Analysis program

ROUTEOUT 'MonthlyReportData1'

READ 'LastMonth'

FREQ Disease

ROUTEOUT 'MonthlyReportData2'

READ 'ThisMonth'

FREQ Disease

The second ROUTEOUT is necessary because otherwise there would be two FREQ Disease commands in the output file.

Examples

Example 1: The report is displayed in the Epi Report preview window.

REPORT 'C:\Epi_Info\Sample.EPT'

Example 2: The report is sent the printer named HP 960 Local.

REPORT 'C:\Epi_Info\Sample.EPT' 'HP 960 Local'

Example 3: The report is converted into an HTML document and then opened using Internet Explorer.

REPORT 'C:\Epi_Info\Sample.EPT' TO 'C:\Epi_Info\Output'
EXECUTE "C:\Program Files\Internet Explorer\iexplore.exe C:\Epi_Info\Output\Sample.htm"


RouteOut Command (Analysis Reference)

ROUTEOUT

Analysis Command

Command Generator

Description

This command directs output to the named file until the process is terminated by CLOSEOUT. Output from commands such as FREQ and LIST is appended to the same output file as it is produced.

Syntax

ROUTEOUT <filename> {REPLACE | APPEND}

  • The <filename> represents an HTM document where the output is to be stored. If no directory is specified, the directory of the current project is used.

  • The REPLACE | APPEND keyword controls what happens to an existing file of the same name. If REPLACE is specified, any existing file of the same name is deleted prior to writing. If APPEND is specified, new output is appended to any existing file of the same name.

Comments

Epi Info sends output to an HTM document that can be read by any browser. If no output is selected, Epi Info creates a new file typically called OUTXXX.HTM where XXX is a sequential number. Output files are placed in the same directory as the current project. The prefix for output files and a starting sequence number can be changed from the Storing Output command located in the Output folder.

If no path is specified, or if the directory does not exist, the output file is created in the directory of the current project.

Example

The output generated by running the commands below is sent to the file Outbreak1.htm in the C:\Epi_Info folder.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
ROUTEOUT 'C:\Epi_Info\Outbreak1.htm' REPLACE
SET STATISTICS=COMPLETE
TABLES Vanilla Ill STRATAVAR=Sex
MEANS Chocolate Ill
CLOSEOUT


RunPGM Command (Analysis Reference)

RUNPGM

Analysis Command

Command Generator

Description

This command runs a stored Analysis program. This command is somewhat like an INCLUDE file or subroutine in other systems.

Syntax

RUNPGM '<file name>':"<program>"

RUNPGM '<file name>'

  • The <file name> represents the path and filename for the MDB file or PGM file where the program is stored. If the path or filename contains a space, it must be enclosed in single quotes. If the program to be run is in the current project, the path need not be supplied.

  • The <program> represents the Program name. If the program name contains a space, it must be enclosed in double quotes. This is not used for text files.

Comments

Since the filename can include any path and database name, the program to be executed can be stored in a different database than the one in use.

Examples

Example 1: The Graph1 program from Sample.mdb is run.

RUNPGM 'C:\Epi_Info\Sample.mdb':"Graph1"

Example 2: The program editor code contained in the Statistics.pgm file is run.

RUNPGM 'C:\Epi_Info\Statistics.pgm'


Select Command (Analysis Reference)

SELECT

Analysis Command

Command Generator

How to Use the SELECT Command

Description

This command allows an expression to be specified that must be true for a record to be processed. It can also be called a data filter. If the current selection is Age>35, then only those records with Age greater than 35 are selected. SELECT used alone without an expression cancels all previous SELECT statements. SELECT statements are cumulative until canceled. Therefore, Select Age > 34, Select Sex = “Male" will choose males over the age of 34. But don’t forget to cancel Select before doing Select Sex = “Female" as you will get only records that are both male and female or none at all.

Syntax

SELECT <expression>

  • The <expression> represents any valid Epi Info expression.

Comments

SELECT expressions are cumulative so that the two expressions:

SELECT Age > 35

SELECT Sex = "F"

are equivalent to

SELECT (Age > 35) AND (Sex = "F")

Examples

Example 1: A subset of the data contained in the Patient data table is selected. In this case, only records where the patient is female and born after 01/01/1970 or where the patient is male and born after 01/01/1978 are selected to be in the subset. Note the use of parentheses to show relationships.

READ 'C:\Epi_Info\Refugee.MDB':viewPatient
SELECT ((DOB > 01/01/1970) AND (Sex = "F")) OR ((DOB > 01/01/1978) AND (Sex = "M"))
LIST * GRIDTABLE

Example 2: A subset of the data contained in the Patient data table is selected. In this case, only records where the patient's first name is "Pam" are selected to be in the subset. Note that "Pam" is not case sensitive, and the SELECT command would have also selected "PAM" and "pam".

READ 'C:\Epi_Info\Refugee.MDB':viewPatient
SELECT FirstName = "Pam"
LIST * GRIDTABLE

Example 3: A subset of the data contained in the Patient data table is selected. In this case, only records where the patient's last name starts with the letters "Mc" and ends with the letter "e" are selected to be in the subset.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
SELECT LastName LIKE "Mc*e"
LIST LastName

Example 4: A subset of the data contained in the Oswego data table is selected. In this case, only records where the patient is ill are selected to be in the subset.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
SELECT Ill = (+)
LIST Name Age Ill

Example 5: A subset of the data contained in the Oswego data table is selected. In this case, all records except those that do do not have a value for the TimeSupper variable (that is, the field was left blank during data entry) will be selected to be in the subset.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
SELECT NOT TimeSupper = (.)
LIST TimeSupper DateOnset Sex Ill

Example 6: A subset of the data contained in the Patient data table is selected. Two SELECT commands have a cumulative effect so that the two expressions are equivalent to SELECT (Age > 30) AND (Sex = "M"). That is, only records where the age is greater than 30 and the sex is male will be selected.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
SELECT Age > 30
SELECT Sex = "M"
LIST Age Sex

Example 7: A subset of the data contained in the Patient data table is selected. Two SELECT commands have a cumulative effect so that the two expressions are equivalent to SELECT (Age > 30) AND (Age < 30). That is, only records where the age is greater than 30 and the age is less than 20 are selected. Because these two conditions are mutually exclusive, the LIST command produces no output. A CANCEL SELECT command may be issued to clear the current selection criteria.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
SELECT Age > 30
SELECT Age < 20
LIST Age Sex


Set Command (Analysis Reference)

SET

Analysis Command

Command Generator

Description

This command provides various options that affect the performance and output of data in Analysis. These settings are utilized whenever the Analysis program is used.

Syntax

SET [<parameter> = <value>]

  • The <parameter> = <value> represents various elements on the form. Any number of elements may be utilized in a single SET statement.

Parameter | Values | Response
(-) | "<Text>" | In Boolean variables, NO will be represented as <Text>.
(.) | "<Text>" | Variables with missing values will be represented as <Text>.
(+) | "<Text>" | In Boolean variables, YES will be represented as <Text>.
YN | "<Text1>" | Sets displayed text for Yes, No and Missing to Text1, Text2 and Text3 respectively.
 | "<Text2>" |
 | "<Text3>" |
PROCESS | NORMAL | Deleted records are not included.
 | DELETED | Only deleted records are included.
 | BOTH | Deleted records are included.
DELETED | YES or (+) | Deleted records are included.
 | NO or (-) | Deleted records are not included.
 | ONLY | Only deleted records are included.
FREQGRAPH | (+) or ON | Show frequency graph next to the table.
 | (-) or OFF | Do not include FREQ graph.
HYPERLINKS | (+) or ON | Hyperlinks are included in the output.
 | (-) or OFF | Hyperlinks excluded.
MISSING | (+) or ON | Include missing values for analysis.
 | (-) or OFF | Do not include missing values for analysis.
IGNORE | (+) or ON | Do not include missing values for analysis.
 | (-) or OFF | Include missing values for analysis.
SELECT | (+) or ON | Display selection criteria.
 | (-) or OFF | Do not display selection criteria.
SHOWPROMPTS | (+) or ON | Displays the full prompt for variable name.
 | (-) or OFF | Displays Variable name only.
STATISTICS | NONE | No statistics are displayed.
 | MINIMAL |
 | INTERMEDIATE |
 | COMPLETE |
PERCENTS | (+) or ON | Percentages are included in TABLES output.
 | (-) or OFF | Percentages are excluded.

Program Specific Feature

In the command generator, selecting Save All generates a SET command, which contains all current settings. Selecting Save Only or OK generates a SET command, which contains only changed settings. To force a SET command to be generated for a current value of a setting, change its value and then change it back again.

Example

SET MISSING=(-) STATISTICS=COMPLETE


Sort Command (Analysis Reference)

SORT

Analysis Command

Command Generator

Description

This command allows a sequence to be specified for records to appear in LIST, GRAPH, and WRITE commands. If no variable names are specified after the SORT command, the current sort is cleared, and subsequent output of records will be in the order of the original data table. If one variable name is given, records are sorted using that variable as the "key". If more than one variable is specified, records will be put in order by the first variable, then within a group with the same value of variable 1, the ordering will be by variable 2, etc.

Syntax

SORT <variable> {DESCENDING}

  • <variable> represents the variable to be sorted by.

  • DESCENDING indicates that the sort order is descending; if not specified, ascending order will be used.

Comments

The parameter DESCENDING must be placed next to the variable to be sorted in descending order. Should several variables be sorted in descending order, one DESCENDING should be included for each of them.

Examples

Example 1: The data is sorted by Age in ascending order.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
SORT Age
LIST Age Sex Ill GRIDTABLE

Example 2: The data is sorted by Age in descending order. Where two or more records have the same value for Age, the records are sorted by Ill in descending order. Where two or more records have the same value for Ill, the records are sorted by Sex in descending order.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
SORT Age DESCENDING Ill DESCENDING Sex DESCENDING
LIST Age Sex Ill GRIDTABLE


Summarize Command (Analysis Reference)

SUMMARIZE

Analysis Command

Command Generator

How to Use the SUMMARIZE Command

Description

This command creates a new table containing summary statistics for the current dataset or its strata.

Syntax

SUMMARIZE varname::aggregate(variable) [varname::aggregate(variable) ...] TO tablename STRATAVAR=variable list {WEIGHTVAR=variable}

  • Available aggregates are COUNT, MIN, MAX, SUM, FIRST, LAST, AVG, VARiance and STandardDEViation (Sum, Avg, Var and StDev available only for numeric fields). COUNT may be used without a variable in parenthesis to indicate that a count of the number of records in the table or strata is desired, or with a variable in parenthesis to indicate that the number of records in the table or strata with non-missing values of the specified group is desired. FIRST and LAST are based on the current sort order.

Comments

Analysis creates a new table or appends to an existing table (tablename) containing variables (varname) which represent aggregates of variables in the current data source (aggregate(variable)). The aggregates are computed for each group of records, determined by the STRATAVARs, which are also included in the table. Available aggregates are COUNT, MIN, MAX, SUM, AVG, VARiance and STandardDEViation (Sum, Avg, Var and StDev available only for numeric fields). COUNT may be used without a variable in parenthesis to indicate that a count of the number of records in the group is desired, or with a variable in parenthesis to indicate that the number of records in the group with non-missing values of the specified group is desired.

This command solves some recurring problems for programmers. One such problem is computing percents; it is difficult to get a denominator. Another problem is determining the earliest or latest date in a list of relevant dates, or the highest or lowest of a series of measurements. Many of these problems can be solved with the OUTTABLE from a TABLES or FREQ command, or with self-joins, but this provides a straightforward way of achieving these results.

Summarize can select the first or last visit or report date (maximum/minimum of the date) for each patient (stratify by patient ID).

Note: Multi-line (memo) fields are not permitted.

Example

READ viewPatient
RELATE viewVisit PatientID::PatientID
SUMMARIZE FirstVisit::MIN(VisitDate), LastVisit::MAX(VisitDate), NVisit::COUNT() TO PatSummSTRATAVAR=PatientID
READ viewPatient
RELATE PatSummPatientID::PatientID
DEFINE Flag90
ASSIGN Flag90 = "OK"
IF DAYS(LastVisit, SYSTEMDATE) > 90 THEN
ASSIGN Flag90="Over 90 Days"
END
DEFINE FlagAvg
ASSIGN FlagAvg = "OK"
IF DAYS(LastVisit, SYSTEMDATE) > DAYS(FirstVisit, LastVisit) / NVisit THEN
ASSIGN FlagAvg = "Over Avg Interval"
END
LIST PatientIDPatientLNamePatientFName Flag90 FlagAvg


Tables Command (Analysis Reference)

TABLES

Analysis Command

Command Generator

How to Use the TABLES Command

Complex Sample Information

Description

This command does a cross-tabulation of specified variables in 2 or 3 dimensions. Values of the first variable appear across the top of the table, and those of the second variable appear in the left margin of the table unique values of additional variables are represented as strata. Normally, cells contain counts of records matching the values in the corresponding marginal labels. If a WEIGHTVAR parameter is given, the cells represent sums of the weight variable, thus TABLES DISEASE COUNTY WEIGHTVAR=COUNT gives the same results as SUMTABLES COUNT DISEASE COUNTY in Epi6.

Syntax

TABLES <exposure> <outcome> {STRATAVAR=[<variable(s)>]}
 {WEIGHTVAR=<variable>} {PSUVAR=<variable>} {OUTTABLE=<table>} {COLUMNSIZE=<number>}
 {NOWRAP}

  • <exposure> represents the variable in the database to be considered the risk factor (or * for all variables)

  • <outcome> represents the variable in the database considered disease of consequence (or * for all variables).

  • <variable> represents the variable in the database.

  • <table> represents a valid table name to be used to store output.

  • <number> represents a number from 0 to 99 representing the number of columns to be displayed before splitting a table (default=6). If zero, all specified columns are displayed without splitting the table.

  • NOWRAP prevents line breaks from being inserted in to the text fields, so that columns are as wide as the longest line in the field.

Comments

For every possible combination of values of the strata variables, a separate table (stratum) for variable 1 by variable 2 is produced. TABLES BAKEDHAM ILL STRATAVAR=SEX produces a table of BAKEDHAM by ILL for each value of sex--one for M and one for F. TABLES BAKEDHAM ILL STRATAVAR=SEX RACE produces a separate table of BAKEDHAM by ILL for each combination of SEX and RACE--female/black, female/white, male/black, male/white, etc.

If * is given instead of a variable name, each variable in the dataset is substituted for * in turn. To analyze each variable by illness status, use the command TABLES * ILL which produces tables of SEX by ILL, AGE by ILL, etc.

It is important to consider carefully before using * or requesting multidimensional tables if the dataset is large (1000s of records), since it may produce more tables than are needed in terms of time, paper, and other costs. Press Ctrl-Break from the keyboard to exit from a lengthy procedure.

The SET command can be used to determine the format of the tables by including percentage values in the tables (SET PERCENTS = ON) or relative size diagrams (SET FREQGRAPH = ON).

For 2x2 tables, the command produces odds ratios and risk ratios. For these values to have their accepted epidemiological meanings, the value representing presence of the of the exposure and outcome conditions must appear in the first row and column of the table. Epi Info yes/no variables are automatically sorted properly. The STATISTICS setting controls the detail to which the statistics are reported. For tables other than 2x2, Chi-square statistics are computed. If an expected value is < 5, the message Chi-square not valid appears. The mid-p and Fisher exact, in any case are preferred, especially in this case.

Multiline (memo) variables cannot be used in Tables. 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 table.

Examples

Example 1: A 2x2 table is generated showing coronary heart disease (CHD) by Catecholamine Level (CAT).

READ 'Sample.mdb':viewEvansCounty
SET STATISTICS=COMPLETE
TABLES CAT CHD

Example 2: A 2x2 table is generated showing coronary heart disease (CHD) by Catecholamine Level (CAT), stratified by an age group variable of type yes/no.

READ 'Sample.mdb':viewEvansCounty
SET STATISTICS=COMPLETE
TABLES CAT CHD STRATAVAR=AgeG1

Example 3: A 2x2 table is generated for every variable in the database using Ill as the outcome variable for table.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
TABLES * Ill

Example 4: A 2x2 table is generated and saved to a separate table in the Sample database using the OUTTABLE parameter.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
TABLES Vanilla Ill OUTTABLE = T1
READ T1
LIST * GRIDTABLE

Example 5: A 2x2 table is generated showing obesity and disease outcome. The analysis is weighted by the value contained in the COUNT column.

READ 'C:\Epi_Info\Sample.mdb':viewLasum
TABLES OB OUTCOME WEIGHTVAR=COUNT

Example 6: A complex sample table is generated using a stratified cluster survey.

READ 'C:\Epi_Info\Sample.mdb':viewEpi10
TABLES Prenatal VAC STRATAVAR=Location WEIGHTVAR=POPW PSUVAR=Cluster


TypeOut Command (Analysis Reference)

TYPEOUT

Analysis Command

Command Generator

Description

This command inserts text, either a string or the contents of a file, into the output. Typical uses might include comments or boilerplate.

Syntax

TYPEOUT "text" ([<font property>]) {TEXTFONT <color> <size>}

TYPEOUT <file name>

  • The <text> represents the text to be displayed.

  • The <file name> represents a file whose contents will be displayed as text. It must be placed in single quotes if the file name contains spaces.

  • The <font property> represents the properties Underline, Bold, or Italic separated by commas.

  • The <color> represents Aqua, Lime, Red, Black, Silver, Maroon, Blue, Navy, Teal, Fuchsia, Olive, White, Grey, Purple, Yellow, or Green. Color can also be represented by hexadecimal digits ###### with pairs of digits representing the amount of red, green, and blue on a scale of 0-255.

Comments

TYPEOUT with a text string is similar to TITLE except that TYPEOUT places the text once when the command is encountered, while HEADER appears at the top of each segment of output until it is cleared.

If no text in quotation marks follows the TYPEOUT command, TYPEOUT sends the contents of the file specified to the current output. This output can be in text or HTML.

When displaying a fragment of HTML within Analysis HTML output, it must have a <body> tag and only the text bounded by the tag is included in the output.

Examples

Example 1: The contents of 'Oswego.htm' are copied into the Analysis output window.

TYPEOUT 'Oswego.htm'

Example 2: Displays the word "Confidential" underlined and in bold.

TYPEOUT "CONFIDENTIAL" (BOLD, UNDERLINE)


Undefine Command (Analysis Reference)

UNDEFINE

Analysis Command

Command Generator

Description

This command removes a defined variable and any assigned values from the system.

Syntax

UNDEFINE <variable>

  • The <variable> represents a defined variable.

Program Specific Feature

Permanent variables cannot be undefined from the Undefine dialog box. To Undefine a permanent variable, type the syntax into the Program Editor and run the command.

Comments

A variable that already exists in the database cannot be undefined. To remove a database variable from the database use the WRITE command with the EXCEPT modifier.

Example

UNDEFINE NewVar


Undelete Records Command (Analysis Reference)

UNDELETE

Analysis Command

Command Generator

Description

This command will mark logically deleted records as normal.

Syntax

UNDELETE *

UNDELETE expression

Comments

Undelete * or expression causes all logically deleted records in the current selection matching the expression to be set to normal status. This applies only to Epi Info views and may not be used when related tables are in use.

Example

UNDELETEAgeInDays > 5


Write Command (Analysis Reference)

WRITE

Analysis Command

Command Generator

How to Use the WRITE Command

Description

The WRITE command sends records to an output table or file in the specified format. Specifications include, which variables are written, variable order, and the type of file to be written.

Syntax

WRITE <METHOD> {<output type>} {<project>:}table {[<variable(s)>]}

WRITE <METHOD> {<output type>} {<project>:}table * EXCEPT {[<variable(s)>]}

  • The <METHOD> represents either REPLACE or APPEND

  • The <project> represents the path and filename of the output.

  • The <variable(s)> represents one or more variable names.

  • The <output type> represents the following allowable outputs:

Database Type | Specifier | Element
Jet | "Access 97" "Access 2000" "Epi 2000" | <path:<table>
dBase III | "dBase III" | <path>
dBase IV | "dBase IV" | <path>
dBase 5.0 | "dBase 5.0" | <path>
Paradox 3.x | "Paradox 3.x" | <path>
Paradox 4.x | "Paradox 4.x" | <path>
FoxPro 2.0 | "FoxPro 2.0" | <path>
FoxPro 2.5 | "FoxPro 2.5" | <path>
FoxPro 2.6 | "FoxPro 2.6" | <path>
Excel 3.0 | "Excel 3.0" | <path>
Excel 4.0 | "Excel 4.0" | <path>
Epi Info 6 | "Epi6" | <path>
Text (Delimited) | "Text" | <path>

Comments

Records deleted in Enter or selected in Analysis are handled as in other Analysis commands. Defined variables may be written, allowing the creation of a new Epi Info file that makes the changes permanent. Global and permanent variables will not be written unless explicitly specified.

To write only selected variables, the word EXCEPT may be inserted to indicate all variables except those following EXCEPT.

If the output file specified does not exist, the WRITE command will attempt to create it.

Either APPEND or REPLACE must be specified to indicate that an existing file/table by the same name will be erased or records will be appended to the existing file/table. If some, but not all, of the fields being written match those in an existing file during an APPEND, the unmatched fields are added to the output table.

For Epi 6 REC or Access/EpiInfo table outputs, if there are no records, the WRITE command creates a table/file with variable information but no data.

Examples

Example 1: The Oswego data table (75 records) from Sample.mdb is written to a database called SampleOutput. The destination table name is called Oswego1. The second READ command reads the newly-created data table.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
WRITE REPLACE "Epi 2000" 'C:\Epi_Info\SampleOutput.mdb':Oswego1 *
READ 'C:\Epi_Info\SampleOutput.mdb':Oswego1

Example 2: The Oswego data table (75 records) from Sample.mdb is written to a database called SampleOutput three times. The APPEND method ensures that each WRITE command appends the entire data set several times. After all three WRITE commands have been run, the Oswego2 table inside SampleOutput.mdb contains 225 records.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
WRITE APPEND "Epi 2000" 'C:\Epi_Info\SampleOutput.mdb':Oswego2 *
WRITE APPEND "Epi 2000" 'C:\Epi_Info\SampleOutput.mdb':Oswego2 *
WRITE APPEND "Epi 2000" 'C:\Epi_Info\SampleOutput.mdb':Oswego2 *
READ 'C:\Epi_Info\SampleOutput.mdb':Oswego2

Example 3: This example shows how to make defined variables into permanent database variables. The Oswego data table from Sample.mdb is written to a database called SampleOutput. Notice that the defined variable IncubationTime does not exist in Sample.mdb, but after the WRITE command has executed, it is now a part of the newly-created data table Oswego3.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE IncubationTime
ASSIGN IncubationTime = HOURS(TimeSupper, DateOnset)
LIST IncubationTime
WRITE REPLACE "Epi 2000" 'C:\Epi_Info\SampleOutput.mdb':Oswego3 *
READ 'C:\Epi_Info\SampleOutput.mdb':Oswego3
LIST * GRIDTABLE

Example 4: The records from the Oswego View in the Sample database are exported to an Excel spreadsheet. By specifying age, sex, and incubation time in the WRITE command, only those variables will be exported. This example may not work if Microsoft Excel is not installed on the computer.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE IncubationTime
ASSIGN IncubationTime = HOURS(TimeSupper, DateOnset)
WRITE REPLACE "Excel 4.0" 'C:\Epi_Info\Oswego.xls' Age Sex IncubationTime

READ "Excel 4.0" 'C:\Epi_Info\Oswego.xls'
FILESPEC HDR="YES" END

LIST * GRIDTABLE

Example 5: The records from the Oswego View in the Sample database are exported to an Excel spreadsheet. By specifying age, sex, and incubation time in the WRITE command with the ALL EXCEPT modifier, all variables except those listed will be exported. This example may not work if Microsoft Excel is not installed on the computer.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE IncubationTime
ASSIGN IncubationTime = HOURS(TimeSupper, DateOnset)
WRITE REPLACE "Excel 4.0" 'C:\Epi_Info\Oswego.xls' * EXCEPT Age Sex IncubationTime

READ "Excel 4.0" 'C:\Epi_Info\Oswego.xls'
FILESPEC HDR="YES" END

LIST * GRIDTABLE

Example 6: The records from the Oswego View in the Sample database are exported to a text file.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
WRITE REPLACE "Text" 'C:\Epi_Info\Oswego.txt' *
READ "Text" 'C:\Epi_Info\Oswego.txt'


Assign Command (Menu Reference)

ASSIGN (with Expressions)

Menu Command

Description

This command assigns the value of a numeric or text expression to a variable.

Syntax

ASSIGN <variable> = <expression>

  • The <variable> represents a variable defined the EpiInfo.ini file.

  • The <expression> represents any valid arithmetic or string expression.

Comments

A variable with the same name has a higher preference in the [Menu Variables] section than in [Variables] section.

If a variable does not exist in permanent [Menu Variables], then the value is taken from [Variables]. Following this rule, ASSIGN looks for the variable name in [Menu Variables] first, then [Variables], and when found, stores the value for the variable in the that section.

This command assigns the value of an expression to a variable. The variable may be defined using the DEFINE command from the DOS command line.

In contrast to Analysis and Check Code, the ASSIGN command in the Menu also creates variables if the don’t exist. Those created in the Startup block are Permanent and others are Standard. There are no Global variables.

Examples

Example 1: The value of ThisValue is decremented by 1.

ASSIGN ThisValue = 5
ASSIGN ThisValue = @@ThisValue – 1
DIALOG @@ThisValue

Example 2: A variable called x is created and then assigned the value of 9. The line containing the DIALOG command shows how to reference the value of x in a dialog box's prompt.

DEFINE x
ASSIGN x = 9
DIALOG x = @@x

Example 3: The ASSIGN command is used to generate a default value for the variable My_PathFile.

Install
BEGIN
ASSIGN My_PathFile = "none"
GETPATH My_PathFile "Select the path in which you installed MyApp"
DIALOG "The current project has been set to @@My_PathFile . "
END


Browser Command (Menu Reference)

BROWSER

Menu Command

Description

This command loads the browser window in the menu form with a specified browser-compatible file.

Syntax

BROWSER "<path and name>", <left>, <top>, <width>, <height> {, exit button}

  • The <path and name> represents any file that can be loaded into Microsoft Internet Explorer, including HTM, XML, JPG, GIF, CHM, and ASP files.

  • The <left>, <top>, <width>, <height> represents optional numbers from 0 to 100 specifying percentages of screen width (left and width) or screen height (top and height). If width or height is omitted and the corresponding Left or Top is less than 40, then the browser is centered in that dimension, otherwise the height or width is adjusted to reach the right side or bottom of the menu. Hence, BROWSERSIZE 5, 5 is equivalent to BROWSERSIZE 5, 5, 90, 90 putting a 5% border around the centered browser, but BROWSERSIZE 50, 50, makes the browser fill the lower right quarter of the menu.

  • The {, exit button} represents the option to specify an Exit button.

Comments

The BROWSER command can be used in a command block, or in the menu definition part of the .mnu file. The MNU file can be set up to change the HTML or other file displayed in the browser by clicking on a menuitem or a command button that runs a command block containing the BROWSER command. If no BROWSERSIZE command is given, the BROWSER occupies the entire menu. Command buttons, if any, are displayed on top of the browser. When using the BROWSER command, always set the picture to full screen.

Examples

Example 1: Displays the guided tour.

BROWSER GUIDED.HTM

Example 2: Displays the guided tour in the language chosen, assuming that a translation is installed.

BROWSER "@@InstallDir\@@language\help\GUIDED.HTM"

Example 3: Displays the Home.htm file contained inside of the current working directory.

StartUp
Begin
BROWSER "@@WorkDir \Home.htm", 20, 30, 60, 55, ExitButton
End


Browsersize Command (Menu Reference)

BROWSERSIZE

Menu Command

Description

This command sets the size and location of the browser activated by the BROWSER command. If no BROWSERSIZE command is given, the browser occupies the entire menu. Command buttons are displayed on top of the browser.

Syntax

BROWSERSIZE "<path and name>", <left>, <top>, <width>, <height> {, exit button}

  • The <path and name> represents any file that can be loaded into Microsoft Internet Explorer, including HTM, XML, JPG, GIF, CHM, and ASP files.

  • The <left>, <top>, <width>, <height> represents optional numbers from 0 to 100 specifying percentages of the screen width (left and width) or screen height (top and height). If width or height is omitted and the corresponding Left or Top is less than 40, then the browser is centered in that dimension, otherwise the height or width is adjusted to reach the right side or bottom of the menu. Hence, BROWSERSIZE 5, 5 is equivalent to BROWSERSIZE 5, 5, 90, 90 putting a 5% border around the centered browser, but BROWSERSIZE 50, 50, makes the browser fill the lower right quarter of the menu.

  • The {, exit button} represents the option to specify an Exit button

Comments

The BROWSERSIZE command can be used in a command block, or in the menu definition part of the .mnu file. After it is run, the image is sized and located as specified until there is an exit from the current menu.

Example

Displays the browser in the upper left corner of the menu.

BROWSERSIZE 0, 0, 50, 50

BROWSERSIZE 0, 0, 50, 50, ExitButton


Button Command (Menu Reference)

BUTTON

Menu Command

Description

This command creates a button on the screen with the caption ItemText and the locations given as percentages of screen width and height. When the button is left clicked with the mouse, the commands in the CommandBlock named are executed. If a tool tip is specified, it appears when the mouse hovers over the button for several seconds.

Syntax

BUTTON "<caption>", procedure name, horizontal position%, vertical position%, horizontal size%, vertical size%, "<tooltip text>"

  • The <caption> is the text displayed on the button.

  • The procedure name is the name for the procedure to be executed.

  • The horizontal position% is a number from 1 to 99 which represents the distance from the left side of the window in percentage points.

  • The vertical position% is a number from 1 to 99 which represents the distance from the top of the window in percentage points.

  • The horizontal size% is a number from 1 to 99 which represents the horizontal size as a percentage of screen size.

  • The vertical size% is number from 1 to 99 which represents the vertical size as a percentage of screen size.

  • The <tooltip text> is text that displays when the cursor hovers the button.

Comments

Horizontal Size and Vertical Size are both expressed in percentage of screen height or width. If both are omitted, the button size is chosen automatically. If only one is included, it is taken to be the Horizontal Size.

Example

Commas must be present between all size settings.

BUTTON "TEST", Test, 50,50,20,20, "This is a large button in the middle of the screen"


Call Command (Menu Reference)

CALL

Menu Command

Description

This command redirects to another command block and returns after it has been executed.

Syntax

CALL <variable>

  • The <variable> represents a variable used to identify a command block name.

Example

StartUp
Begin
CALL ManualNewRelease
End


Command (Menu Reference)

COMMAND

Menu Command

Description

This command calls the command blocks called from the MENUITEM and BUTTON commands.

Syntax

<block name>
Begin
Command
Command
End

  • The <block name> represents a name containing only text characters and/or digits. Special characters such as (,#, $, &, and blank spaces are not allowed as part of the block name).

  • The Begin/End represents the delimiters for the command block.

Program Specific Feature

The main menu creates a batch file to execute DOS commands; therefore, they are executed at a single time. Batch files containing both windows and DOS commands are not allowed.

Comments

Commands in Command Blocks are executed when a menuitem or button is chosen that refers to the block. If the Begin and End statements are missing, results are unpredictable.

Example

MAKEVIEW
Begin
EXECUTE MakeView.EXE
End


Comments (*) (Menu Reference)

Comments (*)

Menu Command

Description

This asterisk allows for the entering of user-defined comments identifying tasks or defining variable names for the programmer.

Syntax

* <text>

  • The <text> represents any comment.

Comments

The * character must be placed in the first column of a line to be recognized as comment mark. For comments longer than one line, the * character should be added for each new line. Use comments to disable commands.


Define Command (Menu Reference)

DEFINE

Menu Command

Description

Creates a variable.

Syntax

DEFINE <variable> [scope]

  • The <variable> represents the name of the variable to be created.

  • The [scope] represents a Permanent or Standard defined variable type.

Comments

The default scope is Standard. Variables are saved as a new variable in Menu Variables section, rather than the Variables section. Specifying the section name with no keyword or keyword Standard places the variable in the [Menu Variables] section while specifying with Permanent places it in the [Variables] section.

DEFINE creates a Permanent variable. DEFINE inserts a variable with an empty value in the specified section. If a variable contains a value, DEFINE reset the value to empty. For example, if VAR1= “C:\”, DEFINE Var1 will reset Var1=..

Example

DEFINE Variable1

DEFINE Variable2 PERMANENT


Dialog Command (Menu Reference)

DIALOG

Menu Command

Description

The DIALOG command provides interaction from within a program. Dialogs can display information, ask for and receive input, and offer lists for making choices.

Syntax

DIALOG "<text prompt>" {,TITLETEXT="<title>"}

DIALOG "<text prompt>", <variable>, FORMAT="<FormatPattern>" , {TITLETEXT="<Title>"}

DIALOG "<text prompt>", <variable>, LIST="<value 1>"; "<value 2>"; "<value 3>"; … ;"<value n>" {;TITLETEXT="<title>"}

DIALOG "<text prompt>", <variable>, {BUTTONS="value 1";"value 2";...} {;TITLETEXT="<title>"}

DIALOG "<text prompt>", <variable>, DATEFORMAT="<format pattern>", {TITLETEXT="<title>"}

  • The <text prompt> is the text displayed in the message.

  • The <variable> is the variable where the value entered is stored.

  • The <format pattern> is a text string, such as "####" or ##.### that indicates the type of data to be entered. # indicates a digit.

  • The <title text> is the text used as the caption for the dialog window. If one doesn't include TitleText in the Dialog command, a blank title bar displays on the dialog box.

  • The <DATEFORMAT> is a text string, such as MM-DD-YYYY or hh:mm:ss that indicates the type of data or time to be entered.

Comments

The CANCEL button always displays on the Dialog box when the command line contains either BUTTONS and/or a variable that accepts a value from the Dialog box. If the CANCEL button is clicked, the Dialog box closes and does not run the remaining commands in the command block, a very handy way to escape from a sequence commands.

If there are no BUTTONS and input variable(s)), the Dialog box simply displays a message with an OK button: Dialog "Show OK button only", without "CANCEL."

DATEFORMAT

! or 0 -- Long Date

- or 1 -- Short Date

* or 2 -- Time

Other date formats can be specified. The date formats are the same as in MakeView and Analysis dialogs for date, except DATEFORMAT 0, 1, or 2 is the same as !, -, or *, and the format pattern must not be empty.

EXAMPLES

DEFINE var2 DATEFORMAT ("Enter a date.")

DIALOG "Enter Date" var2 DATEFORMAT TITLETEXT="date"

LIST var2 GRIDTABLE

DIALOG "Enter Value ", var1

DIALOG "Enter Value ", var1, TITLETEXT="Dialog 1"

DIALOG "Please type in a start date for the report in the format MM-DD-YYYY, or hit <Enter> for January 1 of the current year.", start_date,FORMAT= ##-##-#### TITLETEXT="Start date"

DIALOG "Please enter a person's age group", Age, LIST=10;15;20;TITLETEXT=AGE

Dialog "Get a report", Report

Dialog "Change settings", btnSubmit, Buttons="OK";"Cancel";"Apply"; TitleText="County Location"

Dialog "Please enter date with specified format", EnterDate, DATEFORMAT="MM-DD-YYYY", TITLETEXT="Date Entry"

DATEFORMAT="MM-DD-YYYY"

Result is US=09/09/2005; European={09/09/2005}; ISO=|2005/09/09|

DATEFORMAT="MM-DD-YYYY hh:mm:ss"

Result is 09/09/2005 09:38:50

DATEFORMAT="YYYY/MM/DD"

Result is 2005/9/9

Date formats with long dates or short dates are for display only. The value does not affect the result in the .ini file. MM-DD-YYYY and DD-MM-YYYY and YYYY/MM/DD produce the same results. M represents Month where m represents minutes.


Execute Command (Menu Reference)

EXECUTE (LINKTO or ACTIVATE)

Menu Command

Description

This command executes a Windows or DOS program - either one explicitly named in the command or one designated within the Windows registry as appropriate for a document with the file extension that is named. This provides a mechanism for bringing up whatever word processor or browser is the default on a computer without first knowing its name. The EXECUTE command now accepts a series of paths, separated by semicolons, as in:

EXECUTE c:\epi_info\myfile.exe;d:\myfile.exe

If the first is not found, the others are tried in succession. The alternative syntax LinkTo and Activate is available only for the menu.

Syntax

EXECUTE <filename>

EXECUTE <filename> '<command-line parameters>'

  • The <filename> represents the path and program name for .exe (filename for registered Windows programs) and .com (filename for MS-DOS binary executables) files.

  • The <command-line parameters> represent any additional command-line arguments that the program can accept.

Comments

If the name of an executable program, such as ENTER.EXE or MYBATCH.BAT or even WEBSITE.COM is given, the program is run in a separate window. When the program terminates, the window is closes.

If the name given is not a program, but a file with an extension registered by Windows for displaying the document, the correct program to display the file is activated. For example, WRITEUP.DOC might cause Microsoft Word© to run and load the file on one computer. On another machine, however, .DOC might correspond to Corel WordPerfect©. Usually .txt opens NotePad.exe© or WordPad.exe©, and image files appear either in a browser or in a graphics program installed on the local computer. An .htm file opens in the default browser.

In this form of EXECUTE, the location or even the name of the program that will run, does not have to be specified. These details are stored in the Windows registry for common file extensions. The same concept applies to Internet addresses or Universal Resource Locator (URLs). A URL that ends in .htm opens the default browser, connects to the Internet (if possible), and goes directly to the site indicated. With this device and an Internet connection, a menu with buttons for websites in neighboring countries or states or favorite search engines, can be created, making contact with information sources more efficient.

Examples

Example 1: A text file on the C drive is opened. The operating system will select an a1pplication with which to open the file.

EXECUTE C:\logfile.txt

Example 2: The Analysis module is opened and told to automatically run the code contained inside of MyStats.pgm.

EXECUTE Analysis.exe 'c:\Epi_Info\MyStats.pgm'

Example 3: The Enter module is loaded from the current menu directory. The command-line parameter is used to load the Oswego View from the Sample database.

EXECUTE Enter.exe @@MenuDir \Sample.mdb':Oswego

Example 4: The URL http://www.cdc.gov/epiinfo is opened in a web browser.

EXECUTE http://www.cdc.gov/epiinfo


FileDialog Command (Menu Reference)

FILEDIALOG

Menu Command

Description

This command provides a file dialog box to the standard Open and Save dialog boxes found in Microsoft Office applications. Use these dialog boxes to allow the user to specify files and folders that Epi Info should use.

Syntax

FILEDIALOG <variablename> {,"filter specification"}

  • The <filter specification> represents the format of the filter specification.

  • The <windowtitle> represents the title that appears at the top of a form. If none is supplied, "Choose Directory" is assumed.

Comments

If no filter is specified, the following is assumed:

"All Files(*.*)|*.*|EpiInfo/Access(*.MDB)|*.MDB"

The format of the filter specification set by Visual Basic and further details can be obtained from a Visual Basic manual. Additional entries separated by the same vertical line (pipe) command "|" can be added. The last one is taken as the default filter. Hence in the specification above, the user is first presented with a choice of "EpiInfo/Access(*.mdb)" databases, answering the description .MDB. Scrolling down in the list allows changing the choice to see, "All Files(.*)", those matching the designation.

When Open is selected, the file choice is placed in the specified variable. The file is not actually opened, but a subsequent menu command such as EXECUTE NOTEPAD @@ MyFilename can be used to open the file if it is, for example, a text file and the variable specified was "MyFilename".

The FILEDIALOG command can now be given the name of an initialization directory so that it comes up in a desired location. In the following menu block using FILEDIALOG, an Initial Directory is specified as the third parameter:

Test

Begin

Filedialogdatafile, "All Files(*.*)|*.*|Select your Data file|*.DAT|", "\epi_info\births\data\"

Dialog "@@datafile"

End

Test

Begin

Filedialogdatafile, "All Files(*.*)|*.*|Select your Data file|*.DAT|", "\epi_info\births\data\"

Dialog "@@datafile"

End

(The DIALOG is just to test the result.)

The first line has two entries in the "filter" string for the dialog, so there is the option of having All files displayed. The FILEDIALOG shows all files in the "\epi_info\births\data\" directory with the '.dat' extension. All Files can be selected instead in the listbox to show files with any extension. The Initial Directory parameter should not contain a file name- just the directory. If the subdirectories "births" and "data" do not exist, the dialog defaults to \Epi_Info.

Example

FileDialog
Begin
* FileDialog FileName, "All Files(*.*)|*.*|EpiInfo/Access(*.mdb)|*.mdb"
FileDialog FileName
* Dialog @@FileName
End
* Pops up a dialog showing the value chosen by the user.


Getpath Command (Menu Reference)

GETPATH

Menu Command

Description

This command displays a dialog allowing for the selection of a path. The path chosen becomes the value of the specified variable.

Syntax

GETPATH <variable> {"<windowtitle>"}

  • The <variable> represents a variable in a data file.

  • The <windowtitle> represents the title that appears at the top of a form. If none is supplied, Choose Directory is assumed.

Comments

Allows a path to be browsed and assigned the result of a variable. For example, if the path chosen is “c:\Epi_Info\" then GETPATH stores “c:\Epi_Info\” in the variable. GETPATH initially opens the default path to the last result.

Examples

GETPATH NT_PathFile "Please select the file path."

GETPATH Sys_Dispatch "Select a source folder for the dispatch data."


Help Command (Menu Reference)

HELP

Menu Command

Description

This command displays an .HTM or .CHM document.

Syntax

HELP <html filename{#block name}>

HELP <chm filename> {,<html filename>}

HELP <html filename> {,<chm filename>}

Comments

HTMLFileName must end in .htm, .html or .chm. If an optional BlockName is given, the browser searches for named anchors or bookmarks in the html file and positions the anchor at the top of the screen. An anchor in html can be created by using a tag like <a name="StartPoint">.

If no directory path is given, the HELP command looks first in the HELP directory under the currently designated language directory (e.g., .\SPANISH\HELP). If the file is not found, it looks in the default HELP directory, .\ENGLISH\HELP. That failing, it looks in the currently logged directory. This allows translated help files to be accessed automatically as long as they retain the name (and block names) of the corresponding English versions. Filenames including spaces must be enclosed in single quotes. Anchors containing spaces must be enclosed in double quotes. In addition, HELP can take two parameters, one for a chm file, and the other for an html file. If the first file is not found, the second file is opened.

Examples

HELP c:\News.htm#abc

Help Oswego.chm, OSWEGO\INDEX.HTM


If Then Else Command (Menu Reference)

IF THEN ELSE

Menu Command

Description

This command defines conditions and one or more consequences which result when the conditions are met. An alternative consequence can be given after the ELSE statement, to be realized if the first set of conditions is not true.

Syntax

IF <expression> THEN
[command(s)]
ENDIF

IF <expression> THEN
[command(s)]
ELSE
[command(s)]
ENDIF

  • The <expression> represents a condition that determines whether or not subsequent commands will be run. If the condition evaluates to true, the commands inside of the IF block will be run. If the condition evaluates to false, the commands inside of the ELSE block will be run instead. If no ELSE exists and the condition is false, then no commands inside of the IF block are run.

  • The [command(s)] represents at least one valid menu command.

  • The ELSE statement is optional and will run any code contained inside of it when the <expression> evaluates to false.

  • Menu uses ENDIF to close the IF structure block.

Comments

In contrast to IF statements in Analysis and MakeView, IF statements can be nested in multiple levels as needed. The command ENDIF is required to close each IF statement. If the IF statement is in the ELSE block, then the IF should be at the next line after the ELSE. The variables in the expression can be written as either @@Number or just Number naturally. The IF statement recognizes both ways. Forgetting to terminate an IF statement with END IF and using END instead (as in Analysis and MakeView) causes serious problems that are hard to detect. If your menu crashes, look for this problem.

The IF evaluation for string comparison is not case sensitive. Analysis logic symbols (+) True, (-) False and (.) Null can be used in IF comparisons. Test for equality between a numeric variable and alphabetic variable, the result is False.

A variable with the same name has higher preference than a [Permanent Variable] section. If a standard variable does not exist, then the value is taken from permanent variables. For variable preferences, see Define, Undefine, Assign, and @@.

Examples

Example 1: Using the IF command for a survey.

DIALOG "Please enter an age", Age
IF Age < 10 THEN
ASSIGN Group = "CHILD"
ELSE
IF Age >= 10 AND Age < 20 THEN
ASSIGN Group = "TEENAGE"
ENDIF
ELSE
IF Age >= 20 THEN
ASSIGN Group = "ADULT"
ENDIF
ENDIF
DIALOG "Please choose the person's sex",Sex,LIST=Male;Female;TITLETEXT=SEX
IF Sex = "Male" THEN
ASSIGN Sex = "MALE"
ELSE
ASSIGN Sex = "FEMALE"
ENDIF
DIALOG "Age=@@Age; Group=@@Group; Sex=@@Sex"

Example 2: Using the IF command for calculation.

DIALOG "Pease enter a person's age group", Age, LIST=10;15;20;TITLETEXT=AGE
IF Age < 15 THEN
DIALOG "Basic calculation: Number1 * (Number1 -Number2) = ?"
DIALOG "Please enter the first number:", Number1
DIALOG "Please enter the second number:", Number2
DIALOG "Please enter your answer:", Answer
IF Answer = Number1 * (Number1 - Number2) THEN
DIALOG "You did very well!"
ELSE
DIALOG "Try Again."
ENDIF
ELSE
DIALOG "Advanced calculation: (Number1 ^ Number2) * 4 >= 36?"
DIALOG "Please enter the first number:", Number1
DIALOG "Please enter the second number:", Number2
DIALOG "Please enter your answer: (True/False)", Answer
IF (@@Number1 ^ @@Number2) * 4 >= 36 THEN
IF Answer = True THEN
DIALOG "You did very well!"
ELSE
DIALOG "Try again."
ENDIF
ELSE
IF Answer = False THEN
DIALOG "You did very well!"
ELSE
DIALOG "Try Again."
ENDIF
ENDIF
ENDIF


Link Command (Menu Reference)

LINK

Menu Command

Description

This command displays a file when the named program and the named window title become active. It docks the display window to the named window program.

Syntax

LINK <program name1> "<window title>", <program name2> "<window title>"

  • The <program name1> represents the name of an executable program.

  • The <window title> represents the title that appears at the top of a particular window within a program.

  • The <program name2> represents the name of an executable program with parameters, or a file with extension, such as .htm, with an associated executable in Windows.

  • The <window title2> represents the title that appears at the top of the main window when ProgramName2 is activated. This should be specified, although in some browsers, the program is able to find the window without this information. If problems are encountered, run the program, then copy the exact text caption from the program window, and specify it for the <windowtitle2>.

Comments

This command is useful in writing educational and tutorial programs, since it provides for presentation of educational material only at the time it is needed. It does not require any characteristics of Program1 except that it has windows with title text permitting identification. It should work with any Windows program.

LINK waits until the named program is active and until a particular window is visible. The named file is displayed, usually in a browser, moving the linked window if necessary and placing the Display File’s program within a rectangle adjacent to the named window. The window being linked to is moved to make the two windows adjacent and side-by-side if possible; otherwise the display window is displayed as a separate frame. The two window captions should be different. When the application window is closed, the display window is also closed, but the LINK remains in effect unless LINKREMOVE is executed. When the linked window is no longer on the screen, the display window is also removed. If the user closes the display window, the equivalent of LINKREMOVE for the linked window is performed, so that the display window does not appear again if the linked window is reactivated.

More than one LINK statement can be executed, in which case the menu checks for all of the linked windows every 250 milliseconds and pops up the correct display window if one of them appears. To remove a link from the collection, use the REMOVE command. If no path is specified for the linked executable, the system looks in the Help directory and then in the Epi_Info installed directory. The caption of the linked page should omit the browser specification. For example, “Demo Link - Microsoft Internet Explorer”, should be specified as “Demo Link” in the command.

WAITFOR and LINK should not be used simultaneously with the same executable file, as they both use the same WAIT procedure.

Examples

Link EPIMAP.exe "Epi Map", HelpMap.htm "How to Use Epi Map"

Link Analysis.exe "Read", HelpRead.htm "Analysis Read Help"


Linkremove Command (Menu Reference)

LINKREMOVE

Menu Command

Description

This command removes the program or file from the linked collection.

Syntax

LINKREMOVE "<window title>" | ALL

  • The "<window title>" | ALL represents the title text that appears at the top of a particular window within a program that will be removed, or Key Word ALL.

  • The <window title> represents the title that appears at the top of a particular window within a program

  • The <program name2> represents the name of an executable program with parameters, or a file with extension, such as .htm, with an associated executable in Windows.

  • The <window title2> represents the title that appears at the top of the main window when ProgramName2 is activated. This should be specified, although in some browsers, the program is able to find the window without this information. If problems are encountered, run the program, then copy the exact text caption from the program window, and specify it for the <windowtitle2>.

Comments

To remove a previous LINK from the LINK collection use the LINKREMOVE command, followed by the linked page’s caption. There is no need to specify the browser name in the caption. For example, if the page’s caption is "Demo Link - Microsoft Internet Explorer", in the command line, the caption will be "Demo Link". To remove all pages from the LINK collection, use LINKREMOVE ALL. After removing a link, displaying the named Window no longer activates the linked program.

Examples

LinkRemove "Analysis Read Help"

LinkRemove ALL


Menu Command (Menu Reference)

MENU

Menu Command

Description

This command loads another menu with the given file name from within a block of commands in a .mnu file.

Syntax

MENU <filename>.MNU {<image>} {<left>, <top>}, {<width>, <height>}

  • The <filename> is the file name to be loaded.

  • The <image> is the image to be used as background for the menu. Epi Info supports .gif, .jpeg, and .bmp images.

  • The <left> is a number from 1 to 99 representing the distance from the left side of the window in percentage points.

  • The <top> is a number from 1 to 99 representing the distance from the top border of the window in percentage points.

  • The <width> is a number from 1 to 99 representing the width of the image desired.

  • The <height> is a number from 1 to 99 representing the distance from the top border of the window in percentage points.

Comments

If the name of an image file is given, the image is loaded on the main form. Left and Top locations can be given to position the upper left corner of the menu on the screen. They are given as percents of screen width and height: 0, 0 is the upper left corner of the screen. Width and Height are also percentages of the screen. If no locations and sizes are given, those of the main menu are used.

Example

This example displays a menu called Surveil, a bitmap background image called RefCamp, and places the menu 5% right and 5% down from the upper left corner of the screen, extending half the screen width and half the screen height so that it occupies one quarter of the screen.

MENU SURVEIL.MNU REFCAMP.BMP 5,5, 50, 50


Menuitem Command (Menu Reference)

MENUITEM

Menu Command

Description

This command is used to create an item in a POPUP menu.

Syntax

MENUITEM "<text>", <block>

  • The <text> represents the text to be displayed.

  • The <block> represents the command block to be executed.

Comments

Every Menu in Epi Info contains two main components. The first part defines the menu items, buttons, and screen text, and the second part defines the command blocks. The example below shows a single pull-down menu definition, designated as a POPUP.

Example

Menu Small
BEGIN
POPUP "&Programs "
BEGIN
MENUITEM "Ma&ke View (Questionnaire)" , MakeView
MENUITEM "&Enter Data", Enter
MENUITEM "&Analyze Data", Analysis
MENUITEM "Epi Ma&p", EpiMap
MENUITEM "&Nutrition", Nutstat
MENUITEM "&Visualize Data", VisualizeData
MENUITEM "E&xit", Exit
END
END


Movebuttons Command (Menu Reference)

MOVEBUTTONS

Menu Command

Description

This command sets the buttons to move and resize mode.

Syntax

MOVEBUTTONS

Comments

When this command is called from a menu item or button, a dialog box of the menu form is opened and the mouse cursor changes to a hand. The dialog box contains Save and Undo buttons. Pressing a command button displays the handles and allows buttons to be moved or resized. New command button positions are stored into the current menu file when Save is selected.

A button’s left, top, width, and height on the form are measured from (0, 0, 0, 0) to (100, 100, 100, 100) in percentage on the menu screen. Width and Height are optional coordinators in the button’s description line. However, after changing the button's size, Width and Height are added into the description lines for the resized button. The original EpiInfo.mnu file is backed up as EpiInfo.mnu, for example, in the same folder to protect the original data. To move buttons located on the Epi Info main menu, select the Edit > Move/Resize Button from the menu or press Shift F2 on the keyboard.

Example

MoveButtons
Begin
MoveButtons
End


OnBrowserExit Command (Menu Reference)

ONBROWSEREXIT

Menu Command

Description

This command refers to a special command block name, works similar to StartUp and ShutDown. The OnBrowserExit block is executed when the Close button is selected from the browser window.

Syntax

ONBROWSEREXIT

Comments

This command block is optional. It executes only if present. The event is performed when closing the browser.

Example

OnBrowserExit
Begin
Dialog "Goodbye"
End
OnBrowserExit
Begin
* Do the event when closing the browser
End


Picture Command (Menu Reference)

PICTURE

Menu Command

Description

This command loads the specified image, but does not store the image name between sessions in the INI file.

Syntax

PICTURE "<image>" {<left>. <top>, <width>, <height>}

  • The <image> represents the image to be displayed. Epi Info accepts .bmp, .gif, and .jpg images. If no path is included, the program looks first in the current working directory, then in the installed directory. If no image or OFF is specified, the current image is removed.

  • The <left>, <top>, <width>, <height> represents optional numbers from 0 to 100 specifying percentages of screen width (left and width) or screen height (top and height). If omitted, the defaults are 0,0,100,100, or full form. If width or height is omitted and the corresponding Left or Top is less than 40, then the image is centered in that dimension, otherwise the height or width is adjusted to reach the right side or bottom of the menu.

Comments

The PICTURE command can be included in the STARTUP command block, in which case, the image loads immediately. It can also be activated in a command block from a button or menuitem. If PICTURE is included in the menu definition part of the MNU file (prior to the first POPUP item) and a picture has been entered in the EpiInfo.ini file interactively using the SETPICTURE command, the PICTURE command is ignored. If the PICTURE command is in a command block, however, it overrides any picture specified in the INI file. This allows the application developer to choose whether to allow the selection of a picture or whether it should be specified in the STARTUP or other command block of the menu. When using the BROWSER command, always set the PICTURE command in full screen.

Example

PICTURE REFCAMP.jpg
PICTURE "C:\Epi_Info\REFCAMP.jpg"
PICTURE Off


Picturesize Command (Menu Reference)

PICTURESIZE

Menu Command

Description

This command sets the size and location of the image identified by the PICTURE command, saved using the SETPICTURE command, or specified in a MENU command that loaded the current menu.

Syntax

PICTURESIZE <left>,<top>,<width>,<height>

  • The <left>, <top>, <width>, <height> represents optional numbers from 0 to 100 specifying percentages of screen width (left and width) or screen height (top and height). If omitted, the defaults are 0,0,100,100, or full screen. If width or height is omitted and the corresponding Left or Top is less than 40, then the image is centered in that dimension, otherwise the height or width is adjusted to reach the right side or bottom of the menu.

Comments

The PICTURESIZE command can be used in a command block, or in the menu definition part of the MNU file. After it is run, the image will be sized and located as specified until exit from the current menu.

Example

In this example, the image displays in the upper left corner of the menu.

PICTURESIZE 0, 0, 50, 50


Popup Command (Menu Reference)

POPUP

Menu Command

Description

This command defines a main menu that appears on the top line of the window. Individual MENUITEMS define the pull-down menu within the POPUP item.

Syntax

POPUP "<item text>"
Begin
Menuitem(s)
End

  • The BEGIN represents the delimiter used to identify the beginning of the pop-up menu.

  • The END represents the end of the pop-up menu.

Comments

Omitting the Begin or End statement causes unpredictable results in the menu structure.

Example

POPUP "&Programs "
BEGIN
MENUITEM "Ma&ke View (Questionnaire)" , MakeView
MENUITEM "&Enter Data", Enter
MENUITEM "&Analyze Data", Analysis
MENUITEM "&StatCalc", StatCalc
MENUITEM "Epi Ma&p", EpiMap
MENUITEM "E&xit ", Exit
END


Repeat Until Command (Menu Reference)

REPEAT UNTIL

Menu Command

Description

This command executes contained commands until the condition specified is true.

Syntax

REPEAT
[command(s)]
UNTIL <logical expression>

  • The <logical expression> represents a simple expression containing =, >, <, >=, <=, <>, Or, And, Not, variable names, or literal values. Literal values must be in quotation marks if they contain one or more spaces.

Example

Repeat
Assign cnt = @cnt + 1
Until cnt=10
Repeat
Dialog "Decrypt the data file and then exit Epi Lock", Titletext="Decrypt Dispatch"
Execute Epilock.exe @@Sys_PathData\Dispatch_@@ReptLevId.zip.els /d
WaitForExitEpilock.exe
Until Exists("@@Sys_PathData\Dispatch_@@ReptLevId.zip")


Replace From To Command (Menu Reference)

REPLACE {FROM} {,} {TO}

Menu Command

Description

This command replaces the contents of the source file and creates the object file. It makes a copy of the source file and does a search and replace operation in the new file. Also, it is useful for writing new .PGM files or documents with customized contents.

Syntax

REPLACE {}<content1>{}, {}<value1>{}; {}<content2>{}, {}<value2>{}; &
{FROM} <source> {TO} {,} <object> {, number}

  • The <content> is any expression to be replaced from a source file.

  • The <value> is any expression to replace the matched contents.

  • The <source> is the source file to be read from, containing the contents for replacing.

  • The <object> is the object file to be created, containing the replaced contents.

  • {FROM and TO} are the optional key words. If not using FROM TO, then use a comma to separate the source file and the object file.

  • The {,} is an optional symbol. If a comma is not used, then FROM TO must be used.

  • The {, number} is optional and indicates number of times to make the replacement. Not having a number means replace all instances, 1 means replace only the first, etc.

Comments

Each content and value are separated by a comma and ended by a semi column. The maximum replacements can be 1 to many. Spaces within the content or the value are allowed. The source file and the object file are declared after the FROM and TO key words respectively. The path of the source file and the object file default to the working directory, which is set in the Epi Info menu Settings, and otherwise specified by the drive name and the path. If the object file with the path is identical to the source file with the path, then the object file is placed on an under-bar ahead of the real name.

Wildcards of multiple character (*) and single character (?) may be used for both the source file and the object file. In this case, multiple files can be replaced. Each object file name is named according to the original object file name and the wildcards, which are from the source file name. The REPLACE replaces all occurrences in the source file for the contents specified in the menu command line. REPLACE also allows the replacing of searching text a certain number of times to use this option, add a comma with an integer number that indicates the number of times to make the replacement. The {, Number} is optional and indicates number of times to make the replacement. Not having a number means replace all instances, 1 means replace only the first, etc. text a certain number of times. To use this option, add a comma with an integer number that indicates the number of times to make the replacement.

Replace is able to include more than one line in the replace string, and also to replace a string with the contents of a file. If the replace string is Hello[CR]and Goodbye, ([CR] is an indicator for Carriage Return) then the result is

Hello

and Goodbye

If the replace string is [File:c:\Filepath.txt], then the contents of this file is inserted into the place where the search string is found. The contents of the file start at a new line. If the replace string includes a file, like ***Begin[File:c:\Filepath.txt]End***, then the contents of this file is brought up together with ***Begin and End*** to replace the matched string. In this case, ***Begin stays in the place where the string is found, and the contents of the file start at a new line. The string handles the contents of the file as a variable-length string, which means the file to insert can be 0 to approximately 2 billion in length. The use of quotes is optional. If a comma is embedded in the existing text, then quotes are required.

In preparing the source file, it is important to provide unique text to be replaced. We use conventions like ‘%Filename%’ to make a word unique, and then search and replace “%Filename%” with an actual filename.

Examples

DIALOG "Please enter a Drive and Directory where Sample.mdb resides as in ~
C:\Epi_Info\", Result
REPLACE %Path%, @@Result; %value1%, 300; %value2%, @@Total; FROM ~ MyTest2.SRC TO MyTest.PGM
EXECUTE Analysis.exe pgmname='MyTest.PGM'
REPLACE Path, c:\Epi_Info\; ###, Number; *.txt, *.htm
REPLACE Version 1.0, [File:d:\Epi_Info\MyFile.txt]; FROM c:\Epi_Infp\Edition.txt TO c:\Epi_Info\Edition.pgm
REPLACE string1, string2; string3, string4; c:\Epi_Info\Edition.txt, c:\Epi_Info\Edition.pgm, 2

If there are a large number of string pairs in a file that need to be replaced, use the following approach to archive the target results.

REPLACE str1, str2; str3, str4;…; From File1 To File2
REPLACE stra, strb; strc, strd;…; From File2 To File3
REPLACE strA, strB; strC, strD;…; From File3 To File4

ASSIGN MenuDLType="Automatic"
* Call DownloadData
Replace %Source%, @@My_Path; From @@My_PathApplication\Source\Download_Data.src To @@My_PathApplication\Download_Data.pgm
Replace %Source%, @@My_Path; From @@My_PathApplication\Source\Create_RegisterId.src To @@My_PathApplication\Create_RegisterId.pgm
EXECUTE Analysis.exe '@@My_PathApplication\Download_Data.pgm'
Waitforexit Analysis.exe
* Erase @@My_PathApplication\*.pgm
UNDEFINE MenuDLType Permanent


Screentext Command (Menu Reference)

SCREENTEXT

Menu Command

Description

This command places text on the screen at the location specified, with the size, color, font, and style designated. Horizontal and vertical positions are given in percentage of screen width and height.

Syntax

SCREENTEXT "<item text>", <horizontal>, <vertical>, <size>, <color>, <font>, <style>

  • <horizontal> is a number from 1 to 99 representing the distance from the left border of the window in percentage points.

  • <vertical> is a number from 1 to 99 representing the distance from the top border of the window in percentage points.

  • The <size> is a number between 1 and 999 representing the font size

  • The <color> is one of 16 colors.

  • The <font> is any of the fonts registered in the operating system of the computer. If the font is not available, text is displayed using the default Windows font.

  • The <style> is the styles bold, underline, or italic.

Program Specific Feature

Menu screen text is a separated part of the MNU program. It should be closed with the command END. If END is missing, results can be unpredictable.

Comments

The setting 50, 50 is centered on the screen. If the item is in the middle 50% of screen width, it is centered. If Horizontal is less than 25, the text is left justified. When Horizontal is more than 75, the text is right justified. Sizes vary with different fonts, but can be determined through examining the font possibilities in a word processor program. Text Fonts must be enclosed in quotation marks and must be spelled exactly as they appear in a Windows font selection window. Screen text is sent to the language module so that text is available in different languages.

Examples

SCREENTEXT "@@My_Country", 12, 14, 28, Black, Arial, Bold

SCREENTEXT "Electronic System", 8, 22, 28, Black, Arial, Bold

SCREENTEXT "Register Here", 12, 30, 28, Black, Arial, Bold

SCREENTEXT "Version 3.4, November 2006", 21, 38, 8, Black, Arial

SCREENTEXT "@@My_Entity", 30, 50, 48, Black, Arial


Setbuttons Command (Menu Reference)

SETBUTTONS

Menu Command

Description

This command turns the buttons on the menu off or on.

Syntax

SETBUTTONS <option>

  • The <option> represents the states of ON (to display) or OFF (to hide) the buttons.

Example

ButtonSetting
Begin
SETBUTTONS
End


SetDBversion Command (Menu Reference)

SETDBVERSION

Menu Command

Description

This command presents a dialog box that allows setting the default database format for Epi Info as either Access 97 or Access 2000. The default format is used in writing new MDB files. The system reads and writes either format automatically with existing MDB files.

Syntax

SETDBVERSION

Comments

Versions 1.0 through 1.1.2 of Epi Info used the Access 97 file format (.MDB). Starting with version 2002, 0, 0, the default database type is recorded in the EpiInfo.ini file. The default database type is only used when writing a new .mdb file. Epi Info, Version 1.2 or higher, detects the type of an existing .mdb when reading a view or table, and uses the correct type when writing a data table or view in an existing .mdb. The default database type is only used during creation of a new MDB.

The value selected from Settings > Choose Epi Info Database Version is stored in the [EPI_INFO] section of the INI file under DBVersion, with possible values being Access 97 and Access 2000.

Example

ChooseDBVersion
Begin
SetDBVersion
End


Setdoswin Command (Menu Reference)

SETDOSWIN

Menu Command

Description

This command allows the user to set the status of the DOS window, unless it becomes active.

Syntax

SETDOSWIN <variable>

  • The <variable> is the variable used to identify a DOS window status.

Comments

Variable | Description
HIDE | Window is hidden and focus is passed to the hidden window.
NORMAL | Window has focus and is restored to its original size and position.
MINIMIZED | Window is displayed as an icon with focus.
MAXIMIZED | Window is maximized with focus.
NORMALNOFOCUS | Window is restored to its most recent size and position. The currently active window remains active.
MINIMIZEDNOFOCUS | Window is displayed as an icon. The currently active window remains active.

Horizontal Size and Vertical Size are both expressed in percentages of screen height or width. If both are omitted, the button size is chosen automatically. If only one is included, it is taken to be the Horizontal Size.

When using SETDOSWIN Hide on Windows 98, make sure the Menu_Bat.bat file properties include a Close on Exit. In Windows 2000, Close on Exit checked is by default. If Close on Exit is unchecked, SETDOSWIN Hide hides DOS Windows, but does not close the DOS Windows, this can cause Windows to hang. A shortcut file to Menu_Bat.bat with Close on Exit checked is included in the folder where EpiInfo.exe is installed.


SetImportYear Variable

SETIMPORTYEAR

Menu

Description

The SETIMPORTYEAR command allows for the setting of a default Epi 6 Import YEAR and SPLITYEAR. Make View and Analysis use these values to determine the year and the century when importing Epi 6 Rec data.

Syntax

SETIMPORTYEAR

Comments

The values of these keys are stored in the EpiInfo.ini file under the EPI_INFO section. The empty value of the key is removed from the section, and the value of year is determined by the Calendar setting in Start > Control Panel > Regional Options > Customize > Date tab.

The Import Year and Splityear can be set from the Epi Info main menu by selecting Settings > Choose Epi 6 Import YEAR and SPLITYEAR.


Setinidir Command (Menu Reference)

SETINIDIR

Menu Command

Description

This command sets the EpiInfo.ini file directory in the registry and sets the scope for all of Epi Info.

Syntax

SETINIDIR

Comments

From the Epi Info main menu, select Settings > Set INI File Directory. Select the directory from those listed on the local computer.

Example

INIFileDir
Begin
SETINIDIR "Please choose a writable directory for the EpiInfo.INI file."
End


Setlanguage Command (Menu Reference)

SETLANGUAGE

Menu Command

Description

This command sets the language translation for Epi Info.

Syntax

SETLANGUAGE

Comments

The value of the language selection is stored in the EpiInfo.ini file. If the required language is not available from Settings > Choose Language, it must be installed first using the Settings > Install Language option available from the main page.

Example

ChooseLanguage
Begin
SETLANGUAGE
End


Setpicture Command (Menu Reference)

SETPICTURE

Menu Command

Description

This command allows the user to select an image for the current menu.

Syntax

SETPICTURE <image>

  • The <image> is an image in a valid format (.bmp, .gif, .jpg)

Comments

The name and location of the chosen image is stored in the EpiInfo.ini file so that the menu displays the same image each time it runs. If set, the SETPICTURE image takes priority over PICTURE image that may be set in menu code.


Setworkdir Command (Menu Reference)

SETWORKDIR

Menu Command

Description

This command sets the working directory in EpiInfo.INI file.

Syntax

SETWORKDIR

Comments

To select a working directory from the Epi Info main menu, select Settings > Set Working Directory.

Example

WorkingDir
Begin
SETWORKDIR "Please choose a working directory for which you have write privileges."
End


Startup and Shutdown Commands (Menu Reference)

STARTUP and SHUTDOWN

Menu Command

Description

These are special command blocks. The StartUp block is executed automatically as soon as the Menu is run. The ShutDown block is executed just prior to exit from the menu.

Syntax

STARTUP

SHUTDOWN

Comments

These blocks are optional. They are executed only if present. They can be used to present instructions or reminders on entry and exit from the menu, or to perform configuration, encryption, password, logging, backup, or data validation procedures.

Example

STARTUP
Begin
Dialog "Start work in this menu by choosing a file from the FILE:OPEN menu"
End
SHUTDOWN
Begin
Dialog "This would be a good time to make backup files"
End


Sysinfo Command (Menu Reference)

SYSINFO

Menu Command

Description

This command calls a Windows utility that displays the system information.

Syntax

SYSINFO

Comments

This command displays information about the Windows 98, NT, 2000 or XP operating system and the hardware and software of the computer. It includes type of processor, memory usage, disk space, programs currently active, date and version of all system modules, and many other items useful for solving problems.


Undefine Command (Menu Reference)

UNDEFINE

Menu Command

Description

This command removes a variable line from the section that is specified.

Syntax

UNDEFINE <variable>

  • The <variable> is a defined variable.

Comments

Specifying the section name with keyword Standard or even no keyword means the action is taken in [Menu Variables], and with the keyword Permanent signifies the [Variables] section. UNDEFINE does the reverse action of DEFINE.

Example

UNDEFINE MenuDLType PERMANENT


Waitfor Command (Menu Reference)

WAITFOR

Menu Command

Description

This command causes the execution of a block of commands to pause until the named program and optionally named window become active.

Syntax

WAITFOR <program name> {"<window title>"}

  • The <program name> is the name of an executable program.

  • The <window title> is the title that appears at the top of a particular window within a program.

  • The <command> is any relevant menu command.

Comments

After the condition is satisfied, the WAITFOR command is inactivated.

Example

Do not use this command to wait for a DOS command

WAITFOR Analysis.exe
Help Exercise1.html
WAITFOR WordPad.exe "EpiInfo.mnu - wordpad"
Help WhatsNew.html


Waitforexit Command (Menu Reference)

WAITFOREXIT

Menu Command

Description

This command waits for the program to exit before executing the named program. Additional commands in the same command block are not executed until the specified program exits.

Syntax

WAITFOREXIT <program name> {"<window title>"}

  • The <program name> is the name of an executable program.

  • The <window title> is the title that appears at the top of a particular window within a program.

  • The <command> is any relevant menu command.

Comments

Prevents the next command from executing until the named program is no longer active. After a single execution, the WAITFOREXIT command is released. In different blocks, the same module cannot be called more than once. If using WAITFOR and WAITFOREXIT in the same module, only one is executed and the other is ignored.

Example

Do not use this command to wait for a DOS command.

EXECUTE Epilock.exe @@Sys_PathData\Dispatch_@@ReptLevId.zip /u /s
WAITFOREXIT Epilock.exe
EXECUTE Analysis.exe '@@Sys_PathApplication\Load_Data.pgm'
WAITFOREXIT Analysis.exe


Waitforfileexists Command (Menu Reference)

WAITFORFILEEXISTS

Menu Command

Description

This command causes the execution of a block of commands to pause until the named file exits. An optional number of seconds can be specified, in which case the file must be “new” within the time interval specified.

Syntax

WAITFORFILEEXISTS <filename> {<seconds>}

  • The <filename> is the path and name of a file being monitored.

  • The <seconds> is the time interval within which the file must be new. If not supplied, file date and time are ignored.

  • The <command> is any relevant menu command.

Comments

Executes the next command only when the named file exits and (optionally) was created within the stated period of time. After execution, the WaitForFileExists is cancelled. The Seconds feature specifies waiting for a new file; so that it is not necessary to delete a previous instance of the file before running the command. In other words, specifying 10 for Seconds causes the command to ignore the existence of the file if it was created more than 10 seconds ago.

Example

Startup
Begin
WAITFORFILEEXISTS @@My_PathApplication\Images\myscreen.jpg
If Exists("@@My_PathData\Data_@@My_Reportlevel.zip.els") Then
Dialog "Please enter the password to decrypt your data.", Titletext="File Decryption"
Execute Epilock.exe @@My_PathData\Data_@@My_Reportlevel.zip.els /d
WAITFOREXIT Epilock.exe
If EXISTS("@@My_PathData\Data_@@My_Reportlevel.zip") Then
Erase @@My_PathData\Data_@@My_Reportlevel.zip.els
Else
DIALOG "The data have not been decrypted properly! System will close automatically.", Titletext="Decryption Error"
Exit
Endif
EndIf
Execute control.exe date/time
End


Introduction to Functions and Operators

Functions modify the value of one or more variables to produce a result. For example, ROUND(2.33333) produces the value 2. Operators are used to combine two items. For example, the + operator combines Var1 and Var2 to produce a sum, as in Var3=Var1+Var2. Functions and operators appear within commands and are used for such common tasks as extracting a year from a date, combining two numeric values, or testing logical conditions. Almost all functions require arguments enclosed in parentheses and separated by commas. Where arguments are required, do not place any spaces between the function name and the left parenthesis. Syntax rules must be followed. Quotes must enclose text strings are displayed in question or prompt dialog boxes. Parentheses must enclose arithmetic expressions and can explicitly control the order of operations. Parentheses also enclose function arguments.

Arithmetic Operators are used to perform mathematical calculations.

Assignment Operators are used to assign a value to a property or variable. Assignment Operators can be numeric, date, system, time, or text.

Comparison Operators are used to perform comparisons.

Concatenation Operators are used to combine strings.

Logical Operators are used to perform logical operations and include AND, OR, and NOT .

Boolean Operators include AND, OR, XOR, and NOT and can have one of two values, true or false.


Operator Precedence

When several operations occur in an expression, each part is evaluated and resolved in a predetermined order called Operator Precedence. Parentheses can be used to override the order of precedence and force some parts of an expression to be evaluated before other parts. Operations within parentheses are always performed before those outside. Within parentheses, however, normal Operator Precedence is maintained.

When expressions contain operators from more than one category, arithmetic operators are evaluated first, comparison operators are evaluated next, and logical operators are evaluated last. Comparison operators all have equal precedence; that is, they are evaluated in the left-to-right order in which they appear. Arithmetic and logical operators are evaluated in the following order of precedence:

Arithmetic | Comparison | Logical
Negation (-) | Equality (=) | Not
Exponentiation (^) | Inequality (<>) | And
Multiplication and division (*, /) | Less than (<) | Or
Integer division (\) | Greater than (>) | Xor
Modulus arithmetic (Mod) | Less than or equal to (<=) |
Addition and Subtraction (+, -) | Greater than or equal to (>=) |
String concatenation (&) | Is |

When multiplication and division occur together in an expression, each operation is evaluated as it occurs from left to right. Likewise, when addition and subtraction occur together in an expression, each operation is evaluated in order of appearance from left to right.

The string concatenation operator (&) is not an arithmetic operator, but in precedence it does fall after all arithmetic operators and before all comparison operators. The Is operator is an object reference comparison operator. It does not compare objects or their values; it checks only to determine if two object references refer to the same object.


@@ Operator

@@

Menu Operator

Description

Replaces a variable name with its current value in Menu only.

Syntax

@@<varname>

Comments

A variable with the same name has a higher preference in the standard section than in permanent variables section.

If a variable does not exist in [Standard Variables], then the value is taken from [Standard Variables]. Following this rule, @@ looks for the variable name in [Permanent Variables] first, then [Permanent Variables], and if found, places the value for the variable in the preference section.

The name of a variable created with ASSIGN or DIALOG can be embedded in a menu command, a menu item, screen text, or a button description. When the command is executed, the value of the variable is substituted for @@ varname.

Those using Epi Info 6 should note that @@ replaces @ to avoid confusion with internet addresses that frequently contain a single @ sign.

If a variable is used with @@ in a file path without a "\", then a "\" is needed to get the correct full file path. Since @@ always removes a space after the replacement, verify that the text is still valid after @@ takes place.

Example

Assign FavoriteURL = "www.cdc.gov"
LINKTO @@FavoriteURL
Replace %source%, @@Path1; From @@Path1\App\Main.src To @@Path1\AppMain.pgm


& Ampersand

Operator

Description

Forces string concatenation of two expressions. Text concatenation operator connects, or concatenates, two values to produce a continuous text value.

Syntax

<expression> & <expression>

  • The <expression> represents any valid logical expression.

Comments

Whenever an expression is not a string, it is converted to a String subtype. If both expressions are Null, the result is also Null. However, if only one expression is Null, that expression is treated as a zero-length string ("") when concatenated with the other expression. Any expression that is Empty is also treated as a zero-length string.

Example

Several fields are combined into a single text variable that represents the patient's ID number and gender.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Patient
ASSIGN Patient = Name & " - " & Sex & " (" & CODE_RW & ")"
LIST Patient


= Equal Sign

= Equality and Assignment

Operator

Description

The = operator serves two different purposes in Epi Info. When used in an assignment operation, it assigns a value to a variable or property. When used in a comparison operation, it is used for determining if two values are equal to each other; the result of comparison operations is a logical value such as True or False.

Syntax

<variable> = <value>

  • The <variable> represents any variable or any writable property.

  • The <value> represents any numeric or string literal, constant, or expression.

Comments

The name on the left side of the equal sign can be a simple scalar variable or an element of an array. Properties on the left side of the equal sign can only be those properties that are writable at run time.

Examples

Example 1 (Analysis): A new variable is created and then assigned "True" if the patient's age is greater than 17 and "False" if the patient's age is less than or equal to 17.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Minor

IF Age < 17 THEN
ASSIGN Minor = "True"
ELSE
ASSIGN Minor = "False"
END

LIST Minor Age

Example 2 (Analysis): The = operator is used to compare two database variables. If both of the variables are true, then a new variable (IceCream) is assigned true.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE IceCream

IF Vanilla = (+) AND Chocolate = (+) THEN
ASSIGN IceCream = (+)
ELSE
ASSIGN IceCream = (-)
END

LIST IceCream Chocolate Vanilla

Example 3 (MakeView/Enter): The = operator is used to determine whether or not the user skipped a certain field. In this example, the field is called 'LastName.' If the user decided to leave the field blank a warning dialog is displayed.

IF LastName = (.) THEN
DIALOG "Warning: Last name field is blank."
END


ABS Function

ABS

Function

Description

The ABS function returns the absolute value of a variable by removing the negative sign, if any.

Syntax

ABS(<variable>)

  • The <variable> can be an existing numeric variable, a defined variable containing numbers, or a numeric constant.

Comments

Results will be numeric.

Value | ABS Function
-2 | 2
1 | 1
0 | 0
-0.0025 | 0.0025

Example

The example code below first assigns the Age variable a negative number if the value is greather than 30. Then, the ABS function removes the negative sign from each person's age. Finally, a LIST command is run showing the original age variable, the age variable with negative values, and the age variable passed through the ABS function.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Age2
DEFINE Age3

IF Age > 30 THEN
ASSIGN Age2 = Age * -1
ELSE
ASSIGN Age2 = Age
END

ASSIGN Age3 = ABS(Age2)
LIST Age Age2 Age3


+ Addition

Operator

Description

This operator provides the sums of two numbers. Basic arithmetic operator used for addition; the result of an arithmetic operator is usually a numeric value.

Syntax

[expression1] <operator> [expression2]

Comments

Although the + operator can be used to concatenate two character strings, the & operator should be used for concatenation to eliminate ambiguity and provide self-documenting code. When + operator is used, there may be no way to determine whether addition or string concatenation will occur. The underlying subtype of the expressions determines the behavior of the + operator in the following way:

If | Then
Both expressions are numeric | Add
Both expressions are strings | Concatenate
One expression is numeric and the other is a string | Add

If one or both expressions are Null expressions, the result is Null. If both expressions are Empty, the result is an Integer subtype. However, if only one expression is Empty, the other expression is returned unchanged as a result.

Example

Three numeric fields are added together.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE Sum
ASSIGN Sum = Age + FamIdNum + 5
LIST Age FamIdNum Sum


AND Operator

AND

Operator

Description

The AND operator performs logical conjunction on two Boolean expressions. If both expressions evaluate to True, then the And operator returns True. If either or both expressions evaluate to False, then And returns False.

Syntax

[logical expression] AND [logical expression]

  • [logical expression] represents any valid logical expression in Epi Info.

Examples

Example 1 (Analysis): The below code will determine how many patients are female heads of household. A value of true is assigned to all records where this criteria is met.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE FemaleHeadOfHouse

IF Head = (+) AND Sex = "F" THEN
ASSIGN FemaleHeadOfHouse = (+)
ELSE
ASSIGN FemaleHeadOfHouse = (-)
END

LIST FemaleHeadOfHouse Sex Head GRIDTABLE

Example 2 (Analysis): The below code will determine how many patients are older than 65 and female. The value of "Senior" is assigned to all records that meet these criteria.

READ 'C:\Epi_Info\Sample.mdb':viewSmoke
DEFINE Result
IF Age > 65 AND Sex = 2 THEN
ASSIGN Result = "Senior"
END

SELECT Result = "Senior"
LIST Result Age Sex


ARITHMETIC Operators

ARITHMETIC

Operator

Description

Basic arithmetic operators can be used in combination with other commands. The result of any arithmetic operation is a numeric value.

Syntax

[expression] <operator> [expression]

  • [expression] is a numeric value or a variable containing data in numeric format.

  • <operator> represents any valid arithmetic operator.

Comments

The results are expressed in numeric format. The basic mathematical operators that can be used in Epi Info are as follows:

  • Addition + Basic arithmetic operator used for addition; the result of an arithmetic operator is usually a numeric value. Example: 3 + 3.

  • Subtraction - Basic arithmetic operator used for subtraction or negation; the result of an arithmetic operator is usually a numeric value. Subtraction example: 3 - 1. Negation example: -1

  • Multiplication * (Asterisk) Basic arithmetic operator used for multiplication; the result of an arithmetic operator is usually a numeric value.

  • Division / Basic arithmetic operator used for division; the result of an arithmetic operator is usually a numeric value.

  • Exponentiation ^

  • Modulus or Remainder MOD

Arithmetic operators are shown in descending order of precedence. Parentheses can be used to control the order in which operators are evaluated, although frequently the default order achieves the correct result.

While it is possible to do date math with dates considered as a number of days (e.g., IncubationDays = SymptomDateTime - ExposureDateTime), the behavior of the database services underlying Epi Info makes it more efficient to use time interval functions (e.g., IncubationDays = MINUTES(ExposureDateTime, Symptom DateTime)/(24*60)). Furthermore, when doing date math, the following rules apply:

Date + Date produces Date

Date - Date produces Days

Date * Date not permitted

Date / Date not permitted

Date ^ Date not permitted

Date + Number produces Date

Number + Date produces Number

The last 2 rules apply as well to other math operations: -, *, /, ^

The "zero day" for date math is December 30, 1899.

Examples

Example 1 (Analysis): The value of two fields plus the literal value 5 are added together to generate a sum.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE Sum ASSIGN Sum = Age + FamIdNum + 5
LIST Sum Age FamIdNum

Example 2 (Analysis): The value of two fields are multiplied together to generate a product.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE Count ASSIGN Count = Age * FamIdNum
LIST Count Age FamIdNum

Example 3 (Analysis): One field is subtracted from another in order to find a difference.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE Difference ASSIGN Difference = Age - FamIdNum
LIST Difference Age FamIdNum

Example 4 (Analysis): Division is used (together with the MINUTES function) to find the incubation time for an unknown pathogen.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE Incubation
ASSIGN Incubation = MINUTES(TimeSupper, DateOnset) / 60
LIST Incubation TimeSupper DateOnset

Example 5 (Analysis): One field's value is raised to the power of another field's value.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE Total
ASSIGN Total = Age ^ Relation
LIST Total Age Relation

Example 6 (Analysis): A division operation is conducted on the value of the Age and Relation fields. A modulus operation is then used to find the remainder.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE Dividend
ASSIGN Dividend = Age / Relation
DEFINE Remainder
ASSIGN Remainder = Age MOD Relation
LIST Dividend Remainder Age Relation

Example 7 (Analysis): Several operators are used together to create a mathematic expression. Note that different values are generated depending on the order of operations.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE Num1
DEFINE Num2
DEFINE Num3
ASSIGN Num1 = ((5 + 5) * 47) ^ 2
ASSIGN Num2 = (5 + 5) * (47 ^ 2)
ASSIGN Num3 = 5 + 5 * 47 ^ 2
LIST Num1 Num2 Num3


COMPARISON Operators

COMPARISONS

Operator

Description

Comparison operators can be used in If, Then, and Select statements in both Check Code and the Analysis program. Yes/No variables can only be tested for equality against other Yes/No constants (+), (-), and (.).

Operator | Description
= | Equal to Comparison operator used for equal to; the result of comparison operators is usually a logical value, either True or False. EX. A1 = B1
> | Greater than comparison operator. Compares a value greater than another value; the result of comparison operators is usually a logical value, either True or False. Comparison operator used for comparing a value greater than another value; the result of comparison operators is usually a logical value, either True or False. EX. A1 > B1.
< | Less than comparison operator. Compares a value less than another value; the result of comparison operators is usually a logical value, either True or False. Comparison operator used for comparing a value less than another value; the result of comparison operators is usually a logical value, either True or False. EX. A1< B1
>= | Greater than or equal to
<= | Less than or equal to
<> | Not equal to
LIKE | Left side variable matches right side pattern; in pattern, * matches any number of characters, ? matches any one character.

Syntax

[expression] <operator> [expression]

  • [Expression] is any valid expression.

Comments

Comparison operators are executed from left to right. There is no hierarchy among comparison operators. The <> operator can be used only with numeric variables. For non numeric variables use NOT.

Example

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
SELECT AGE = 23
LIST AGE DISEASE
SELECT
SELECT AGE > 20
LIST AGE DISEASE
SELECT
SELECT AGE < 45
LIST AGE DISEASE
SELECT
SELECT AGE >= 20
LIST AGE DISEASE
SELECT
SELECT AGE <= 45
LIST AGE DISEASE
SELECT
SELECT AGE <> 30
LIST AGE DISEASE
SELECT
SELECT Disease LIKE "Ty*"
LIST Age Disease OnsetDate


DAY Function

DAY

Function

Description

Extracts the day from the date.

Syntax

DAY(<date>)

  • <date> is either a variable or literal represented in date format.

Comments

If the date is stored in a text variable, the function will not be processed and the result will be null.

Example

The day the survey was filled out is extracted from the SurveyDate variable. It is then used to generate a bar graph showing cases by day.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE BirthDay
ASSIGN BirthDay = DAY(DOB)
GRAPH BirthDay GRAPHTYPE="Bar"


DAYS Function

DAYS

Function

Description

This function returns the number of days between <date1> and <date2>. If any of the variables or values included in the formula is not a date, the result will be null.

Syntax

DAYS(<date1>, <date2>)

  • <date1> and <date2> are either variables or literals represented in date format.

Comments

If the date stored in <date1> is more recent than that in <date2>, the result is the difference in days expressed as a negative number.

Example

The patient's age in years is calculated using the date of birth and the date the survey was filled out. This example uses the Analysis module.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE SurveyDate
ASSIGN SurveyDate = 05/15/2010
DEFINE AgeYears
ASSIGN AgeYears = DAYS(BirthDate, SurveyDate) / 365.25
MEANS AgeYears
LIST AgeYears


ENVIRON Function

ENVIRON

Function

Description

This function returns the value of a DOS environment variable, such as PATH or COMSPEC. The PATH variable determines where the system looks for the commands needing to run. The COMSPEC variable is used by the command interpreter (COMMAND.COM) to indicate the position from where it was loaded. This variable should always be present in the environment. It is put there automatically when the computer is started. This is usually something like A:\COMMAND.COM or C:\COMMAND.COM.)

Syntax

ENVIRON(<name of DOS environment variable>)

  • The variable is in text format.

Example

DEFINE test
ASSIGN test=ENVIRON("comspec")
LIST test
ASSIGN test=ENVIRON("path")
LIST test
ASSIGN test=ENVIRON("appdata")
LIST test
ASSIGN test=ENVIRON("temp")
LIST test


EXISTS Function

EXISTS

Function

Description

This function returns TRUE if a file exists; otherwise it returns FALSE.

Syntax

EXISTS(<path>)

  • <path> represents the path of the file being searched for and returns TRUE if the path exists and FALSE if it does not exist.

Comments

If the user does not have permission to access the file a FALSE may be returned.

Examples

Example 1: The the EXISTS function is used to check whether or not a certain Epi Info 3 file exists on the hard drive.

DEFINE Path1
ASSIGN Path1 = "C:\Epi_Info\MakeView.exe"

IF EXISTS(Path1) = (+) THEN
DIALOG "Epi Info 3 installation detected."
END

Example 2: The EXISTS function is used to check whether or not an Epi Info 3 folder is present on the hard drive.

IF EXISTS("C:\Epi_Info\") = (+) THEN
DIALOG "Epi Info 3 installation folder detected."
END


EXP Function

EXP

Function

Description

This function raises the base of the natural logarithm (e) to the power specified.

Syntax

EXP(<variable>)

Comments

This variable can be an existing numeric variable, a defined variable containing numbers, or a numeric constant.

Example

The value stored in the variable Age is raised to the power of e.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE ExpA
ASSIGN ExpA = EXP(Age)
LIST ExpA Age


FILEDATE Function

FILEDATE

Function

Description

This function returns the date a file was last modified or created. If FILEDATE is specified with a file path that lacks a directory, the current directory is used. If FILEDATE is specified without a file, or with a file that does not exist, the function returns missing.

Syntax

FILEDATE(<variable>)

  • <variable> represents the complete file path and name in text format

Comments

This function is useful when several users are updating a large database.

Example

The example code below checks to see whether the CDC nutrition database file is newer than December 31st, 2006, and if so displays a dialog box.

UNDEFINE LastUpdated
DEFINE LastUpdated GLOBAL
ASSIGN LastUpdated = FILEDATE("C:\Epi Info\CDC.mdb")
IF GDATE > 12/31/2006 THEN
DIALOG "File CDC.mdb is new."
END


FINDTEXT Function

FINDTEXT

Function

Description

This function returns the position in a variable in which the string is located.

Syntax

FINDTEXT(<variable1>, <variable2>)

  • The <variable1> represents the string of characters to be found and the <variable2> represents the string to be searched.

Comments

If the search sting is not found, the result is 0. Otherwise, the result is a number corresponding to the position of the string starting from the left. The first character position to be searched is 1. FINDTEXT is not case-sensitive.

Example

This Analysis code checks the LastName field to determine whether or not it contains the letter M. If the letter M is found, the LIST command displays the letter's position within the string.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE Found
DEFINE MPos
ASSIGN MPos = FINDTEXT("M", LastName)

IF MPos > 0 THEN
ASSIGN Found = (+)
ELSE
ASSIGN Found = (-)
END

LIST MPos LastName Found


FORMAT Function

FORMAT

Function

Description

This function changes the format of one variable type to text in a specified format. If no format is specified it returns text and converts a number to text.

Syntax

FORMAT(<variable>, {"<format specification>"})

  • The <variable> represents a variable in any format.

  • The <format specification> is optional and can represent any of the following:

Format Specification | Description
Date Formats |
General Date | 11/11/1999 05:34
Long Date | System's long date format
Medium Date | System's medium date format
Short Date | System's short date format
Long Time | System's long time format
Medium Time | System's medium time format
Short Time | System's short time format
Number Formats |
General Number | No thousand separator
Currency | Thousand separator plus two decimal places (based on system settings)
Fixed | At least #.##
Standard | #,###.##
Percent | Number multiplied by 100 plus a percent sign
Scientific | Standard scientific notation
Yes/No | Displays NO if number = 0, else displays Yes
True/False | False if number = 0
On/Off | True if number <> 0 Displays 0 if number = 0, else displays 1
Custom Format | Allows for the creation of customized formats

Comments

Output may vary based on the specific configuration settings of the local computer. For more information about formats, please refer to the Microsoft Access or Microsoft Visual Basic documentation.

Format(Time, "Long Time")

MyStr = Format(Date,"Long Date")

MyStr = Format(MyTime,"h:m:s")

Returns "17:4:23"

MyStr = Format(MyTime,"hh:mm:ssAMPM")

Returns "05:04:23 PM"

MyStr = Format(MyDate,"dddd, mmm yyyy")

Returns "Wednesday, ' Jan 27 1993". If format is not supplied, a string is returned.

MyStr = Format(23)

Returns "23".

User-defined formats

MyStr = Format(5459.4, "##,##0.00")

Returns "5,459.40"

MyStr = Format(334.9, "###0.00")

Returns "334.90"

MyStr = Format(5, "0.00%")

Returns "500.00%"

MyStr = Format("HELLO", "<")

Returns "hello"

MyStr = Format("This is it", ">")

Returns "THIS IS IT"

MyStr = Format("This is it", ">;*")

Returns "THIS IS IT"

Examples

Example 1 (Analysis): The survey date from the Refugee database is converted into several different date formats and displayed in the Analysis output window.

READ 'C:\Epi_Info\Refugee.MDB':viewPatient
DEFINE Date1 TEXTINPUT
DEFINE Date2 TEXTINPUT
DEFINE Date3 TEXTINPUT
ASSIGN Date1 = FORMAT(TodayDate, "Long Date")
ASSIGN Date2 = FORMAT(TodayDate, "Medium Date")
ASSIGN Date3 = FORMAT(TodayDate, "Short Date")
LIST Date1 Date2 Date3

Example 2 (Analysis): The Yes and No values of a Yes/No field are changed to show True and False instead.

READ 'C:\Epi_Info\Refugee.MDB':viewPatient
DEFINE Sick TEXTINPUT
ASSIGN Sick = FORMAT(Ill, "True/False")
LIST Sick Ill

Example 3 (Analysis): Using the Refugee database, a standard numeric field is converted into several formats and displayed in a grid.

READ 'C:\Epi_Info\Refugee.MDB':viewPatient
DEFINE Currency
DEFINE FixedNumber
DEFINE StandardNumber
DEFINE Percentage
DEFINE Scientific
DEFINE YesNo
DEFINE TF
DEFINE OnOff
DEFINE Custom

ASSIGN Currency = FORMAT(BOH, "Currency")
ASSIGN FixedNumber = FORMAT(BOH, "Fixed")
ASSIGN StandardNumber = FORMAT(BOH, "Standard")
ASSIGN Percentage = FORMAT(BOH, "Percent")
ASSIGN Scientific = FORMAT(BOH, "Scientific")
ASSIGN YesNo = FORMAT(BOH, "Yes/No")
ASSIGN TF = FORMAT(BOH, "True/false")
ASSIGN OnOff = FORMAT(BOH, "On/Off")
ASSIGN Custom = FORMAT(BOH, "VB\s #,###.##")

LIST BOH Currency FixedNumber StandardNumber Percentage Scientific YesNo TF OnOff Custom GRIDTABLE

Example 4 (MakeView/Enter): The FORMAT function is used to convert the UniqueKey field from numeric format to text format. It is subsequently assigned to the ID field with a two-letter prefix. The example assumes a View exists that has the following fields: ID (Text). The code below would appear in the BEFORE section of the RECORD event.

ALWAYS
IF ID = (.) THEN
ASSIGN ID = "GA" & FORMAT(UniqueKey, "####0000")
END
END

Example 5 (MakeView/Enter): The FORMAT function is used to find the day of the week ("Monday", "Tuesday", etc.) for a given date. The day of the week is then assigned to another field on the View. The example assumes a View exists that has the following fields: DayOfWeek (Text) and EventDate (Date). The code below would appear in the AFTER section of the EventDate field.

ASSIGN DayOfWeek = FORMAT(EventDate, "dddd")


HOUR Function

HOUR

Function

Description

This function returns a numeric value that corresponds to the hour recorded in a date/time or time variable.

Syntax

HOUR(<time>)

  • <time> is either a variable or literal represented in time or date/time format.

Comments

If the time is stored in a text variable, the function will not be processed and the result will be null.

Example

The hour component of the computer's internal clock is displayed in the Analysis outout window.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE CurTime
ASSIGN CurTime = SYSTEMTIME
DEFINE Hour
ASSIGN Hour = HOUR(CurTime)
LIST CurTime Hour


HOURS Function

HOURS

Function

Description

This function returns the number of hours between <time1> and <time2> in numeric format.

Syntax

HOURS(<time1>, <time2>)

  • <time1> and <time2> are either variables or literals represented in time or date/time format.

Comments

If the date stored in <time1> is older than that in <time2>, the result will be the difference in hours expressed as a negative number. Both variables must contain data in date, time, or date/time format. If any of the variables or values included in the formula is not a date, the result will be null.

Example

The incubation time for an unknown pathogen is calculated using the time the patient ate dinner and the time the patient presented with symptoms.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE IncubationTime
ASSIGN IncubationTime = HOURS(TimeSupper, DateOnset)
LIST IncubationTime TimeSupper DateOnset Age Sex Ill GRIDTABLE


LIKE Operator

Description

This operator is used with the SELECT command to locate subsets of information using a wildcard search. LIKE can only be used to locate data in text variables. LIKE uses asterisks (*) to define the select value. LIKE can also be used in the creation of IF/THEN statements.

Syntax

SELECT <variable> LIKE "*value*"

SELECT <variable> LIKE "value*"

SELECT <variable> LIKE "*value"

  • The <variable> represents a variable in text format.

  • The "value" represents any string constant.

Comments

The LIKE operator only functions with data in text format.

The * character represents a wildcard. If the given value is "Smith*", for example, then "Smith", "Smithhaven", and "Smithy" would all be found.

Examples

Example 1 (Analysis): All records where the patient's last name starts with "E" are displayed.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
SELECT LastName LIKE "E*"
LIST LastName

Example 2 (Analysis): All records where the patient's last name contains the letter "S" are displayed.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
SELECT LastName LIKE "*S*"
LIST LastName

Example 3 (Analysis): All records where the patient's last name ends with the letter "Y" are displayed.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
SELECT LastName LIKE "*Y"
LIST LastName

Example 4 (Analysis): All records where the patient's last name starts with the letter combination "Mc" and ends with the letter "e" are displayed.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
SELECT LastName LIKE "Mc*e"
LIST LastName


LN Function

LN

Function

Description

The function LN returns the natural logarithm (logarithm in base e) of a numeric value or variable. If the value is zero or null, it returns a null value.

Syntax

LN(<variable>)

  • The <variable> can be an existing numeric variable, a defined variable containing numbers, or a numeric constant.

Comments

The results will be numeric.

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE NaturalLogAge
ASSIGN NaturalLogAge = LN(Age)
LIST Age NaturalLogAge


LOG Function

LOG

Function

Description

This function returns the base 10 logarithm (decimal logarithm) of a numeric value or variable. If the value is 0 or null it returns a null value.

Syntax

LOG(<variable>)

  • The <variable> can be an existing numeric variable, a defined variable containing numbers, or a numeric constant.

Comments

The results will be numeric.

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE DecLog
ASSIGN DecLog = LOG(Age)
LIST Age DecLog


MINUTES Function

MINUTES

Function

Description

This function returns the number of minutes between <time1> and <time2> in numeric format.

Syntax

MINUTES(<time1>, <time2>)

  • <time1> and <time2> are either variables or literals represented in time or date/time format.

Comments

If the date stored in <time1> is older than that in <time2>, the result will be the difference in minutes expressed as a negative number. Both variables must contain data in date, time, or date/time format. If any of the variables or values included in the formula is not a date, the result will be null.

Examples

Example 1 (Analysis): The incubation time for an unknown pathogen is calculated using the time the patient ate dinner and the time the patient presented with symptoms.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Incubation
ASSIGN Incubation = MINUTES(TimeSupper, DateOnset)
LIST Incubation TimeSupper DateOnset Age Sex Ill GRIDTABLE

Example 2 (Analysis): The incubation time for an unknown pathogen is calculated using the time the patient ate dinner and a literal date/time value.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Incubation
ASSIGN Incubation = MINUTES(TimeSupper, 4/18/1940 23:00:00)
LIST Incubation TimeSupper DateOnset Age Sex Ill GRIDTABLE


MONTH Function

MONTH

Function

Description

This function extracts the month from the date.

Syntax

MONTH(<date>)

  • <date> is either a variable or literal represented in date format.

Comments

If the date is stored in a text variable, the function will not be processed and the result will be null.

Examples

Example 1 (Analysis): The month the survey occurred is extracted from the SurveyDate variable and used to generate both a graph and statistical data.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE EventMonth
ASSIGN EventMonth = MONTH(EventDate)
MEANS EventMonth
GRAPH EventMonth GRAPHTYPE="Bar" TITLETEXT="Events by Month" XTITLE="Month" YTITLE="Cases"

Example 2 (MakeView/Enter): The month component of the field SurveyDate is assigned to another field named SurveyMonth. The example assumes a View exists that has the following fields: SurveyDate (Date) and SurveyMonth (Numeric). The code below would appear in the AFTER section of SurveyDate.

IF NOT SurveyDate = (.) THEN
ASSIGN SurveyMonth = MONTH(SurveyDate)
END


MONTHS Function

MONTHS

Function

Description

This function returns the number of months between <date1> and <date2>. If any of the variables or values included in the formula is not a date, the result will be null.

Syntax

MONTHS(<date1>, <date2>)

  • <date1> and <date2> are either variables or literals represented in date format.

Comments

If the date stored in <date1> is older than that in <date2>, the result will be the difference in months expressed as a negative number.

Examples

Example 1 (Analysis): Each patient's age in months is calculated using their date of birth and the date the survey was filled out.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE SurveyDate
ASSIGN SurveyDate = 05/15/200
DEFINE AgeMonths
ASSIGN AgeMonths = MONTHS(BirthDate, SurveyDate)
MEANS AgeMonths
LIST AgeMonths

Example 2 (Analysis): Each patient's age in months is calculated using their date of birth and the current date. The current date is represented by the system variable SYSTEMDATE.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE AgeMonths
ASSIGN AgeMonths = MONTHS(BirthDate, SYSTEMDATE)
MEANS AgeMonths
LIST AgeMonths

Example 3 (MakeView/Enter): The patient's age in months is calculated using their date of birth and the date the survey was filled out. The example assumes a View exists that has the following fields: DOB (Date), SurveyDate (Date), and Age (Numeric). The code below would appear in the AFTER section of the second date field to be filled in by the user.

IF NOT BirthDate = (.) AND NOT SurveyDate = (.) THEN
ASSIGN Age = MONTHS(BirthDate, SurveyDate)
END


NOT Operator

NOT

Operator

Description

This operator reverses the True or False value of the logical expression that follows.

Syntax

NOT [expression]

  • The expression represents any valid logical expression in Epi Info.

Comments

If the value of an expression is True, Not returns the value False. If the expression is False, Not <expression> is True.

Example

In the code below, the variable NoVanilla is assigned true only if the expression Vanilla = (+) is not true.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE NoVanilla
IF NOT Vanilla = (+) THEN
NoVanilla = (+)
ELSE
NoVanilla = (-)
END
FREQ NoVanilla Vanilla

The resulting values of Vanilla and NoVanilla after running the example code:

VANILLA | NOVANILLA
Yes | No
No | Yes


NUMTODATE Function

NUMTODATE

Function

Description

This function transforms three numbers into a date format.

Syntax

NUMTODATE(<year>, <month>, <day>)

  • The <year> represents a numeric variable or a number representing the year.

  • The <month> represents a numeric variable or a number representing the month.

  • The <day> represents a numeric variable or a number representing the day.

Comments

If the date resulting from the conversion is not valid (e.g., December 41, 2000), the date is recalculated to the corresponding valid value (e.g., January 10, 2001). When <year> ranges between 0 and 29, it is represented as the respective year between 2000 and 2029, while values from 30 to 99 are represented as the respective year between 1930 and 1999. The oldest date that can be recorded is Jan 01, 100.

Day | Month | Year | Date Created
02 | 02 | 1999 | 02/02/1999
60 | 01 | 1999 | 03/01/1999
15 | 18 | 2000 | 03/18/2001
99 | 99 | 99 | 06/07/0107
20 | 74 | 74 | 08/20/1974

Example

The NUMTODATE function is used to create a date exactly 1 year, 20 days and 1 month ahead of each person's birthday.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE Day1
DEFINE Month1
DEFINE Year1
ASSIGN Day1= DAY(BirthDate)
ASSIGN Month1 = MONTH(BirthDate)
ASSIGN Year1 = YEAR(BirthDate)
DEFINE Date2
ASSIGN Date2 = NUMTODATE(Year1, Month1, Day1)
LIST Month1 Day1 Year1 Date2 BirthDateGRIDTABLE


NUMTOTIME Function

NUMTOTIME

Function

Description

This function transforms three numbers into a time or date/time format.

Syntax

NUMTOTIME(<hour>, <minute>, <second>)

  • The <hour> represents a numeric constant or variable representing hours.

  • The <minute> represents a numeric constant or variable representing minutes.

  • The <second> represents a numeric constant or variable representing seconds.

Comments

Time must be entered in 24-hour format. Invalid dates will be recalculated to the respective valid time. If the number of the hour exceeds 24, the resulting variable will have a date/time format and the default day 1 will be December 31, 1899.

Hour | Minute | Second | Time Created
00 | 00 | 00 | 12:00:00 AM
00 | 00 | 90 | 12:01:30 AM
15 | 84 | 126 | 04:26:06 PM
25 | 00 | 00 | 12/31/1899 1:00:00 AM
150 | 250 | 305 | 01/05/1900 10:15:05 AM
15999 | 7500 | 8954 | 09/21/1901 07:29:14 AM

Example

The NUMTOTIME function is used to create a time exactly 4 hours, 41 minutes and 15 seconds ahead of the current time.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE CurTime
ASSIGN CurTime = SYSTEMTIME
DEFINE Hour1
DEFINE Minute1
DEFINE Second1
ASSIGN Hour1 = HOUR(CurTime) + 4
ASSIGN Minute1 = MINUTE(CurTime) + 41
ASSIGN Second1 = SECOND(CurTime) + 15
DEFINE TimeFuture
ASSIGN TimeFuture = NUMTOTIME(Hour1, Minute1, Second1)
LIST CurTime TimeFuture


OR Operator

OR

Operator

Description

Returns true if one or the other or both expressions are true. If either expression evaluates to True, Or returns True. If neither expression evaluates to True, Or returns False.

Syntax

[logical expression] OR [logical expression]

  • [logical expression] represents any valid logical expression in Epi Info.

Example

Example 1 (Analysis): The below code will determine how many patients ate either chocolate or vanilla ice cream (or both). A value of true is assigned to all records where this criteria is met.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE IceCream
IF Vanilla = (+) OR Chocolate = (+) THEN
IceCream = (+)
ELSE
IceCream = (-)
END
FREQ IceCream

VANILLA | CHOCOLATE | ICE CREAM
Yes | Yes | Yes
No | Yes | Yes
Yes | No | Yes
No | No | No
Yes | Yes | Yes

Example 2 (Analysis): The CLASS field has two possible values in the drop-down list that can indicate the presence of tuberculosis. To make analysis easier, a new temporary variable is created that will show "True" if either one of those values is present in CLASS.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE TB

IF (Class = "B1") OR (Class = "B2") THEN
ASSIGN TB = "True"
ELSE
ASSIGN TB = "False"
END

LIST Class TB

Example 3 (Analysis): The below code will determine how many patients drank beverages. A value of true is assigned to all records where this criteria is met.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Drinks

IF Milk = (+) OR Water = (+) OR Coffee = (+) THEN
ASSIGN Drinks = "True"
ELSE
ASSIGN Drinks = "False"
END

LIST Drinks Milk Water Coffee
FREQ Drinks

Example 4 (MakeView/Enter): The OR operator is used to check for errors in the VisitDate field. If the visit date the user enters occurs in the future or prior to the patient's date of birth, then the person conducting the data entry has likely made a mistake. The example assumes a View exists that has the following fields: VisitDate (Date) and DateOfBirth (Date). The code below would appear in the AFTER section of the VisitDate field.

IF (VisitDate > SYSTEMDATE) OR (VisitDate < DateOfBirth) THEN
DIALOG "Warning: Invalid date detected."
CLEAR VisitDate
GOTO VisitDate
END


RECORDCOUNT Function

RECORDCOUNT

Description

This function returns the number of records in the current view. In Analysis, this takes into account any SELECT statement and value of the Process (Deleted) setting.

Syntax

RECORDCOUNT

Example

The code below checks to see whether or not any records exist in the current data set. If none exist, an error dialog is displayed and the Analysis module closes.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
IF RECORDCOUNT = 0 THEN
DIALOG "No records found."
QUIT
END


RND Function

RND

Function

Description

This function generates a random number between <min> and <max>.

Syntax

RND(<min>, <max>)

  • The <min> represents a number or numeric variable that corresponds to the lowest value of the random number to be generated.

  • The <max> represents a number or numeric variable that corresponds to the highest possible value for the random number to be generated.

Comments

The result is a decimal number. It can be converted to integers with the TRUNC function. RND can cause invalid results in Analysis. To avoid this, write out the variables containing random values and then read the new table.

Example

Three different sets of random numbers are generated. The first set will have a range between 1 and 100; the second set will have a range between 1 and 200; the third set will have a range between 500 and 800.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Random1
DEFINE Random2
DEFINE Random3
ASSIGN Random1 = RND(1, 100)
ASSIGN Random2 = RND(1, 200)
ASSIGN Random3 = RND(500, 800)
LIST Random1 Random2 Random3


ROUND Function

ROUND

Function

Description

This function rounds the number stored in the variable to the closest integer. Positive numbers are rounded up to the next higher integer if the fractional part is greater than or equal to 0.5. Negative numbers are rounded down to the next lower integer if the fractional part is greater than or equal to 0.5.

Syntax

ROUND(<variable>)

  • The <variable> can be an existing numeric variable, a defined variable containing numbers, or a numeric constant.

Comments

The results are returned in numeric format.

Differences Between ROUND and TRUNC
Value | TRUNC | ROUND
0.123456 | 0 | 0
7.999999999 | 7 | 8
45.455 | 45 | 45
90.50000 | 90 | 91

Example

The code below calculates the number of decades a person has lived through. Because of rounding, a 24-year old would have a "2" listed as 2.4 rounds down. However, a 25-year old would have a 3 listed, as 2.5 rounds up to 3.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
FREQ Age
DEFINE Decade
ASSIGN Decade = ROUND(Age / 10)
LIST Age Decade


SECONDS Function

SECONDS

Function

Description

This function returns the number of seconds between <time1> and <time2> in numeric format.

Syntax

SECONDS(<time1>, <time2>)

  • <time1> and <time2> are either variables or literals represented in time or date/time format.

Comments

If the date stored in <time1> is older than that in <time2>, the result will be the difference in seconds expressed as a negative number. Both variables must contain data in date, time or date/time format. If any of the variables or values included in the formula is not a date, the result is null.

Example

The incubation time for an unknown pathogen is calculated using the time the patient ate dinner and the time the patient presented with symptoms.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Incubation
ASSIGN Incubation = SECONDS(TimeSupper, DateOnset)
LIST Incubation TimeSupper DateOnset Age Sex Ill GRIDTABLE


SIN, COS, TAN Function

SIN, COS, TAN

Function

Description

These functions return the respective trigonometric value for the specified variable.

Syntax

SIN(<variable>)

COS(<variable>)

TAN(<variable>)

  • The <variable> can be an existing numeric variable, a defined variable containing numbers, or a numeric constant.

Comments

The variable is interpreted as the angle in radians. To convert degrees to radians, multiply by pi (3.1415926535897932) divided by 180.

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE SINA
DEFINE SINB
DEFINE COSA
DEFINE TANA
ASSIGN SINA = SIN(Age)
ASSIGN SINB = SIN(Age) * 3.14 / 180
ASSIGN COSA = COS(Age)
ASSIGN TANA = COS(Age)
LIST SINA SINB COSA TANA


STEP Function

STEP

Function

Description

This function returns 0 for all values of one expression less than a second, 1 for all values of the first expression greater than or equal to the second.

Syntax

STEP(<expression1>, <expression2>)

  • The <expression1> relates to a numeric expression.

  • The <expression2> relates to a numeric expression.

Comments

Introduced especially for use with COXPH procedures containing time-dependent covariates. However, may also be useful in some cases to avoid limitations on nested if statements.

Example

READ 'C:\Epi_Info\Sample.mdb':Addicts
DEFINE clinic1
ASSIGN clinic1 = clinic
COXPH Survival_Time_Days = (Clinic) : STEP(365,Survival_Time_Days) : (clinic1) : 1-STEP(365,Survival_Time_Days) : Methadone_dose__mg_day_ Prison_Record * Status ( 1 ) GRAPH=Clinic GRAPHTYPE="Survival-Observed"

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE agegrp
ASSIGN agegrp=trunc(age/5)+step(age,18)-step(age,20)
LIST age agegrp


STRLEN Function

STRLEN

Function

Description

This function returns the number of characters in a string.

Syntax

STRLEN(<variable>)

  • The <variable> represents a variable in text format.

Comments

This function cannot be used with non-string variables.

Examples

Example 1 (Analysis): The size of the Address field is displayed in the Analysis output window.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE AddrSize NUMERIC
ASSIGN AddrSize = STRLEN(Address)
LIST Address Size GRIDTABLE

Example 2 (MakeView/Enter): The View will auto-check to see if the user has entered enough information into the field. If the user enters less than 5 characters into the 'Address' field, the entry is likely incorrect and a warning dialog is displayed. This example assumes a View exists that has the following fields: Address (Text). The code below would appear in the AFTER section of Address field.

IF STRLEN(Address) < 5 THEN
DIALOG "Please verify the address is correct."
END


SUBSTRING Function

SUBSTRING

Function

Description

This function returns a string that is a specified part of the value in the string parameter.

Syntax

SUBSTRING(<variable>, <first>, <length>)

  • The <variable> represents a variable in text format.

  • The <first> represents the position of the first character to extract from the file.

  • The <length> represents the number of characters to extract.

Comments

This function cannot be used with non-string variables.

Examples

Example 1 (Analysis): The area code of one of the View's phone number fields is extracted and assigned to a new temporary variable.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE RepAreaCode TEXTINPUT
ASSIGN RepAreaCode = SUBSTRING(Reptphone, 1, 3)
LIST RepAreaCode Reptphone GRIDTABLE

Example 2 (Analysis): A portion of the patient's ID number is extracted from the BOH field. The FORMAT function must be used to convert the data stored in BOH to text format before it can be processed using the SUBSTRING function.

READ 'C:\Epi_Info\Refugee.mdb':viewPatient
DEFINE ID TEXTINPUT
ASSIGN ID = FORMAT(BOH, "###")
ASSIGN ID = SUBSTRING(ID, 3, 2)
LIST ID BOH


SYSTEMDATE Function

SYSTEMDATE

Function

Description

This function returns the date stored in the computer's clock.

Syntax

SYSTEMDATE

Comments

The SYSTEMDATE cannot be changed (assigned) from Analysis. To use the SYSTEMDATE for computations, a new variable must be defined.

Examples

To calculate next week's date:

Example 1 (Analysis): The date that occurs seven days ahead of the current date is listed in the Analysis output window.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE FutureDate
ASSIGN FutureDate = SYSTEMDATE + 7
LIST FutureDate

Example 2 (MakeView/Enter): The patient's date of birth is checked against the current system date in order to catch data entry errors. For example, personnel may accidentally enter 10/20/2090 instead of 10/20/2009 for a newly-born child. The example assumes a View exists that has the following fields: DOB (Date). The code below would appear in the AFTER section of the DOB field.

IF DOB > SYSTEMDATE THEN
DIALOG "Date of birth cannot be a future date."
GOTO DOB
END


SYSTEMTIME Function

SYSTEMTIME

Function

Description

This function returns the time stored in the computer’s clock at the time the command is executed.

Syntax

SYSTEMTIME

Comments

The SYSTEMTIME cannot be changed from Analysis (assigned). To use the system time for computations, a new variable must be defined.

Example

To calculate a time two hours after the current time:

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE Now
ASSIGN Now = SYSTEMTIME
LIST Now
DEFINE Later
ASSIGN Later = SYSTEMTIME + (120 / 24 / 60)
LIST Now Later


TRUNC Function

TRUNC

Function

Description

This function removes decimals from a numeric variable, returning the integer part of the number. This follows the same logic as rounding toward zero.

Syntax

TRUNC(<variable>)

  • The <variable> can be an existing numeric variable, a defined variable containing numbers, or a numeric constant.

Comments

The result will be returned in numeric format.

Examples

Example 1 (Analysis): Each person in the Oswego View is categorized by age in 10-year increments.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE AgeRangeTemp NUMERIC
DEFINE AgeRange TEXTINPUT
ASSIGN AgeRangeTemp = TRUNC(Age / 10) * 10
ASSIGN AgeRange = FORMAT(AgeRangeTemp, "0") & " to " \
& FORMAT(AgeRangeTemp + 9, "0")
LIST AgeRange AgeRangeTemp Age GRIDTABLE

Example 2 (Analysis): Each person in the Oswego View is categorized by age. Those under 30, the age categories increment by 5; for those over 30, the categories increment by 10.

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE AgeRange

IF Age < 30 THEN
ASSIGN AgeRange = TRUNC(AGE / 5) * 5
ELSE
ASSIGN AgeRange = TRUNC(AGE / 10) * 10
END

LIST Age AgeRange GRIDTABLE


TXTTODATE Function

TXTTODATE

Function

Description

This function returns a date value that corresponds to the string.

Syntax

TXTTODATE(<variable>)

  • The <variable> represents a variable in text format.

Comments

The text variable can be in any format that can be recognized as a date (e.g. "Jan 1, 2000", "1/1/2000").

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Date1
ASSIGN Date1 = "05/20/2010"
DEFINE Date2
ASSIGN Date2 = TXTTODATE(Date1)
LIST Date1 Date2
DISPLAY DBVARIABLES


TXTTONUM Function

TXTTONUM

Function

Description

This function returns a numeric value that corresponds to the string.

Syntax

TXTTONUM(<variable>)

  • The <variable> represents a variable in text format.

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE Var1
ASSIGN Var1 = "12345"
DEFINE Var2
ASSIGN Var2 = TXTTONUM(Var1)
LIST Var1 Var2
DISPLAY DBVARIABLES


UPPERCASE Function

UPPERCASE

Function

Description

This function returns a string (text) variable that has been converted to uppercase.

Syntax

UPPERCASE(<variable>)

  • The <variable> represents a variable in text format.

Comments

Only lowercase letters are converted to uppercase; all uppercase letters and non-letter characters remain unchanged.

Example

The field LastName is converted to uppercase.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE LastNameUpper
ASSIGN LastNameUpper = UPPERCASE(LastName)
LIST LastNameUpper LastName


XOR (eXclusive OR) Operator

XOR (eXclusive OR)

Operator

Description

This operator performs a logical exclusion on two expressions.

Syntax

[logical expression] XOR [logical expression]

  • The [logical logical] represents any valid logical expression in Epi Info.

Comments

If one, and only one, of the expressions evaluates to True, the result is True. However, if either expression is Null, the result is also Null. When neither expression is Null, the result is determined according to the following table:

If expression1 is | And expression2 is | Then result is
True | True | False
True | False | True
False | True | True
False | False | False

Example

READ 'C:\Epi_Info\Sample.mdb':viewOswego
DEFINE IceCream
IF Vanilla = (+) XOR Chocolate = (+) THEN
ASSIGN IceCream = (+)
ELSE
ASSIGN IceCream = (-)
END
LIST Vanilla Chocolate IceCreamGRIDTABLE

VANILLA | CHOCOLATE | ONEICECREAM
Yes | Yes | No
No | Yes | Yes
Yes | No | Yes
No | No | No
Yes | Yes | No


YEAR Function

YEAR

Function

Description

This function extracts the year from a date.

Syntax

YEAR(<date>)

  • <date> is either a variable or literal represented in date format.

Comments

The date argument is any expression that can represent a date. If the date variable contains null, null is returned.

Examples

Example 1 (Analysis): The year the survey occurred is extracted from the SurveyDate variable. The year is then used to create a graph showing the number of events per year.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE EventYear
ASSIGN EventYear = YEAR(EventDate)
MEANS Year
GRAPH EventYear GRAPHTYPE="Bar" TITLETEXT="Events by Year"

Example 2 (MakeView/Enter): The year component of the field SurveyDate is assigned to another field named SurveyYear. The example assumes a View exists that has the following fields: SurveyDate (Date) and SurveyYear (Numeric). The code below would appear in the AFTER section of SurveyDate.

IF NOT SurveyDate = (.) THEN
ASSIGN SurveyYear = YEAR(SurveyDate)
END


YEARS Function

YEARS

Function

Description

This function returns the number of years from <date1> to <date2> in numeric format. If any of the variables or values included in the formula are not a date, the result will be null.

Syntax

YEARS(<date1>, <date2>)

  • <date1> and <date2> are either variables or literals represented in date format.

Comments

If the date stored in <date1> is more recent than that in <date2>, the result will be the difference in years expressed as a negative number.

Examples

Example 1 (Analysis): The patient's age is calculated using the date of birth and the date the survey was last updated.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE SurveyDate
ASSIGN SurveyDate = 05/15/2011
DEFINE AgeYears
ASSIGN AgeYears = YEARS(BirthDate, SurveyDate)
MEANS AgeYears
LIST AgeYears

Example 2 (Analysis): The patient's age is calculated using the date of birth and the current date. The current date is represented by the SYSTEMDATE variable.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE AgeYears
ASSIGN AgeYears = YEARS(BirthDate, SYSTEMDATE)
MEANS AgeYears
LIST AgeYears

Example 3 (MakeView/Enter): The patient's age is calculated using the date of birth and the date the record was last updated. The example assumes a View exists that has the following fields: DOB (Date), SurveyDate (Date), and Age (Numeric). The code below would appear in the AFTER section of the second date field to be filled in by the user.

IF NOT BirthDate = (.) AND NOT SurveyDate = (.) THEN
ASSIGN Age = YEARS(BirthDate, SurveyDate)
END

Example 4 (MakeView/Enter): The patient's age is calculated using the date of birth and a literal date. The example assumes a View exists that has the following fields: DOB (Date) and Age (Numeric). The code below would appear in the AFTER section of the BirthDate field.

IF NOT BirthDate = (.) THEN
ASSIGN Age = YEARS(BirthDate, 06/04/2010)
END

Example 5 (Analysis): The patient's age is calculated using the date of birth and either the lab date or the event date, depending on whether or not lab date is blank. If the lab date is not blank, the lab date is used to calculate age; otherwise, the event date is used.

READ 'C:\Epi_Info\Sample.mdb':viewSurveillance
DEFINE SurveyDate

IF NOT LabDate = (.) THEN
ASSIGN SurveyDate = LabDate
ELSE
ASSIGN SurveyDate = EventDate
END

DEFINE AgeYears
ASSIGN AgeYears = YEARS(BirthDate, SurveyDate)
MEANS AgeYears
LIST AgeYears


Match Fields

The fields displayed on this dialog are the text fields created from your View. From the right-hand side of the screen, select a value from the drop-down list. At least two fields must exist; one which holds the selection code and one which receives the value of the code. The first field holds the selection code in a drop-down menu, and the second (or third, etc.) is a Read Only field which populates based on assignments set in the code table.

  1. Select the required drop down field to be linked to the code table.

  • Once a link is selected, the OK button becomes active.

  2. Click Preview Table to look at the link association. The preview will allow you to see how the table looks and determine if you want to keep your selection or make a different one. Click Back to return to the Match Fields dialog box.

  3. Create additional links using the View Fields and Table Fields drop down menus.

  4. Click Link to add the matches to the Associated Link Fields list box.

  • Links can be deleted by selecting from the list and clicking Unlink.

  • Fields removed from the Link list box return to the View Fields and Table Fields drop down menus.

  5. Click OK to accept the Match Field selection. The Code Table selection appears in a grid format for review.

  6. Click OK to accept the selection or click Back to return to the Match Field dialog box and edit the code table selections.


Navigate the Epi Info Menu

Open the Epi Info Menu by clicking Edit > Edit This Menu from the main page navigation menu.

The Epi Info Menu module consists of five basic elements that allow the user to customize the Epi Info main page format. The five basic elements are listed next.

  • The Title follows the MENU command and allows you to create a unique title for customized Epi Info Menu module. To enter a title, place your cursor in the MENU command string and type.

  • The Pop-up menu items allow you to define the main menu that appears on the Epi Info main page. Enter POPUP commands or MENUITEM commands to define the pull-down menus on the main menu.

  • The Button element allows you to create buttons on the Epi Info main page with the caption ItemText and the locations given as percentages of screen width and height.

  • The Screen Text element allows you to add custom text to the Epi Info main page using your choice of size, color, font, and style. You can also specify the location of the text using horizontal and vertical positioning. Note that screen text is optional and has no associated command blocks.

  • The Command Blocks allow you to enter menu items used to create and execute DOS or Window commands. Commands in command blocks are executed when a menu item or button is chosen that refers to the block. Command blocks must have Begin and End statements to be properly executed. If the Begin and End statements are missing, results are unpredictable. Command blocks can also be used to set variables, replace text in Analysis program fragments, execute other modules to run analyses, and to display reports or maps of analytical results.


Select a Vocabulary

Select a Select a Vocabulary

  1. Select File > New. The Create or Open Project dialog box opens.

  2. Select a Vocabulary (.mdb) file and click OK. The Name the View window for the selected Vocabulary file opens.

  3. Enter a View name and click OK.

  4. Click Vocabulary. The Vocabulary panel opens.

  5. Click the plus sign next to the Vocabulary domain to expand the menu.

  6. Select a vocabulary question and drag it on the MakeView workspace screen.


Analysis Commands

ASSIGN

BEEP

CANCEL SELECT/SORT

CLOSEOUT

CMD

COMMENTS (*)

COXPH

DEFINE

DEFINE DLLOBJECT

DELETE FILE/TABLE

DELETE RECORDS

DIALOG

DISPLAY

EXECUTE

FREQ

GRAPH

HEADER

HELP

IF THEN ELSE

KMSURVIVAL

LIST

LOGISTIC

MAP

MATCH

MEANS

MERGE

PRINTOUT

QUIT

READ

RECODE

REGRESS

RELATE

REPORT

ROUTEOUT

RUNPGM

SELECT

SET

SUMMARIZE

SORT

TABLES

TYPEOUT

UNDEFINE

UNDELETE RECORDS

WRITE


Check Commands

ALWAYS

ASSIGN

AUTOSEARCH

BEEP

CLEAR

COMMENTS (*)

DEFINE

DEFINE DLLOBJECT

DIALOG

EMIT

ENDBEFORE

EXECUTE

GOTO

HELP

HIDE, UNHIDE

IF THEN ELSE

QUIT


Menu Commands

ASSIGN

BROWSER

BROWSERSIZE

BUTTON

CALL

COMMAND BLOCKS

COMMENTS (*)

DEFINE

DIALOG

EXECUTE (LINKTO or ACTIVATE)

EXIT (QUIT)

FILEDIALOG

GETPATH

HELP

IF THEN ELSE

LINK

LINKREMOVE

MENU

MENUITEM

MOVEBUTTONS

ONBROWSEREXIT

PICTURE

PICTURESIZE

POPUP

REPEAT UNTIL

REPLACE FROM, TO

SCREENTEXT

SETBUTTONS

SETDBVERSION

SETDOSWIN

SETINIDIR

STARTUP AND SHUTDOWN

SYSINFO

UNDEFINE

WAITFOR

WAITFOREXIT

WAITFORFILEEXISTS


Comments (*) (Analysis Reference)

Analysis Command

Description

This command allows for the entering of user-defined comments identifying tasks or defining variable names for the programmer.

Syntax

* <text>

  • The <text> represents any comment.

Comments

The * character must be placed in the first column of a line to be recognized as comment mark. For comments longer than one line, the * character should be added for each new line. Use comments to disable commands.


BOOLEAN Operators

Boolean operators are used in logical expressions as in IF/THEN or SELECT commands. A logical expression is the result of a comparison operation or a Boolean combination of logical expressions.

  • The AND operator performs logical conjunction on two Boolean expressions. That is, if both expressions evaluate to True, then the AND operator returns True. If either or both expressions evaluate to False, then AND returns False. When boolean variables are added in an expression, true values shall be represented by +1 and false values by 0 regardless of the underlying values in the data source.

  • The OR operator performs logical disjunction on two Boolean Expressions. If either expression evaluates to True, OR returns True. If either expression evaluates to True, OR returns True. If neither expression evaluates to True, OR returns False.


Date Operators

DAY

DAYS

MONTH

MONTHS

YEAR

YEARS


Numeric Operators

ABS

EXP

LN

LOG

NUMTODATE

NUMTOTIME

RND

ROUND

SIN, COS, TAN

TRUNC


() Parentheses

Parenthetical Expressions are often used to determine an execution order of operations that differs from the order determined by operator precedence.

Consider this example: X = Z * Y + 4

In this example, Z is multiplied by Y, and then the result is added to 4. What if the Y needed to be added to the 4 before multiplying by Z?

In such a case, the normal operator precedence can be altered using parentheses. Enclosing an expression in parentheses, forces that expression to be evaluated first, regardless of operator precedence.

To force the above expression to evaluate addition first, rewrite the example as follows: X = Z * (Y + 4)

The value of Y is now added to 4, and that sum is multiplied by Z.

Expressions can be nested in multiple levels of parentheses to enforce precedence further. The expressions most deeply nested in parentheses are granted primary precedence, followed by less deeply nested expressions, and so on.

Consider the following example: X = (Z * 4) ^ (Y * (Z + 2))

Here, Z + 2 has primary precedence, then the other parenthetical expressions. Exponentiation, which normally has higher precedence than addition or multiplication, evaluates last in this example because the other expressions are enclosed in parentheses.


System Operators

ENVIRON

EXISTS

FILEDATE

RECORDCOUNT

SYSTEMDATE

SYSTEMTIME


Text Operators

FINDTEXT

FORMAT

STRLEN

SUBSTRING

TXTTODATE

TXTTONUM

UPPERCASE


Time Operators

HOUR

HOURS

MINUTE/MINUTES

SECOND/SECONDS


Exit Command (Menu Reference)

EXIT (QUIT)

Menu Command

Description

This command closes the current program.

Syntax

EXIT

  • Closes the current menu. EXIT does not necessarily close programs that have been started by the menu in other windows. Those must be closed manually.

Comments

EXIT and QUIT have the same functionality.

Example

CloseFile
Begin
EXIT
End


Epi Info Limitations

Epi Info inherits some limitations from the Windows environment and from microcomputers in general. A fairly fast processor (200 MHz or faster) is required for fast operation. For slower processors in particular, increasing Random Access Memory (RAM) beyond 32 or 64 megabytes will speed up program operation.

Specific limitations in Epi Info include:

Limitation | Description
Number of fields per Questionnaire or View | A Microsoft Access table is limited to 255 fields, but Epi Info automatically creates additional related Views to remove this limitation.
Number of records in a data table | There is no limit on the number of records allowed; however, there is a one gigabyte file size limit.
Number of tables in an .mdb database file | There is no limit on the number of tables allowed; however, there is a two gigabyte limit for an .mdb database file.
Number of characters in a text field | 255
Number of characters in a multiline field | The limit of a multiline field is one gigabyte.


Epi Info Website

EI on the Web


Problem Resolution

Since many errors are not the fault of the user, and can result from circumstances outside the current program, we prefer to call them problems, and seek to resolve them as quickly as possible. Most of the programs in Epi Info contain a problem resolution module for handling errors. When a problem arises that cannot be resolved by the program automatically, the There is problem... dialog box appears.

The number and description of a Microsoft Visual Basic Error is displayed. At this point, several options are available. You can choose to BYPASS the error and see if the program functions normally. If the problem is a corrupt data file, for example, this may allow you to continue work. Sometimes a number of problem messages will occur one after the other, but clicking on BYPASS for each will eventually allow you to return to safe ground. If not, then choosing CLOSE PROGRAM terminates the current program. You may lose work that has not been saved, but this may be necessary if BYPASS does not work. Since Enter and MakeView save each page automatically, the loss should not be great.

If a problem occurs repeatedly, further information can be obtained from the Problem module by choosing HISTORY or SYSTEM INFORMATION. HISTORY gives a list of the internal program functions that were called prior to the occurrence of the problem. The list may be helpful to the Epi Info programming team in resolving a problem. SYSTEM INFORMATION brings up a Windows function that provides a huge amount of information about the Windows operating system as it exists on the current computer at the time of the problem. SYSTEM INFORMATION can be used to determine the name, version, and date of all the Dynamic Linked Libraries (DLLs) on the computer, for example. SYSTEM INFORMATION is also available under SETTINGS on the main Epi Info menu.

If all else fails and a Windows program is hopelessly locked up, the time-honored Ctrl-Alt-Delete key combination should bring up a Windows dialog that shows what programs are running. It may indicate that one is not responding, and allow the program to be terminated. It may also indicate that there are several instances of a single program in memory, and allow you to terminate the extra ones. This can be useful in resolving mysterious problems in writing to a file, caused by the fact that it is already being accessed by another copy of the same program.

Windows and DOS files have an attribute that can be set to Read-Only. This protects the file from changes, but also prevents its use as a database and prevents replacing it by copying another file of the same name into the same folder. To see the attributes of a file, use My Computer on the Windows desktop to find the file, right-click on the icon or name, and choose Properties. A check box in the property window indicates whether the file is Read-Only. Clicking in the check box will change the status to unchecked or writable. A grayed-out check mark means that some, but not all, of the files selected before the right click had read-only attributes set. In My Computer, Ctrl-A can be used to select all files within the current folder; you can then right-click and choose Properties to examine the status of all files in the folder.

Before contacting the Epi Info Helpline, it is reasonable to reboot Windows to see if a problem is resolved. It is also a good idea to ascertain that other programs are operating properly on the same computer, and that the Local Area Network to which you may be connected is not having temporary problems.

If these steps do not resolve the problem, contact information for the Epi Info Helpline is provided on the title page of this manual. Careful notes on the problem and on the computer environment in which Epi Info is installed will help in problem resolution. When reporting problems, please include the date of the Epi Info distribution version found on the bottom of the main menu.


Enter Data Window

The Enter menu bar provides single-click access to the resources used most often in the Enter module.

File Menu Options

  • Open allows the access of a previously created project.

  • Close exits the current project leaving the Enter Data module open.

  • Save copies the current project to a file on the computer's main memory or other desired storage medium.

  • Compact Database opens the Compact dialog box and allows access to the Compact Utility functions.

  • Print produces a paper copy of the current page using the selected printer.

  • Exit closes the Enter Data module.

  • The recently used file list updates each time a new file is opened in the Enter module. The recently used file list holds up to four files for easy access.

Edit Menu Options

  • Find opens the Find Records window and allows currently entered records and variables to be searched.

  • Delete removes the current record from the project and all records associated with it. This action does not delete the record, but marks it as deleted.

Options Menu Options

  • Yes/No Fields allows the selection of a yes/no value to be set as Yes/No or True/False.

  • Full Screen maximizes the Enter Data window. To return to a standard View, click Options > Standard Screen. Screen height and width adjusts to fit the page regardless of the Windows task bar location.

Help Menu Options

  • Contents lists the help topics available for the program and contains separate navigation to individual help topics.

  • Command Reference lists and defines all the commands that are used in the program.

  • About Enter describes the Enter Data module and gives information on the Epi Info for Windows version in use.


Navigate the Page and Record Panel

Use the Page panel to navigate pages in your View. Navigation buttons provide access to new, previous, next, first, and last records, and to their related tables. The Page panel displays a list of pages that have been created in the current project.

Page and Record Panel

  • Click New to open a new record for data entry.

  • Click Save Data to save changes or entries to the Enter page. When a page is completed, the data values that were entered on the page are automatically saved for that page. The Save Data button can be used to save data while still entering information on the page.

  • Click Mark Record as Deleted to delete a record from the data table. Once this button is clicked, the Undelete button appears in its place. Records are not permanently deleted from the database. They are logically deleted—marked as deleted to deactivate them. Records can be re-activated by clicking Undelete. Deleted records do not appear in searches unless SET PROCESS = BOTH or SET PROCESS = DELETED is issued in the Analysis module.

  • Click Find to search records in the data table.

Use the Arrows at the bottom of the Enter Page Panel to move between Records

  • Single arrows move one record forward or backward.

  • The F7 and F8 function keys also move one record forward or backward.

  • Double arrows move to the first or last record.

  • Type a specific record number in the Record field and press Enter to go directly to a record.


Navigate Parent and Related Forms

The Home and Back buttons do not appear in the Page and Record Panel unless a related View is open. The Home and Back buttons move data entry to and from parent and related forms. If there are parent and child related records, the Next button also displays to navigate through the parent child forms.

  • Click Home to return to the main date entry form.

  • Click Back to display the parent of the current form.

  • In a two-level hierarchy, both buttons return to the main data entry form. In a hierarchy of three or more levels, the Home button returns to the main data entry form and the Back button moves up one level to the parent of the current form.


Average or Mean

The mean of a set of data is equal to the sum of the data divided by the number of items in the data set.


Bar Graph

Bar Graphs are use to compare single events and the differences between them using a bar for each data set. Bar Graphs group data together according to categories, displaying a bar for each value in that category. Bar lengths represent quantities in a set of data. The bars are color-coded according to the series represented. Bar graphs can be used to compare data sets against some variable data such as time or frequency.


Box-Whisker Graph

Box Whisper example

Box-Whisker plots are commonly used to show the minimum, maximum, median, and lower and upper quartiles for a particular group. The caps at the end of each box indicate the extreme values (minimum and maximum).


Chebyshev's Rule and The Empirical Rule

Use these rules to determine if a data value should be considered too far from the rest of the normal data values.

Chebyshev's Rule - any shape frequency distribution

  • It is possible that very few of the data points will fall within 1 standard deviation of the mean.

  • At least three-fourths of the data points will fall within 2 standard deviations of the mean.

  • At least eight-ninths of the data points will fall within 3 standard deviations of the mean.

The Empirical Rule - mound shaped frequency distributions

  • Approximately 68% of the data points will fall within 1 standard deviation of the mean.

  • Approximately 95% of the data points will fall within 2 standard deviations of the mean.

  • Essentially all of the data points will fall within 3 standard deviations of the mean.


Hi-Low Graph

Hi-Low graphs display 2 or 3 Y-values for each X-value. The first two Y variables determine the start and end of a vertical bar, the third (if present) locates a tick mark. Hi-Lo graphs are typically used to display a confidence range or the trading range of a stock. The range of Y-values represent the low and the high values for the given X value.


Histogram Graph

A histogram is a type of bar graph used for displaying frequency (in count or percent) on the Y axis for a numeric X variable whose range is segmented into "bins" of equal size. Multiple series can be displayed either side-by-side or stacked.


Line Graph

Line graphs are used to determine trends and cyclic variation based on interaction of data elements. The data points are plotted on the graph and connected with lines. Line graphs can display large amounts of data that vary along some accepted sequence such as time, temperature, price etc.

Line graphs with multiple lines can be used to display several variables to conserve space and to facilitate comparison of more than one dependent variable on a single independent scale.

Line graphs must have numeric variables for both X and Y axes, and the X variable values are treated as continuous, not discrete. To generate a line graph utilizing categorical X variables, use a Bar graph and then customize the graph style to Line.


Moving Average Graph

Moving Average example

A moving average is an average taken over a specified number of periods where the number of specified periods remains fixed but the numbers being averaged change. The numbers change because as the latest number is added, the earliest number is discarded thus maintaining the same number of specified periods to be averaged.


Pareto Graph

Pareto graphs are used to determine the "vital few" factors that are responsible for the major part of a problem or a solution. Pareto graphs consist of a combination bar graph and a line graph. The bars represent percentages of the data set and the line displays a cumulative total of the bar percentages. The X axis values are sorted in order of their corresponding Y values, highest first.


Best Fit Line

Best-Fit-Line illustrates how to fit the "best" straight line to a given set of data points. It is calculated from the least-squares-approximations of the data set.


Histogram

Histogram or Frequency Distribution

  • A histogram is a graphical representation of the frequency (number of occurrences) of data values within small data ranges (classes) which are created by dividing the total range of data into 5 to 20 equal subintervals.

  • The most common histogram form is the Bell-Curve also known as a Normal Distribution.

  • Histogram is a valuable tool in that it allows one to see how data values are distributed throughout the range of the data set. Outlier's (the number of data values that are either much smaller or larger than the rest of the data values) are quickly recognized.

  • The Histogram plotting method displays a histogram of the data that is currently selected. The Histogram is most meaningful with larger data sets (at least 15 data points). If the Histogram is for only one subset, then bars represent the number of occurrences. If the Histogram is for multiple subsets, then lines represent the different frequency distributions.


Standard Deviation

  • The standard deviation is defined as the positive square root of the variance of a data set.

  • The variance for a data set of n items is equal to the sum of the squared distances from the mean divided by (n-1).

  • Think of the standard deviation as the average of all distances of each data point from the mean.


Pie Graph

Pie graphs are used for proportional assessment by comparing data elements as percentages or counts against other data elements and against the sum of the data elements. A pie graph is a circular graph having wedges dividing the circle into sectors that are proportional in area to the quantities of the data sets represented.


Points Graph

Point graphs are similar to bar graphs except that each data point is indicated by a marker located where the top center of the bar would have been.


Polar Graph

Polar graphs plot data on a circular grid, with X data represented by the angle and Y data as the radius.


Pyramid Graph

A pyramid graph is normally used to graph population by age and sex, but can be used with any 2-series data. The graph consists of horizontal bars emerging from a vertical line representing zero. One series is plotted to the left and the other to the right. Using the graph type Pyramid without a CrossTab generates a horizontal Bar graph.


Rotated Bar Graph

Rotated Bar example

A rotated bar graph is similar to a bar graph except the bars are horizontal rather than vertical.


Scatter 3D Graph

Scatter 3D example

The scatter graph consists of plotted points "scattered" around an X-Y-Z grid. The pattern may reveal a relationship among the three variables measured by the X, Y, and Z axes.


Scatter XY Graph

Scatter XY example

A scatter graph consists of plotted points "scattered" around an X-Y grid. The pattern may reveal a relationship between the two variables measured by the X and Y axes. Using the customization screen, it is possible to add a regression curve.


Spline Graph

A spline graph connects data points with a smooth curve.


Stacked Bar Graph

Stacked Bar example

Stacked Bar graphs are used in the same manner as non-stacked bar graphs except that the Y values from each series are accumulated as each new series is plotted. The bars are stacked on the end of the previous bar with each separate series color-coded.


Stacked Histogram

Stacked Histogram example

A histogram is a type of bar graph used for displaying frequency (in count or percent) on the Y axis for a numeric X variable whose range is segmented into "bins" of equal size. In this graph type, multiple series are displayed stacked.


Step Graph

The step graph displays one or more series of data as steps in a line.


Supported Graph Types

Bar Graph

Box-Whisper Graph

Hi-Low Graph

Histogram Graph

Line Graph

Moving Average Graph

Pareto Graph

Pie Graph

Points Graph

Polar Graph

Pyramid Graph

Scatter 3D Graph

Scatter XY Graph

Spline Graph

Stacked Bar Graph

Stacked Histogram Graph

Step Graph


Axis Tab

Axis tab options are available based on the type of graph created. The Axis tab allows the control of the axis type and range. Depending on the graph type, the X, Y, or both axes will be available for customization.

Axis tab Customization dialog box

Y or X Axis

Linear or Log range controls are provided. Epi Graph automatically determines Min and Max based on data. The Min and Max for each axis can also be set manually using the Min and Max fields.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


Color Tab

Color tab options are available based on the type of graph created. Graphs are supported by two sets of color parameters: a Monochrome color set and a Color Option color set. The color sets available depend on the Viewing Style selected from the General tab.

To Adjust Colors

  1. Select the desired attribute from the Graph Attributes section. The corresponding color for that attribute is highlighted in the color selection grid.

  2. To change the color, either use the mouse to click an alternate color, or use the keyboard arrow keys to move to adjacent colors. As the highlighted color selection changes position, the sample image is updated with the newly selected color.

Epi Graph Color Tab

Desk Foreground

This is the color that is used when placing text onto the Desk Background. This includes the main title, subtitle, subset labels, grid numbers, and axis labels.

Desk Background

This is the color that surrounds the bounding rectangle of the graph grid.

Shadow Color

The rectangle that makes up the graph's grid is bounded at the bottom/right edges with shadows. To remove the shadows, choose the same color as the Desk Background.

Graph Foreground

This is the color used for the bounding rectangle of the grid, and the grid-lines. For 3D graphs, this is the color used for the X, Y, and Z axis grid lines and bounding boxes.

Graph Background

This is the color used as the background color of the graph grid.

Table Foreground

This is the color used for the bounding rectangle of the table and the table grid-lines.

Table Background

This is the color used as the background color of the graph table.

X and Z Axis Plane

Available for 3D graphs, this is the color used in filling the graph’s lower rectangle.

Y Axis Plane

Available for 3D graphs, this is the color used in filling the graph’s two Y axis back rectangles.

Quick Styles

Bitmap/Gradient Styles contain built-in bitmaps and predefined gradients which are applied by selecting the checkbox and then choosing a palette from a selection of Light, Medium, or Dark color sets. Quick Style options are also available through the graph pop-up menu. To choose a Quick Style, right clicking a graph and select Viewing Style.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


Epi Graph Menus

File Options

  • Save Templates saves the current graphs customizable properties to a template file. This file can be used in the Analysis Graph command to apply the property values saved in the template file to the graph being created.

  • Export Graphs opens the Exporting dialog box.

  • Print Graphs sends the current graph to the default printer.

  • Print All for multiple graphs, sends all the graphs to the default printer.

  • Exit closes Epi Graph and embeds the graph in the Output window.

Edit Options

  • Copy to Clipboard allows the placing of an image from the currently selected graph to the clipboard. The image can then be pasted into another application.

View Options

  • Customization opens the Customization dialog box.

  • Set Y Axis Style opens a list box for the selection of a Y Axis style, for example Grid Only, No Grid Numbers, or Axis Labels.

Help Options

  • Contents opens the online help for Epi Graph.

  • About opens the About Epi Graph window with information about the application.


Font Tab

Font tab options are available based on the type of graph created. Graphs use True Type fonts because they are scalable.

Epi Graph Font tab

Main Title and Subtitle

To apply fonts to title fields, select a font from the drop-down list. Style selection includes bold, italic, and underline.

Labels

To apply fonts to label fields, select a font from the drop-down list. Style selection includes bold, italic, and underline. Labels include X axis, Y axis, X axis grid numbers or point labels, and Y axis grid numbers.

Tabled Data

To apply fonts to tabled data, select a font from the drop-down list.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


General Tab

General tab options are available based on the type of graph created.

Epi Graph General tab

Main Title and Subtitle

Title fields allow adding, editing, and deleting of main and subtitles. If no title is present, you can add one to the respective field. Removing all the characters from a title field deletes it from the image.

Border Style

Borders can be added to the outside edge of a graph. Border options include: No Border, Line, Shadow, or 3D Inset. Border Style options are also available through the graph pop-up menu. To choose a Border Style, right click a graph and select Border Style.

Viewing Style

Three viewing styles are supported: Color, Monochrome and Monochrome with Symbols. If fewer than four subsets are to be included in a graph, then the Monochrome setting is probably be the best choice. If four or more subsets are to be included in the graph, then Monochrome with Symbols will help distinguish the different subsets. Pie Charts have two viewing styles: Color or Monochrome. Color options are also available through the graph pop-up menu. To choose a Color option, right click a graph and select Viewing Style.

Font Size

Scientific Graphs support three font sizes, Large, Medium, and Small. Select a size that is most readable on the graph. When printing the graph, a font size of Medium or Small is suggested. There are occasions (mainly when attempting to generate an image for a highly rectangular graph) when the graph may automatically reduce the size of the font in order to produce a higher quality image. The font size of the text inside the table depends on the number of points, and the numeric precision of the output. The more points and higher precision that is attempted to be tabled, the smaller the font must be in order for the information to fit. Font Size options are also available through the graph pop-up menu. To choose a Font Size, right click a graph and select Font Size.

Show Annotations

If the graph contains annotations, they can be removed from or added to the graph by selecting the Show Annotations checkbox. If the graph does not contain annotations, this option is unavailable.

Numeric Precision

This feature is mainly used with 3D Scatter Graphs and controls the precision of data labels added to 3D scatter charts. However, it also controls the precision of data exported from the Export dialog. When placing information into a table, or exporting Text/Data from the Export dialog, the number of decimal positions can be between 0 to 7. Depending on the implementation, the maximum precision may vary. When placing data labels onto the graph, or exporting Text/Data from the Export Dialog, the number of decimal positions can be between 0 to 7. Depending on the implementation, the maximum precision may vary. Numeric Precision options are also available through the graph pop-up menu. To choose the Numeric Precision option, right click a graph and select Numeric Precision.

Grid Lines

By selecting a grid option, the graph's grid is placed in front of the data graphics. Otherwise, the data graphics are drawn on top of the graph's grid. A graph can contain vertical grid lines (Y), horizontal grid lines (X), both vertical and horizontal grid lines, or no grid lines. Grid Line options are also available through the graph pop-up menu. To choose a grid line, right click a graph and select Grid Options. The width and style of grid lines can also be selected from this menu.

Display

Graphs created from tabled information can display the graph, the table, or both the graph and the table on the same page. Display options are also available through the graph pop-up menu. To choose a display option, right click a graph and select Graph and/or Table.

Data Label Type

This option is available for pie graphs if the graphs's plotting method includes Data Labels. Depending upon the implementation, Data Labels are either numeric values, or text descriptors. When placing data labels next to the slices, or exporting Text/Data from the Export Dialog, the number of decimal positions can be between 0 to 3. Depending on the implementation, the maximum precision may vary.

Group Percentages

This option is available for pie graphs. It allows smaller percentages to be combined into one slice (Other). Percentages smaller than the selected are forced into the Other slice. This feature prevents sliver pieces that can cause the text percentage labels to crowd into each other.

Rotation Animation

This option is available for 3D graphs. This feature turns on or off the automatic image rotation. The direction and rotation increment is controlled from the More tab. If enabled, double clicking the 3D graph is an easy way of toggling this feature.

Show Bounding Box

This option is available for 3D graphs. This feature controls when a bounding box is added to a 3D image. Possible values include While Rotating, Always, or Never.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


Keyboard Control

The following keyboard commands are available in Epi Graph.

Keyboard Command | Description
SPACEBAR | Opens the Customization dialog box.
Q | Brings up the same pop-up menu as right clicking.
S | Switches between monochrome and color styles.
X | Opens the Exporting dialog box.
M | Maximizes the object to fit the screen.
P | Opens the Print dialog box.
D | Opens the Text/Data Export dialog box. Copies data to the clipboard. Can be pasted in text editor.


More Tab

More tab options are available for 3D Scatter graphs.

3D Rotation More tab

Rotation Detail

This feature controls the complexity of the image while the image is rotated.

  • Plotting Method draws graphs as normal but with no axes or labels.

  • Full does not limit image detail during rotation.

Plotting Method

Provides selection choices for what to display during rotation. Methods include Points, Line, or Points and Line.

Rotation Increment

This feature controls the increment of rotation while the object is automatically rotating (Rotation Animation from the General tab). Changing the increment changes the rotation speed and/or direction.

Values are:

  • 15 Increment 15 degrees with each new update.

  • 10 Increment 10 degrees with each new update.

  • 5 Increment 5 degrees with each new update.

  • 2 Increment 2 degrees with each new update.

  • Increment 1 degree with each new update.

  • -1 Decrement 1 degree with each new update.

  • -2 Decrement 2 degrees with each new update.

  • -5 Decrement 5 degrees with each new update.

  • -10 Decrement 10 degrees with each new update.

  • -15 Decrement 15 degrees with each new update.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


Maximization

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed.

  1. From the Customization dialog box, click Maximize to resize the graph to use the entire monitor display area.

  2. Press Esc on the keyboard to close the maximized window.


Plot Tab

Plot tab options are available based on the type of graph created. Many, but not all plotting styles can be set for a secondary comparison plotting style.

Epi Graph Plot Tab

Axes

If a graph has multiple Y axes, the plotting and comparison styles for each individual axis can be controlled by selecting the axis in the axis-button group.

3D

This feature allows the user to adjust 3D effects added to plotting methods. Possible values are: Off, Shadow, and 3D. Shadow places shadows behind bars, points, and the area of an area graph. 3D Bars and area charts are drawn in a 3D fashion. For pie graphs, Shadow adds shadows behind slices and 3D Slices are drawn in a 3D fashion. 3D options are also available through the graph pop-up menu. To choose the 3D option, right click a graph and select Data Shadows.

Mark Data Points

Selecting this checkbox causes circular marks to be placed at data point locations. Data Point options are also available through the graph pop-up menu. To choose Data Points, right click a graph and select Mark Data Points.

Plot Style

Available plot styles depend upon the graph type and data being graphed. Common plot styles include bar, spline, line, and points. Plot Style options are also available through the graph pop-up menu. To choose a plot style, right click a graph and select Plotting Method.

Comparison Plot Style

Available plot styles depend upon the graph type and data being graphed. Common plot styles include bar, spline, line, and points.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window, then apply customizations.


Points Tab

Points tab options are available based on the type of graph created. If the graph contains a data set with many points, then it may be hard to table or even graph all of the information at one time. Points to graph provides methods for viewing a smaller amount of points, thus making the information more readable

Epi Graph Points Tab

Points to Graph

When choosing the Sequential method, use the scroll bar to adjust the number of points to graph. If the number chosen is less than the total number of points, then a horizontal scroll bar is visible, allowing a scroll left and right through the rest of the data. When choosing the Selected method, use the list box to select the points to place in the graph.

Point Label Orientation

  • Auto Point Labels are either horizontal or vertical.

  • Vertical Point Labels are vertical.

  • Horizontal Point Labels are horizontal. If horizontal point labels are too small to read, then Vertical or Slanted orientation will force them larger.

  • Slanted Point Label are slanted/diagonal.

  • Point Label options are also available through the graph pop-up menu opened by right clicking a graph and selecting Point Label Orientation.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


Export to a Printer

The Print dialog box shows the default printer and its current orientation and paper bin. A new printer can be selected from the Printer drop-down list. If printer orientation, paper bin, or other printer option needs to be adjusted, click Setup to open the Printer Properties dialog box.

Printing Style Options

Depending on the printer selected, three printing style options are supported: Color, Monochrome, and Monochrome with Symbols. If fewer than four subsets are to be included in a graph, then the Monochrome setting are probably be the best choice. If four or more subsets are to be included in the graph, then Monochrome with Symbols will help distinguish the different subsets.


Statistics Refreshers

Average or Mean

  • The mean of a set of data is equal to the sum of the data divided by the number of items in the data set.

Standard Deviation

  • The standard deviation is defined as the positive square root of the variance of a data set.

  • The variance for a data set of n items is equal to the sum of the squared distances from the mean divided by (n-1).

  • Think of the standard deviation as the average of all distances of each data point from the mean.

Best Fit Line

  • Best-Fit-Line illustrates how to fit the "best" straight line to a given set of data points. It is calculated from the least-squares-approximations of the data set.

Histograms

  • A histogram is a graphical representation of the frequency (number of occurrences) of data values within small data ranges (classes) which are created by dividing the total range of data into 5 to 20 equal subintervals.

  • The most common histogram form is the Bell-Curve also known as a Normal Distribution.

  • Histogram is a valuable tool in that it allows one to see how data values are distributed throughout the range of the data set. Outlier's (the number of data values that are either much smaller or larger than the rest of the data values) are quickly recognized.

Chebyshev's Rule and The Empirical Rule

Use these rules to determine if a data value should be considered too far from the rest of the normal data values.

Chebyshev's Rule - any shape frequency distribution

  • It is possible that very few of the data points will fall within 1 standard deviation of the mean.

  • At least three-fourths of the data points will fall within 2 standard deviations of the mean.

  • At least eight-ninths of the data points will fall within 3 standard deviations of the mean.

The Empirical Rule - mound shaped frequency distributions

  • Approximately 68% of the data points will fall within 1 standard deviation of the mean.

  • Approximately 95% of the data points will fall within 2 standard deviations of the mean.

  • Essentially all of the data points will fall within 3 standard deviations of the mean.


Style Tab

Style tab options are available based on the type of graph created. The Style tab allows the control of subset color, subset line style, and subset point style.

To Adjust Style

  1. Select the desired subset from the list box. The corresponding color and possible line and point styles are then highlighted in the Point and Line Type drop-down lists.

  2. To change the color, either use the mouse to click an alternate color, or use the keyboard arrow keys to move to adjacent colors. Adjust the subset line and point styles as desired.

Epi Graph Style Tab

Point Type

Select from the drop-down list to alter the Point Type. Available types include circles, squares, triangles, diamonds, cross, or plus. The color of the point depends on the color selected from the color blocks.

Line Type

Select from the drop-down list to alter the width of lines on the graph. The color of the line depends on the color selected from the color blocks.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


Subsets Tab

Subset tab options are available based on the type of graph created. If the graph is currently displaying a table, then the table can include the subset(s) that are currently selected to be graphed, or all subset information that is included into the object. If All Subsets are being tabled then those subsets that are currently graphed are highlighted. If the table includes only those subsets that are graphed, and if permanent subsets are displayed along with scrolling subsets, then permanent subsets are highlighted. Scientific graphs can display up to 14 subsets at once; however, it is suggested that no more than three subsets be displayed at any one time.

To remove selected subsets from a graph, return the Scrolling Subsets slider to the maximum number of subsets (all the data in the graph) and click Apply.

Epi Graph Subsets Tab

Subsets to Graph and Scrolling Subsets

  • If nothing is selected in the list box and Scrolling Subsets equals zero, then the graph displays all subset information (14 subsets graph maximum, and no limit on the amount of subsets tabled).

  • If there are selections in the list box and Scrolling Subsets equals zero, then the graph displays only those subsets selected.

  • If nothing is selected in the list box and Scrolling Subsets is non-zero, then the graph scrolls through subset information by the amount defined by Scrolling Subsets.

  • If there are selections in the list box and Scrolling Subsets is non-zero, then the graph maintains those selected subsets as permanent subsets and revolves through the remaining subsets in increments of Scrolling Subsets.

Export

Opens the Exporting dialog box and allows the current graph to be exported as a graphic file or the data to be exported to the clipboard or a specified DAT file.

Maximize

Maximized graphs are for viewing only. Any customizations made to the graph from the maximized window will not be saved to the graph when the Maximize window is closed. Press Esc on the keyboard to close the maximized window.


Export Text/Data

Graph data can be exported in a text format.

  1. Create a graph in Analysis. Epi Graph opens.

  2. To open the Exporting dialog box:

  • Press the X on the keyboard.

  • Right click and select Export Dialog from the pop-up menu.

  • Open the Customization dialog and click Export from any tab.

Exporting dialog box

  3. From the Export section, select Text/Data.

  4. Select the Export Destination of Clipboard or File.

  5. Click Export. The Export dialog box opens.

Export dialog box

  6. From the Select Subsets and Points section, select All Data or Selected Data.

  • If Selected Data is chosen, the option to choose specific Subsets to Export and Points to Export is available from the list boxes.

  7. From the Export What section, select to export the Data or the Data and Labels.

  8. From the Data to Export section, select to export the Y Axis Value or the Point Number, Y Axis Value.

  9. From the Export Syle section, select List or Table.

  • Table Format exports the information in a grid fashion in either a Subset by Point or Point by Subset style available in the Row vs Column section.

  • List Format exports the information one record per line. The data fields can either be separated by tabs or commas from the Delimited section.

  10. From the Numeric Precision section, set the data's export precision to Current Precision or Maximum Precision.

  11. Click Export.

  • The data is saved to the selected file with an extension of DAT or the text can be pasted into another application for presentational use.


Epi Map Menu

File Menu Options

When Epi Map opens for the first time the following four options are available: Map Manager, Open Map File, Shape (Boundary), and Exit. Once a layer is added, all options are enabled, except Open Map File.

  • Map Manager allows the addition and removal of layers and control of the map display.

  • Open Map File allows a saved map file to be opened.

  • Save Map File allows a map file to be saved and used as a template through Analysis. Templates used in Analysis must have data saved to them.

  • Save as Bitmap File allows the conversion of a map to a bitmap image. Bitmap files can then be used in other applications, inserted into documents, or emailed.

  • Clear Map(s) clears the Epi Map workspace of all shapefiles.

  • Print allows the map to be printed to any printer or plotter available. A specific printer and settings can be selected using the Preferences button from the Print dialog box.

  • Exit closes Epi Map. There is no confirmation prior to closing.

Edit Menu Options

  • Copy Bitmap to Clipboard allows a bitmap copy of the displayed map to be placed on the system clipboard. The copied bitmap can be pasted into other applications or documents.

Shape (Boundary) Menu Options

  • Create/Edit opens the Shape Editor of Epi Map. The Shape Editor is used to create or edit shapefiles by adding or deleting features.

View Menu Options

The View menu presents many options that allow users to control the Epi Map viewable components and its visible extent.

  • Title Properties opens the Map Title Properties dialog box which contains options for the editing and placement of text.

  • Find displays the Find Features dialog box and allows features to be searched.

  • Full Extent resets the visible extent to the full extent of all layers that have been added to the map display.

  • Arrow Cursor changes the cursor to an up and left pointing arrow and cancels any mode tool or menu option.

  • Zoom In changes the cursor to a plus magnifying glass cursor. Use the magnifying glass cursor to draw a rectangle around the area to be magnified. Use Full Extent to return the map to the center of the workspace.

  • Zoom In/Drill Down allows for zoom in properties to function on a many layered map. Check select the option from the menu and it applies to the magnifying glass when Zoom In is used on layers selected from the Map Manager. Zoom In/Drill Down zooms through the layers of the map. Only the current drill down layer is active using this feature.

  • Zoom Out changes the cursor to the minus magnifying glass cursor. Click inside the map to expand the map view. Use Full Extent to return the map to the center of the workspace.

  • Pan changes the cursor to the hand cursor and allows the workspace to be dragged up, down, left or right with a click and drag. The map must be in Zoom In mode in order for Pan to function. Pan changes which features are visible without affecting the zoom factor.

  • Identify changes the cursor to the Identify cursor. Click on a polygon inside the map and the Identify Results dialog box opens. The Identify Results dialog box contains the polygon name and a list of attributes (data) specific to the selected polygon.

  • Record(s) for Feature(s) changes the cursor to a table and is available for Case-Based maps only.

  • Graphics changes the cursor to the graphic annotation (crosshair) cursor and opens the graphics tool bar which contains six additional tools including Add Text, Add Point, Add Line, Add Rectangle, Add Polygon, or Add Ellipse.

  • Show Legend displays the Map Composition dialog box.

  • Show Points and Graphics is available for point maps only and allows added points to be toggled on and off the open map.

Help Menu Options

  • Help links to help topics dealing with how to use Epi Map.

  • About Epi Map contains copyright and trademark information for Epi Map.

  • About MapObjects contains copyright information for MapObjects 2.1.


Epi Map Toolbar

Map Manager icon | Map Manager displays the Map Manager dialog box which allows the addition and removal of layers and control of the map display.
Print button | Print Map prints the current map file using the default printer and options. To select a specific printer and set new options, select File > Print.
Find button | Find displays the Find Features dialog box and allows features to be searched.
Full Extent button | Full Extent resets the visible extent to the full extent of all layers that have been added to the map display.
Zoom In button | Zoom In changes the cursor to a plus magnifying glass cursor. Use the magnifying glass cursor to draw a rectangle around the area to be magnified. Use Full Extent to return the map to the center of the workspace.
Zoom Out button | Zoom Out changes the cursor to the minus magnifying glass cursor. Click inside the map to expand the map view. Use Full Extent to return the map to the center of the workspace.
Pan button | Pan changes the cursor to the hand cursor and allows the workspace to be dragged up, down, left or right with a click and drag. The map must be in Zoom In mode in order for Pan to function. Pan changes which features are visible without affecting the zoom factor.
Identify button | Identify changes the cursor to the Identify cursor. Click on a polygon inside the map and the Identify Results dialog box opens. The Identify Results dialog box contains the polygon name and a list of attributes (data) specific to the selected polygon.
Graphics button | Graphics changes the cursor to the graphic annotation (crosshair) cursor and opens the graphics tool bar which contains six additional tools including Add Text, Add Point, Add Line, Add Rectangle, Add Polygon, or Add Ellipse.
Return to Cursor Arrow button | Arrow Cursor changes the cursor to an up and left pointing arrow and cancels any mode tool or menu option.
Records for Features button | Record(s) for Feature(s) changes the cursor to a table and is available for Case-Based maps only.


Graphics Toolbar

The Graphics toolbar and options are available only when the Graphics button is clicked from the main toolbar.

Text button | Add Text allows text to be placed in the map workspace. Click in the workspace where the text should be located. The Graphic Text dialog box opens. Type in the Enter Text field. Color, Size, and Font can be edited using the dialog box. To edit text, click the Selector Arrow and double click the green cross-hair located under the text.
Add Point button | Add Point tool allows a point or points to be placed in the map workspace. Click the location of the point and the Graphic Points dialog box opens. Color, Symbol, and Size can be edited using the dialog box. To edit a point, click the Selector Arrow and double click the green cross-hair located on the point.
Add Line icon | Add Line tool allows a line or lines to be placed in the map workspace. Click a location on the map to start the line, drag to the desired length, and double click to end the line. The Graphic Lines dialog box opens. Color, Line Style, and Width can be edited using the dialog box. To edit a line, click the Selector Arrow and double click the green cross-hair located on the line.
Add Square button | Add Rectangle allows a rectangle to be placed in the map workspace. Click a location on the map to start the rectangle, drag to the desired size, and release the mouse. The Graphic Rectangles dialog box opens. Fill Color, Outline Color, Fill Style, and Border Size can be edited using the dialog box. To edit a rectangle, click the Selector Arrow and double click the green cross-hair located near the center of the rectangle.
Add Polygon button | Add Polygon allows a polygon to be placed in the map workspace. Click a location on the map to start the polygon, click and drag to create the desired size and shape, and double click to close the shape. The Graphic Polygons dialog box opens. Fill Color, Outline Color, Fill Style, and Border Size can be edited using the dialog box. To edit a polygon, click the Selector Arrow and double click the green cross-hair located near the center of the polygon.
Add Circle button | Add Ellipse allows an ellipse to be placed in the map workspace. Click a location on the map to start the ellipse, drag to the desired size, and release the mouse. The Graphic Ellipses dialog box opens. Fill Color, Outline Color, Fill Style, and Border Size can be edited using the dialog box. To edit an ellipse, click the Selector Arrow and double click the green cross-hair located near the center of the ellipse.
Text and Graphics Selector button | Select Graphic for Editing cursor allows graphics to be selected and edited or selected and moved.

Delete a Graphic

To delete a graphic, take the following steps:

  1. Click the Selector Arrow and double click the green cross-hair located near the center of the graphic. The Edit dialog box opens.

  2. Click Delete. The graphic is removed from the map.

Note: Graphic annotations are saved with the map (.map) file, not on specific layers. Therefore, graphic annotations are always visible as layers are turned on or off as the order of layers is changed.


Introduction to Shapefiles

Introduction to Introduction to Shapefiless

A shapefile describes one or more shapes of the same type. There are three types of shapes that can go into a shapefile—points, lines, or polygons. Point type shapes have only locations with X and Y (longitude and latitude) coordinates and are used to represent items in the physical world like locations of wells, addresses, or cave openings. Line or polyline type shapes have length, but do not have area. Line type shapes are used to represent items like rivers, streets, and railroads. Polygon shapefiles usually have three or more sides, resulting in a feature with some area. Polygon shapes are often used to show items like the grounds of a cemetery, the boundaries of a state, country or other political subdivision, and the affected area of an outbreak of disease.

Shapefiles are displayed in Epi Map as layers—one layer per shapefile. A layer may be linked to a database in order to display the data. A map is composed of one or more layers along with other attributes such as the title, legend, background image and any optional graphic annotations. The configuration of a map—its shapefile layers, data points, and other attributes—are saved as Map files and have a .map extension.

Each shapefile type has properties or attributes that are specific to that type. Therefore, in Epi Map, some features are not available depending on the type of shapefile that is selected. For example, "Add Data" is not an option available to layers with line type shapes. However, data can be added to layers with point and polygon type shapes.

Shapefiles have a .shp extension to their filename. However, the term "shapefile" often refers to a collection of files required for the shapefile to display properly. In addition to the .shp file, there is a shape index format file (.shx) and an attribute database format file (.dbf). All three required files share the same filename and have different extensions, .shp, .shx, and .dbf. For example, when downloading a shapefile for use in Epi Map, such as the MXState shapefile of Mexico, all three files would have to be saved together: MXState.shp; MXState.shx; and MXState.dbf. Usually these are bound together in a compressed form, such as WinZip, and distributed as a package.

There may be other optional files (.fpn, .sbn, .ixs, …) in addition to the three required files.


Shape Editor Menu

File Menu Options

  • Load Background Image opens the Load Image File window and allows for the selection of a bitmap (BMP) image file to be applied to the center of the workspace.

  • Open Shapefile for Editing opens the Edit Shapefile window and allows for the selection of a shapefile (SHP) to be applied to the center of the workspace.

  • Clear Shapes removes all images and shapefiles from the workspace.

  • Save opens the Edit Shapefile window and allows a new SHP file to be named and saved.

  • Close Shapefile Editor opens the Edit Shapefile window and allows the SHP file to be saved prior to closing or click Cancel and the Shape Editor closes and the main Epi Map workspace opens.

Edit Menu Options

  • Delete removes selected objects from the workspace.

View Menu Options

  • Zoom In moves the view closer to the selected polygon.

  • Zoom Out moves the view away from the selected polygon.

  • Show Background Image turns the background layer image visible and invisible.

  • Tic Marks places a grid over the workspace.

  • Rename Feature opens the Rename Polygon dialog box and allows the selected polygon to be renamed.

Options Menu Options

  • Vertex Color opens the Color palette and allows the default vertex color black to be changed.

  • Polygon Color opens the Color palette and allows the default polygon color white to be changed. Polygon color changes affect all polygons in the workspace.

  • Snap/Reshape Polygons allows the bounding boxes around a selected or created shape to be moved to create a new shape.

  • Divide Polygon allows a line to be drawn through a polygon if three points are distinguished, one outside the polygon to be divided, one inside the polygon to be divided, and one on the opposite side of the polygon to be divided.


Shape Editor Toolbar

Zoom In button

Zoom In changes the cursor to a plus magnifying glass cursor. Use the magnifying glass cursor to draw a rectangle around the area to be magnified. Use Full Extent to return the map to the center of the workspace.

Zoom Out button

Zoom Out changes the cursor to the minus magnifying glass cursor. Click inside the map to expand the map view. Use Full Extent to return the map to the center of the workspace.

Pan button

Pan changes the cursor to the hand cursor and allows the workspace to be moved up, down, left or right with a click and drag. The map must be in Zoom In mode in order for Pan to function. Pan changes which features are visible without affecting the zoom factor.

Add Polygon button

Add Polygon allows the creation and addition of a polygon shape to the workspace. Polygons are created using a click and drag of the mouse and a double click to close the shape. Polygons must be named.

Add Line button

Add Line allows the creation and addition of a line shape to the workspace. Lines are created using a click and drag of the mouse and a double click to end the line. Lines must be named.

Add Point button

Add Point allows the creation and addition of a point shape to the workspace. Points are created using a click of the mouse. Points must be named.

Select Graphics Arrow button

Select a Point, Line or Polygon using the upward pointing arrow. Selected items may be renamed, moved, or deleted depending on type.

Add Point to Line or Polygon button

Add Vertex allows a vertex to be added to a selected line or polygon. To add a vertex, click within the snapping tolerance of the selected item. When adding vertices to polygons with shared boundaries, it is necessary to update the coincident boundaries of the neighboring polygons with as close a point as possible. If the new point of the neighboring polygon is within the snapping tolerance, the coordinate will be adjusted by the snapping routine to be the same as the original added vertex.

Divide Polygon button

Divide Selected Polygon allows the division of the currently selected polygon. Divide Polygon allows a line to be drawn through a polygon if at least three points are distinguished:

  1. The first point must be outside the polygon to be divided.

  2. The next point or points must be inside the polygon to be divided.

  3. The last point must be outside or on the opposite side of the polygon to be divided.

Epi Map reorders the coordinates of the two newly divided polygons. One receives the name of the original polygon and a dialog is displayed for entering a new name for the second newly formed polygon. The resultant polygon that contains the first vertex receives the original name. The other new polygon receives the new name. To correct unanticipated naming problems, select View > Rename Feature.

Full Extent button

Full Extent resets the visible extent to the full extent of all layers that have been added to the map display.

Snapping Tolerance button

Snapping Tolerance allows the default snapping tolerance to either expand or contract the search distance. With a snapping tolerance too small, no coordinates will be found to be close to any other. With a snapping tolerance too large, every coordinate in the edit layer will be found to be within the tolerance. The implications of too large a tolerance is over-generalization, or every coordinate will be replaced by the first one found within the tolerance.


Report Element Menu

Right click inside a report element (table, line, image) and a menu appears containing formatting options and links to properties and condition dialog boxes. Options available from the menu depend on the type of element selected or the type of data in the report.

Menu Options

  • Cut removes the selected item from the workspace and places it on the clipboard. It is active only when an element is selected.

  • Copy places the selected item in the clipboard. It is active only when an element is selected.

  • Paste inserts clipboard contents from the last Cut or Copy. It is active only when an element has been copied or cut.

  • Select All selects all the elements in the current template.

  • Properties opens the Properties dialog box for the selected element (table, line, or image).

  • Column Properties opens the Properties - Column dialog box and enables formatting options for the entire column.

  • Cell Properties opens the Properties - Cell dialog box and enables formatting options for the entire column.

  • Insert Row creates a new row above the current row in a table.

  • Insert Column creates a new column to the left of the current column in a table.

  • Insert Cell creates a cell to the left of the current cell of the table.

  • Insert Page Break can be selected only if Pagination is turned on from the Tools menu. A page break is inserted in the report at the cursor location.

  • Delete Row deletes the current row in a table.

  • Delete Column deletes the current column in a table.

  • Delete Cell deletes the current cell of the table.

  • Merge Cell joins the currently selected cells into one cell.

  • Split Cell divides the current cell into two cells.

  • Add Condition opens the Condition Builder dialog box and allows for the creation of a filtering condition to a Field Aggregate. Add Condition is available only when a Field Aggregate is selected.

  • Format opens the Format dialog box and allows format changes to be applied. Format is available only when the current data element's data type is a number or date.

  • Body Properties opens the Properties - Body dialog box and allows a background image or background color to be applied to the report template.


Generate Window

Reports are generated from the workspace by selecting File > Generate Report or by clicking Generate from the toolbar. Generated reports display all calculated variables and report elements.

File Menu Options

  • Save copies the current output to a file in the previously selected directory.

  • Save As opens the Save As window and allows the report to be copied to a new directory and given a new file name.

  • Publish Output opens the Build window and saves report output in HTML format with embedded images.

  • Print Preview opens the Print Preview window and displays the generated output.

  • Print opens the Print window and allows a printer to be selected prior to printing the report.

  • Back closes the Generate Report window and returns to the Epi Report workspace.

Toolbar Options

Save button | Opens the Save As window and allows the report to be saved in a new location.
Print Preview button | Opens the Print Preview window and displays the generated output.
Print button | Send the report to the default printer for printing.
Back button | Closes the Generate report window and returns to the Epi Report workspace.


Epi Report Menu

File Menu Options

  • New creates a new template.

  • Open allows an existing report template to be opened.

  • Close exits the current template.

  • Close All closes all open templates.

  • Save copies the currently open template to a file.

  • Save As copies the currently open template to a file with a new file name.

  • Save All copies all open template files to the computer.

  • Page Setup allows for the selection of page size, orientation, and margins for the template when printed.

  • Print Preview produces a preview of the current template and enables printing from the selected printer.

  • Print produces a paper copy of the template on the selected printer.

  • Generate Report generates the current template using the latest data from all required sources and settings.

  • Exit closes Epi Report.

  • The five most recently used templates are listed to open a specified template.

Edit Menu Options

  • Undo reverses the last action performed in the Report Designer workspace.

  • Redo repeats the last action performed in the Report Designer workspace.

  • Cut removes the selected item from the workspace and places it on the clipboard.

  • Copy places the selected item on the clipboard.

  • Paste inserts clipboard contents from the last Cut or Copy.

  • Select All selects all the elements in the current template.

View Menu Options

  • Toolbox acts as a toggle switch to open and close the Epi Report Element Command tree and expand the Report Design window.

  • Page Layout toggles on and off a blue page border rectangle which indicates if any report content falls outside the page layout boundaries. Page Layout must be turned off to edit reports.

  • Zoom allows for a close up view of report elements. Templates cannot be edited from Zoom mode.

Tools Menu Options

  • Styles allows for the creation of a custom style sheet for tables, lines, and images. Style sheets are specific to each template. Styles are applied to selected elements from the Properties dialog box for that element.

  • Reload Analysis XML allows XML files to be refreshed from Analysis data. This menu item displays only if one or more XML files are open. Files to reload are specific to each template.

  • Define Substitution Values allows for the substitution of Boolean variable values for Yes, No, or Missing. Substitution values are specific to each template. Substitution values do no apply to pivot tables.

  • Pagination provides the option to enable or disable page break functionality in an open template or to set a default pagination for all templates.

Window Menu Options

  • Tile Horizontal arranges all open template windows horizontally in the workspace.

  • Tile Vertical arranges all open template windows vertically in the workspace.

  • Cascade arranges all open template windows on top of one another in layers.

  • Arrange Icon arranges all minimized template windows.

  • A list of open templates is listed under this menu.

Help Menu Options

  • Contents links to help topics dealing with how to use Epi Report.

  • Shortcut Keys opens an HTML page containing a list of keyboard shortcuts that can be used in Epi Report.

  • About Epi Report contains copyright and trademark information for Epi Report.


Pivot Tables

Design Pivot Table

Dialog Section | Description
Available Fields | Fields selected from the Read tab are displayed in this section.
>>Column | Click to move fields selected from the Available Fields list box to the Columns section.
>>Row | Click to move fields selected from the Available Fields list box to the Rows section.
>>Data | Click to move fields selected from the Available Fields list box to the Data section. Select a data field from the pivot table design are and then use the drop down to specify an aggregate value for the field. The default aggregate function is Sum.
Clear All Defined Rows, Cols, and Data | Click to clear all defined rows, columns, and data field selections.
View Query | Displays the constructed query code in a separate dialog box.
Clear Query | Clears the current query.

Format Pivot Table

Dialog Section | Description
Suppress Totals | Select to exclude the Total (Sum aggregate) from the generated report.
Available Fonts | Select from the available system fonts.
Size | Select a font size.
Styles | Select a font style from the list.
Pivot Sections | Select a section of the pivot table to apply formatting. Formatting can be applied to Field Captions, Data Rows, or All sections.
Background Color | Select a background color for the selected pivot section.
Data Format | Specify a format for numeric data displayed in the pivot table. Field accepts 0, #, or decimal to create the format.
Foreground Color | Select a foreground color for the selected pivot section.
Apply Formatting | Click to apply the defined format options to the pivot table. Changes appear in the pivot table preview.
View Query | Displays the constructed query code in a separate dialog box.
Clear Query | Clears the current query.


Query Builder

Read

Dialog Section

Description

Query Name

Field cannot have spaces. Query Name is displayed in the Report Element Command Tree. Query name can be edited or changed.

Available Items

Lists all tables available in the currently selected data source.

Available Fields

List all available fields for each table. Select needed fields and move them to the Fields to Show section by the clicking the > button. Click the >> button to move all Available Fields to the Fields to Show section.

  • Binary fields are not be loaded in the Query Builder dialog.

  • Memo fields are loaded into the Query Builder, but they cannot be used to Group or Sort. For aggregates, only the count of a memo field can be performed.

Fields to Show

Lists the selected fields. Selected fields can be re-ordered by using the up and down arrows.

Show View Tables

Select this checkbox to see the View Tables from Epi Info for the current data source. Views are grouped together in the list.

Show Code Tables

Select this checkbox to see the Code Tables from Epi Info for the current data source. Code Tables are grouped together in the list.

Top N Value

Specify a numeric value to select only the top “N” number of rows in the query results. “N” accepts only whole numbers and cannot be used with aggregates.

Top Percent

Click this checkbox to indicate how the value of Top N should be treated as a percentage. (i.e., Top N% records are displayed in the results). Top Percent cannot be used with aggregates.

Treat as Yes/No

Click this checkbox to indicate how the value of a selected field should be treated as a Boolean (Yes/No) field. An asterisk is appended to this field to distinguish it from the other selected fields. This option is not available for use in Pivot Tables.

View Query

Displays the constructed query code in a separate dialog box.

Clear Query

Clears the current query.

Relate

This tab is enabled only when a two tables are selected from the Read tab.

Dialog Section | Description
Select Table Pair | Displays the tables selected from the Read tab. Select two tables to populate the Fields to Join sections.
Select Fields to Join | Fields available in the selected tables appear in two list box sections. Select a field from each list to join together.
Add Join to Query | Click to add the join conditions to the query.
Defined Join Conditions | Join conditions appear in this section once created. More than one join can be created.
Clear Joins | Clears all join conditions from the query.
View Query | Displays the constructed query code in a separate dialog box.
Clear Query | Clears the current query.

Select

Dialog Section | Description
Field Name | Select a field on which to base the Select Criteria.
Operator | Select the Operator used to build the query. Options include =, <>, >, >=, <, <= and Like.
Value | Select from the available field values populated by the List Possible Values button.
Add Criteria | Adds the created selection criteria to the query and places it in the Criteria section.
AND Into Criteria | Adds a clause around the arithmetic expression.
OR Into Criteria | Adds clause around the arithmetic expression.
List Possible Values | Populates the values for the field/column selected under Value label.
List Available Variables | Populates the values of system or permanent variable for use in the comparison.
Criteria | Displays the selection criteria. Criteria can be modified by typing directly into this field.
View Query | Displays the constructed query code in a separate dialog box.
Clear Query | Clears the current query.

Group

Dialog Section | Description
Fields to Show | Table fields from the Read data are displayed. Select a field or fields in which the grouping is to be performed. Move selected fields to the Grouped Fields list box by clicking on the > button.
Grouped Fields | Fields selected for grouping are displayed. Grouping order can be changed by using the up and down arrows.
View Query | Displays the constructed query code in a separate dialog box.
Clear Query | Clears the current query.

Sort

Dialog Section | Description
Available Fields | This field contains all the fields of the selected tables. Fields selected for grouping are excluded from the list. Select a field or fields in which the sorting is to be performed. Move selected fields to the Order by Fields list box by clicking on the > button.
Order by Fields | This field displays the table fields that are selected for sorting. Sort order can be changed by using the up and down arrows.
Ascending | Sorts the Order by Fields in ascending order.
Descending | Sorts the Order of Fields in descending order.
View Query | Displays the constructed query code in a separate dialog box.
Clear Query | Clears the current query.

Aggregates

This tab is only enabled when a field is selected for grouping in the group tab.

Dialog Section | Description
Defined Aggregates | Created aggregates display in this section.
Name | Type an aggregate name in this field. Names can contain alphabets, numbers, spaces, and the special characters _ (underscore) and @. When aggregate names are prefixed with the @ character, the aggregate label is not displayed on the report, only the aggregate value is shown.
Available Functions | Select an aggregate function from the drop-down menu, options include Average, Count, Minimum, Maximum, and Count.
Available Fields | Select a field to apply the selected aggregate function.
Aggregate At | Specify the position where the selected aggregate should appear. Aggregates can be displayed at the top or at bottom of the group break in the generated report. Group aggregates can not be placed at the top of a group that has a Columns a Cell Should Span property value greater than one.
Perform Aggregation at Group Break | Select to display the aggregation at each group break.
Perform Grand Total | Select to display the aggregation at the grand total.
Grouped Field | Specify the grouped field in which to perform the aggregation.
Create Aggregate | Click to create the defined aggregate.
Delete Aggregate | Click to delete the selected aggregate.
View Query | Displays the constructed query code in a separate dialog box.
Clear Query | Clears the current query.


Epi Report Shortcut Keys

Shortcut Keys and functionality available in Epi Report.

Movement
RIGHT ARROW | Move one character to the right. If an absolutely positioned element is selected, nudge the element one pixel to the right.
LEFT ARROW | Move one character to the left. In the Designer, if an absolutely positioned element is selected, nudge the element one pixel to the left.
DOWN ARROW | Move down one line. In the Designer, if an absolutely positioned element is selected, nudge the element down one pixel.
UP ARROW | Move up one line. In the Designer, if an absolutely positioned element is selected, nudge the element up one pixel.
CTRL+RIGHT ARROW | Move right one word
CTRL+LEFT ARROW | Move left one word
END | Move to the end of the current line
HOME | Move to the start of the current line
CTRL+DOWN ARROW | Move down one paragraph
CTRL+UP ARROW | Move up one paragraph
PAGE DOWN | Move down one page
PAGE UP | Move up one page
CTRL+HOME | Move to the beginning of the document
CTRL+END | Move to the end of the document
TAB | Cycle selection through block-level elements within the control
SHIFT+TAB | Reverse-cycle selection through block-level elements within the control
CTRL+J | To add vertical spaces on the template
Selection
SHIFT+RIGHT ARROW | Extend the selection one character to the right
SHIFT+LEFT ARROW | Extend the selection one character to the left
CTRL+SHIFT+RIGHT ARROW | Extend the selection right one word
CTRL+SHIFT+LEFT ARROW | Extend the selection left one word
SHIFT+UP ARROW | Extend the selection up one line
SHIFT+DOWN ARROW | Extend the selection down one line
SHIFT+END | Extend the selection to the end of the current line
SHIFT+HOME | Extend the selection to the start of the current line
SHIFT+PAGE DOWN | Extend the selection down one page
SHIFT+PAGE UP | Extend the selection up one page
CTRL+SHIFT+END | Extend the selection to the end of the document
CTRL+SHIFT+HOME | Extend the selection to the beginning of the document
CTRL+A | Select all elements in the document
Editing
BACKSPACE | Delete the selection or, if there is no selection, the character to the left of the insertion point
CTRL+BACKSPACE | Delete all of a word to the left of the insertion pointer, not including the space before
CTRL+C | Copy the selection to the Clipboard
CTRL+V | Paste the contents of the Clipboard to the current location
CTRL+X | Cut the selection to the Clipboard
DELETE | Delete the selection without placing it on the Clipboard
INSERT | Toggle between inserting and overwriting text
CTRL+Z | Undo the most recent formatting commands
CTRL+Y | Re-do the most recently undone commands
CTRL+F | Find text
SHIFT+F10 | Display the context menu, if any (equivalent to right-clicking the document)
CTRL+L | Display the Hyperlink dialog box (if the insertion point is within an <A> element)
CTRL+K | Toggle absolute positioning for the selected element
Formatting
CTRL+B | Toggle bold formatting
CTRL+I | Toggle italic formatting
CTRL+U | Toggle underlining
CTRL+T | Increase paragraph indent
CTRL+SHIFT+T | Decrease paragraph indent


Epi Report Toolbar

New button | Creates a new template.
Open button | Opens an existing template. Only templates with an .EPT extension can be opened.
Save button | Saves the current template. Templates can be saved only with .EPT extensions.
Save All button | Saves all open templates.
Generate Report button | Generates a report for the current template.
Cut button | Cut removes the selected element and places it in the clipboard.
Copy button | Copy places the selected element in the clipboard.
Paste button | Paste inserts clipboard contents on the template.
Print Preview button | Opens a Print Preview of the current template.
Undo button | Undo reverses the last action performed in the Report Designer window.
Redo button | Redo repeats the last action performed in the Report Designed window.
Text Style menu | Lists all possible styles for text. For e.g.; Normal, Heading1, Heading2.
Font menu | Lists all available fonts in the system.
Font Size menu | Lists all available font sizes in the system.
Bold button | Makes the selected text bold. If the selected text is already bold, clicking this button returns the text to normal.
Italic button | Makes the selected text Italic. If the selected text is already Italic, clicking this button returns the text to normal.
Underline button | Makes the selected text underlined. If the selected text is already underlined, clicking this button returned the text to normal.
Font Highlight button | Highlights selected text with the chosen color.
Font Color button | Changes the selected text to the chosen color.
Left Align | Left aligns selected text.
Center Align | Center aligns selected text.
Right Align | Right aligns selected text.
Numbering button | Add or removes numbering to/from the selected text.
Bullets button | Add or removes bullets to/from the selected text.
Decrease Indent button | Decrease indents the selected text to the previous tab stop.
Increase Indent button | Increase indents the selected text to the next tab stop.
Vertical Space button | Vertical Space adds more space to the bottom of the template.
Width Selector | Changes the width of the selected control or table element. The up/down buttons increase or decrease the size by 1 pixel. The text field can be typed in directly to change the size to the desired width.
Height Selector | Changes the height of the selected control or table element. The up/down buttons increase or decrease the size by 1 pixel. The text field can be typed in directly to change the size to the desired height.
Page Area button | Click Page Area to view how page elements break in accordance to the current page setup. Page Area places a blue margin around the template area and shows the printable areas inside the blue line. Page Area must be turned off to continue work in the Designer window.


Report Element Properties

Right click any element in the report template to open the applicable Properties dialog box. If no properties are available for the selected element, a blank dialog box displays with the header No Properties.

Table Properties

Property | Acceptable Values | Results
Background Color | Color selected from the palette. Appears as a hexadecimal number. | The background of the table is set to the selected color.
Border Color | Color selected from the palette. Appears as a hexadecimal number. | A Border must be applied from the Borders section in order for colors to appear.
Border Size | Any number between 1 and 10 pixels. | A Border must be applied from the Borders section in order for Border Size to appear.
Borders |  | Applies Borders to the table.
Cell Spacing | Any number between 0 and 100 | Sets the amount of space (in pixels) between the cell contents and the cell border.
Cell Thickness | Any number between 0 and 100 | Sets the amount of space (in pixels) between the cells.
Height | Any number between 0 and 10000 | Sets the Height of the table. If only a number is specified, the size is taken in pixels. To specify the height in percentage, suffix the number with %.
Width | Any number between 0 and 10000 | Sets the Width of the table. If only a number is specified, the size is taken in pixels. To specify the width in percentage, suffix the number with %.

Row Properties

Property

Acceptable Values

Results

Alignment

Left, Right, or Center

Aligns the contents of the cells in the row to the left, right, or center of the template.

Background Color

Color selected from the palette. Appears as a hexadecimal number.

The background of the row is set to the selected color

Border Color

Color selected from the palette. Appears as a hexadecimal number.

A Border must be applied from the Borders section of Table Properties in order for colors to appear.

Height

Any number between 15 and 10000

Sets the height of the cells in the row in pixels.

Vertical Alignment

Baseline, Bottom, Middle, or Top

  • Baseline aligns the contents of the cells in the row so that the base line of the first line of text aligns with the baselines in adjacent cells.

  • Bottom aligns the contents of the cells in the row to the bottom of each cell.

  • Middle aligns the contents of the cells in the row to the middle of each cell.

  • Top aligns the contents of the cells in the row to the top of each cell.

Column Properties

Property

Acceptable Values

Results

Alignment

Left, Right, or Center

Aligns the contents of the cells in the column to the left, right, or center of the template.

Background Color

Color selected from the palette. Appears as a hexadecimal number.

The background of the column is set to the selected color

Border Color

Color selected from the palette. Appears as a hexadecimal number.

A Border must be applied from the Borders section of Table Properties in order for colors to appear.

Vertical Alignment

Baseline, Bottom, Middle, or Top

  • Baseline aligns the contents of the cells in the column so that the base line of the first line of text aligns with the baselines in adjacent cells.

  • Bottom aligns the contents of the cells in the column to the bottom of each cell.

  • Middle aligns the contents of the cells in the column to the middle of each cell.

  • Top aligns the contents of the cells in the column to the top of each cell.

Width

Any number between 1 and 10000

Sets the width of the cells in the column in pixels.

Cell Properties

Property

Acceptable Values

Results

Alignment

Left, Right, or Center

Aligns the contents of the cell to the left, right, or center of the template.

Background Color

Color selected from the palette. Appears as a hexadecimal number.

The background of the cell is set to the selected color

Border Color

Color selected from the palette. Appears as a hexadecimal number.

A Border must be applied from the Borders section of Table Properties in order for colors to appear.

Columns a Cell Should Span

Any number between 0 and 100

Sets the number of columns this cell should span. This property is not available for cells of the last column of the table.

Rows a Cell Should Span

Any number between 0 and 100

Sets the number of rows this cell should span. This property is not available for cells of the last row of the table.

Vertical Alignment

Baseline, Bottom, Middle, or Top

  • Baseline aligns the contents of the cell so that the base line of the first line of text aligns with the baselines in adjacent cells.

  • Bottom aligns the contents of the cell to the bottom of each cell.

  • Middle aligns the contents of the cell to the middle of each cell.

  • Top aligns the contents of the cell to the top of each cell.

Image

Property | Acceptable Values | Results
Alternate Text | Short Text (0 to 100 characters) | Alternate text is attached to the image and can be viewed when the mouse is moved over the image. Alternate text can be viewed once the report is generated using the Generate Report option.
Border | Any number between 0 and 10 | The size (in pixels) of the border of the image. If no border is desired, type 0 as the border size.
Height | Any number between 0 and 1000 | Sets the height of the image in pixels.
Path | Absolute or Relative | Absolute is the exact path of the image on the system. Eg: file://c:\Epi_Info\EpiInfo.jpg For a non-saved template, Relative is the path of the image relative to the application. For a saved template, Relative is the path of the image relative to the location of the saved template. Eg: C:\Epi_Info\EpiInfo.jpg (Application and image are in different directories) ..\Epi_Info\EpiInfo.jpg (Application and image are in same directory)
Source | Path of Image or the path selected through the File Browse window. | The path of the selected image is displayed.
Width | Any number between 0 and 1000 | Sets the width of the image in pixels.

Anchor

Property | Acceptable Values | Results
Name | Short Text | Name the anchor.
Text | Short Text | Edit the Anchor text.
URL | Short Text | Set the URL that acts as the Anchor link. Text can be converted to an Anchor by selecting the text and clicking Ctrl+L or selecting the text and dragging Anchor from the Report Element Command Tree.

Line

Property | Acceptable Values | Results
Color | Color selected from the palette. Appears as a hexadecimal number. | Sets the selected color to the line.
Height | Any number between 0 and 100 | Sets the height of the line in pixels.
Line Style | Options displayed drop-down list. | Sets the selected style to the line.
Width | Any number between 0 and 10000 | Sets the width (length) of the line in pixels.

Body

Property | Acceptable Values | Meaning
Background Color | Color selected from the palette. Appears as a hexadecimal number. | Sets the desired background color for the template.
Background Image | Path of image or Path selected through the File Browse window. | Sets the desired background image for the template.


Epi Report Command Line Syntax

Epi Report can be called from the command line of Menu with any of the following syntax.

/P or /V or /O:<folder-path-where-output-to-be-stored>

  • /P generates the template (if given) or the default template and prints it.

  • /V generates the template (if given) or the default template and opens print preview.

  • /O:<folder-path-where-output-to-be-stored> generates output in HTM file format to the indicated folder. If only a directory name is specified with the /O: parameter, the filename is the same as the template name, suffixed with .HTM instead of .EPT. If the filename ends with .HTM or .HTML, or if a file of the specified name already exists, the /O: parameter is interpreted as a filename, otherwise it is interpreted as a directory name. Filenames containing spaces must be enclosed in "quotes" both for the template name and the output file.

Preview a Report Syntax

EpiRepGen <template-ept-file-name-with-path> <analysis-xml-file-name-with-path> /v

C:\epi_info\epirepgen c:\mydir\sample.ept /v

Print Syntax

EpiRepGen <template-ept-file-name-with-path> <analysis-xml-file-name-with-path> /p

C:\epi_info\epirepgen c:\mydir\sample.ept /p

Generate Output Syntax

EpiRepGen <template-ept-file-name-with-path> /o:<folder-path-where-output-to-be-stored>

C:\epi_info\epirepgen c:\mydir\sample.ept /o:c:\mydir\output_dir

There should not be any space between /o: and the directory path

Pass an Analysis XML to Epi Report Syntax

<template-ept-file-name-with-path> - Template file name

<analysis-xml-file-name-with-path> - Analysis file name

C:\epi_info\epirepgen c:\mydir\sample.ept c:\analysis_out\out01.xml

  • If only using <template-ept-file-name-with-path>, the template is opened with the XML and Datasources which was saved earlier with the template.

  • If using both <template-ept-file-name-with-path> <analysis-xml-file-name-with-path> then <template-ept-file-name-with-path> will be opened, which opens all the Datasources (XML & DB) associated and the <analysis-xml-file-name-with-path> will be opened as if it has been opened after opening the template.

  • If only using <analysis-xml-file-name-with-path> then it is opened in a new template.


Assign Command (Check Code Generator)

Assign

Command Reference

The ASSIGN command stores the value of a variable or assigns the results of arithmetic or string expression mathematics to a variable.

ASSIGN dialog box

  • The Assign Variable field represents a variable located in a database or that is a defined variable created in a program.

  • The = Expression field contains any valid mathematical or logical expression that is generated.

  • The Available Variables field allows for the selection of variables that are available in the current project.

  • Functions and operators appear within commands and are used for common tasks such as extracting a year from a date, combining two numeric values, or testing logical conditions.

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Autosearch Command (Check Code Generator)

Autosearch

Command Reference

The AUTOSEARCH command allows the Enter module to search for one or more matching records. If a match is found, the record can be displayed and edited or ignored during the data entry process.

AUTOSEARCH dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Before or After

The Before or After radio buttons are used to select whether the variable will be executed before or after the data is entered for that variable.


Clear Command (Check Code Generator)

CLEAR

Check Command

Command Reference

The CLEAR command resets a field to blank. CLEAR is frequently followed by the GOTO command that puts the cursor in position for further entry after an error. More than one field may be coded to CLEAR.

CLEAR dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Define Command (Check Code Generator)

DEFINE

Check Command

Command Reference

The DEFINE command allows for the creation of a new variable.

DEFINE dialog box

  • The Variable Name field represents the name of the variable to be created.

  • Standard variables can only stay in a current project, and will be considered as one variable in that View.

  • Global variables persist for the duration of program execution. They are used in Enter to pass values from one View to a related View.

  • Permanent variables are stored in the Epi Info.INI file or system registry and retain any value assigned until the value is changed by another assignment or the variable is undefined. They are shared among Epi Info programs and persist even if the computer is shut down.

  • Variable Type determines what type of values the variable can contain: Date, Numeric, Text, or Yes-No.

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Dialog Command (Check Code Generator)

DIALOG

Check Command

Command Reference

The DIALOG command provides interaction with the user from within a program. Dialogs can display information, ask for and receive input, and offer lists for making choices.

DIALOG Type Simple

  • Title holds the text of the heading title.

  • Prompt contains the text to be used in the dialog as a message.

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.

DIALOG Type Get Variable

This form of dialog displays a combo box of databases or View variables.

  • Title holds the text of the heading title.

  • Prompt contains the text to be used in the dialog as a message.

  • Input Variable allows for the selection of a variable from the current data table.

  • Variable Type allows for the selection of the dialog format to receive the value. Formats include Text, Number, Date, and Yes-No-Cancel. This field defaults to any previously assigned types.

If the Variable Type is Text, the Dialog Type drop down allows for the selection of Text Entry, Multiple Choice, Variable List, View List, Database List, File Open, and File Save. Database List options are not restricted to databases but can include any file type. The Multiple Choice selection opens another set of dialog boxes to set up the choice selection.

  • Pattern and/or Length create the pattern or size that input will be allowed to follow when entered into the variable. Pattern options are based on Variable Type and Dialog Type selections. Number Type patterns consist of pound signs (#) and can contain one decimal place with a boundary. Date pattern options are DD-MM-YYYY, MM-DD-YYYY or YYYY-MM-DD.

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.

DIALOG Type List of Values

This dialog type displays a combo box of distinct values of the specified variable in the specified database.

  • Title holds the text of the heading title.

  • Prompt contains the text to be used in the dialog as a message.

  • Input Variable allows for the selection of a variable from the current data table.

  • Variable Type allows for the selection of the dialog format to receive the value. Options are Text, Number, Date or Yes-No-Cancel.

  • Show Table contains a list of available Views or tables in the current project.

  • Show Variable contains a list of available fields that act as selection criteria for the input variable in the current project.

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Execute Command (Check Code Generator)

EXECUTE

Check Command

Command Reference

The EXECUTE command allows the specification and the execution of a Windows or DOS program named in the command or one designated within the Windows registry as appropriate for a document with the file extension named. This provides a mechanism for opening a default word processor or browser without knowing the exact name.

Parameters can be added in the Make View Program Editor. Parameters are entered directly into the Program Editor not through the EXECUTE dialog box. When a parameter is added the whole string should be enclosed within double quotes.

EXECUTE dialog box

  • Filename or Command contains the path or filename for program or file being run with any command line arguments required.

  • When Wait for Command to Execute is specified, the command should run and Enter should also continue running. When Wait for Command to Execute is not specified, Enter should wait until the executed program closes before continuing.

  • OK accepts the current settings and data, and then closes the form or window.

  • Browse searches the local directory for a file. Selecting this button displays a file dialog box.

  • Cancel closes the command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


GoTo Command (Check Code Generator)

GOTO

Check Command

Command Reference

The GOTO command is used to define an IF statement and to transfer the cursor to a specifically named variable field.

GOTO dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Help Command (Check Code Generator)

HELP

Check Command

Command Reference

The HELP command allows for the display of a document in .HTM or .CHM format. This is different from the Epi Info associated Help file.

HELP dialog box

  • Filename contains the filename path of the .HTM file where the help file is located.

  • An Anchor is an optional tag at the end of an HTML filename. It is preceded by a pound sign # and is used to bookmark a particular position in a text file.

  • OK accepts the current settings and data, and then closes the form or window.

  • Browse searches the local directory for a file. Selecting this button displays a file dialog box.

  • Cancel closes the command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


Hide Command (Check Code Generator)

HIDE

Check Command

Command Reference

The HIDE command allows the user to hide a field from view and makes the field NOENTER.

HIDE dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


If Command (Check Code Generator)

IF

Check Command

Command Reference

The IF command allows the definition of conditions and one or more consequences which result when the conditions are met. An alternative consequence can be given after the ELSE command statement, to be realized if the first set of conditions is not true.

IF dialog box

  • The If Condition field is used to specify the condition that will determine which statement that follows it is executed.

  • The Available Variables field allows for the selection of variables that are available in the current project.

  • The Then button is part of the If Condition statement. It is used to start the section of code executed when the If condition is true.

  • The Else button is part of the If Condition and works as follows: If the condition is true, then the first statement is executed. If the condition is false, then the statement is bypassed and if there is an else statement, it is executed instead.

  • Functions and operators appear within commands and are used for common tasks such as extracting a year from a date, combining two numeric values, or testing logical conditions.

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Clear empties fields so that information can be can reentered.

  • Help opens the Help topic associated with the module being used.


NewRecord Command (Check Code Generator)

Check Command

Command Reference

The NewRecord command saves the current records data and opens a new record for data entry.

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Quit Command (Check Code Generator)

Check Command

Command Reference

The QUIT command allows the saving and closing of the Enter application.

QUIT dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Unhide Command (Check Code Generator)

Unhide

Command Reference

This UNHIDE command makes a field visible and returns it to the status it had before it was hidden.

UNHIDE dialog box

  • OK accepts the current settings and data, and then closes the form or window.

  • Cancel closes the command generation window without saving or executing a command.

  • Help opens the Help topic associated with the module being used.


Checkbox

The Checkbox field (or variable type) is treated like a Yes/No field. When using the Checkbox field, there is no missing variable.


Codes

Code Tables allow a selection of value from a drop-down list and based on that choice, another field populates from a set of predetermined values. At least two fields must exist. The first field is the original or main code, which will be a drop-down box, and the second (or third, etc.) will be treated as 'Read Only' and will populate based on whatever is assigned from the first field.

New code tables can be created or existing code tables can be used in the creation of code table selections. When a list of values is specified, an entry must match one of a specified list of values, or it will be rejected.


CommandButton

The Command Button variable type allows for the creation of an executable button on the View. For example; execute Analysis or another program such as Microsoft Excel. Using Check Code to control the button behavior.


Comment Legal

Comment Legal allows the displaying of codes with comments/descriptions or legal value meanings. Comment Legal fields are created by typing a number in front of text (with a hyphen) so that when entering data, the number is entered instead of the full text. The field is displayed as a number, but it is a TEXT variable type, which may affect the type of statistics available in Analysis. In Analysis, the variables are displayed as numbers.


Date

The Date field is an alpha/numeric field with pre-set date patterns that are selected from the pattern drop-down menu. This field cannot be altered.

Available Patterns

  • MM-DD-YYYY – U.S. Dates

  • DD-MM-YYYY – European Dates

  • YYYY-MM-DD – Computer style or international


Date/Time

The Date/Time field is an alpha/numeric field with pre-set date/time patterns that are selected from the pattern drop down menu. This field cannot be altered.

Available Patterns

  • MM-DD-YYYY HH:MM:SS AM/PM

  • DD-MM-YYYYHH:MM:SS AM/PM

  • YYYY-MM-DDHH:MM:SS AM/PM


Field Name

The Field Name field is part of the Field Definition dialog box. Field Names are stored in the View table and the data table. The Field Name field take part of the Question or Prompt field and creates a default name based on the entry. Field Names cannot begin with numbers, if a number is the first character in the Question or Prompt, a letter N will precede the default Field Name. Field Names can be changed by typing in the Field Name field over the default text. Field Name length is limited to 64.

Field Name field in the Field Definition dialog box

  • If the Field Name is grayed out, the data table has already been created and data may have been entered. Once the data table is created, in order to avoid discrepancies between the View and the data table, the user is restricted from changing the field name and from changing some of the variable types.

  • If the field name must be changed, select Tools > Delete Data Table. The Field Name is activated and can be changed or edited. The Delete Data Table option deletes all data that has been entered. Only use this tool if "mock" data has been entered or the data table was inadvertently created.


Font for Prompt

The Font for Prompt button is used to change the font settings for a question or prompt field. Font for Prompt overrides the default font for the selected question only. The default font is applied to subsequent questions.


Grid

The Grid field type creates related tables that can be inserted into a questionnaire or View to track specific information (i.e., child’s measurements). The relationship is maintained by Epi Info in Enter and Make View, and in Analysis the relationship is established automatically with the RELATE command. Once the relationship is established in Analysis, the resulting table can be analyzed like any other table. Check code cannot be used on grids.


Image

The Image field allows an image to be inserted per record, for example patient photo, rash or bacteria picture, logo, or graph.

Accepted Image File Types

  • Graphics Interchange Format (.GIF)

  • Joint Photographic Expert Group (.JPG or .JPEG)

  • Windows Bitmap Format (.BMP)

  • Windows Icon File Format (.ICO)

  • Windows Metafile Format (.WMF)

  • Enhanced Metafile Format (.EMF)


Label/Title

The Label/Title field contains the name of the label or title for the question or prompt on the View. This field is not visible in Check Code and is not searchable. This field is also not in the tab order list.


Legal Values

Legal values allow the selection of values from a drop down list. When a list of legal values is specified, an entry must match one of a specified list of values, or it will be rejected. New code tables can be created or existing code tables can be used in the creation of legal value selections.


Mirror

Mirror type fields work only if there are multiple pages in a View. For example, if a Patient ID is on page one, the value of Patient ID can be echoed onto another page using the mirror field. Mirror fields are Read Only.


Multiline

Multiline field are alpha/numeric fields that have the capacity to store up to 2 gigabytes of information in the field or approximately 130,000 characters.


Number

The Number field type is a numeric value field that has six predefined value patterns. A new pattern can be created by simply typing the pattern into the Pattern field.

Available Patterns

  • #

  • ##

  • ###

  • ####

  • ##.##

  • ##.####


Option

Option is a field type that creates radio button selection fields inside a View. Option fields are for mutually exclusive choices; only one choice can be made. If more than one choice is necessary, use the Checkbox option.


PhoneNumber

The PhoneNumber field is a pre-set field for phone numbers only. Phone extensions or international numbers cannot currently be used in this field. Patterns available are ###-###-#### or ###-####.


Question or Prompt

Question or Prompt fields are created in the Field Definition dialog box and allow the creation of long questions without regard to numbers, symbols or spaces. The Field Name field takes part of the Question or Prompt and automatically creates a default name. Field Names cannot begin with numbers. If a number is the first character in the Question or Prompt, an N will precede the default Field Name.


Range

Ranges can be applied to Number or Date variable types. Range allows for a specified value between one setting and another. Values falling outside a specified range will prompt the user with a warning message in the Enter module. Missing values are accepted unless the field is also designated Required.


Read Only

From the Enter module, this property does not allow the placement of the cursor in the field or the entering of data. It is particularly useful for calculated fields that are not to be changed directly. READ ONLY cannot be used in combination with Required since those properties are mutually exclusive.


Relate or Related View

Relate

The Relate or Related View field type creates relationships between your main or parent View with sub or child Views ONLY within the same .MDB. Related Views are relationships between the main or parent View with sub or child Views. Related Views are linked to a parent View automatically by unique keys generated by the application. Related Views are made accessible through buttons in the View. Buttons can be created on a conditional basis so that they become available only under specified conditions, for example, when additional information is needed about a particular disease.


Repeat Last

This property causes the value of the same field in the last record accessed to become the default value for the designated field in the current record. Repeat Last is meant to save keystrokes during data entry for fields where a value seldom changes.

Example

A county or state name is often the same for each record in a given locality. Making a record a REPEAT field brings up the last value entered with each new record. In the few records in which the correct answer may be another state or county, the value can easily be changed before the record is saved.


Required

When this field is checked a mandatory field is created. Required cannot be used in combination with Read Only since the properties are mutually exclusive. If a page contains a Required variable, the Enter module will not allow further page navigation until a value has been entered.


Retain Image Size

Retains the image size of the original image and does not alter the size to fit the image box in the View.


Soundex

SOUNDEX is a property that is used in combination with Search and allows the finding of exact names but also those with similar pronunciation. If a value is changed from the List Update option from Analysis, the SOUNDEX property can still be applied. SOUNDEX works only with English last names.

Example

"Smith" and "Smyth" are both converted to the same SOUNDEX code, so that subsequent searches will find both names.


Text

The Text variable field is an alpha/numeric field that will hold 128 characters.


Text[Uppercase]

The Text[Uppercase] field is a forced uppercase field. All data typed in this field from the Enter module will appear in uppercase letters.


Time

The Time field is an alpha/numeric field with pre-set time patterns that are selected from the pattern drop-down menu. This field cannot be altered. Time settings options are HH:MM:SSAMPM or HH:MM:SS.


Yes/No

The Yes/No field type is a pre-determined field in which the values that can be selected are yes, no or blank for missing. Yes or No answers are stored in the data table as a 1 or 0. Yes or No answers are assigned in Check Code as a (+) plus or (–) minus.

  • 1 = Yes = (+)

  • 0 = No= (-)


Make/Edit View Menu

Make View workspace

File Menu Options

  • New creates a new project in MakeView.

  • Open allows access to previously created projects in MakeView.

  • Save copies the current project to a file on the computer's main memory.

  • Copy View creates a new project containing a copy of the current View with the option of copying the current data table.

  • Enter Data opens a View screen where data can be entered into the current project.

  • Exit closes the MakeView module.

The recently used file list updates each time a new file is opened in the Enter module and holds up to four files for easy access.

Edit Menu Options

  • Cut removes the selected field and places it on the clipboard.

  • Copy reproduces the selected field for placement in the current project or another project file.

  • Paste inserts the copied or cut areas into the current project or another project file.

  • Move Grid relocates the selected grid to another page in the project or another project file.

  • Delete Page permanently removes page and its contents from the current project.

  • Rename Page allows the assignment of a new name to the current page in the project.

  • Go to Page displays a list of pages in the current project and goes to the selected page.

  • Order of Field Entry (TabOrder) reorders entry fields.

View Menu Options

  • Check Code opens the MakeView Program Editor.

Insert Menu Options

  • Field opens the Field Definition dialog box.

  • Page allows you to add a new page to the View or insert a page between pages in the current View.

  • Group creates a group from a selected set of fields.

Format Menu Options

  • Set Default Font sets the default font for the View. The default settings are applied when new prompts are added to the View.

  • Alignment allows selected fields to be aligned vertically or horizontally in the View.

  • Background allows an image or color to be applied to the current View. Background settings can be applied per page or to the entire project.

  • Settings allows for the editing of screen grid and snap properties.

Tools Menu Options

  • Display Data Dictionary opens a listing of variables in the current View and displays information specific to each variable.

  • Import Epi 6 REC File allows for the import and conversion of an Epi 6 REC file to an MDB project file.

  • Import Check Code allows for the import of an Epi 6 check (.CHK) file.

  • MakeView from Data Table allows for the creation of a View from an existing data table in the current project or from another existing project.

  • Create Data Table allows for the creation of a data table to hold variable names and entered records.

  • Delete Data Table permanently deletes all records from the open dataset.

  • Convert Child to Parent (available in Related Views only) removes the ‘F key’ variable from the data table and converts the child View into a parent View. The related button in the parent still exists but the association between child and parent is lost.

  • Install Vocabulary allows for the addition of standards-compliant field types to be made available during View creation.

Help Menu Options

  • Contents lists the help topics available for the program and contains separate navigation to individual help topics.

  • Command Reference lists and defines all the commands that are used in the program.

  • About MakeView describes the MakeView module and gives information on the version in use.


Check Commands Window

Check Commands WindowTab Selector

The Make/Edit View: Check Commands tab selector allows the selection of fields and determines when the actions designated by the Check Commands will occur during data entry.

The Choose Field Where Action Will Occur drop-down list shows the fields and variables in the current View. Read Only variables will not execute Check Code.

The Before or After radio buttons show when the action occurs or when the Check Code will run in the data entry process. Check Code can run before data are entered in the selected field or after data are entered as the cursor leaves the field.

The tab section provides another way to navigate and select commands. Commands selected from the tab section open the same dialog boxes as the Command Tree. The Command Tree will not be active while inside some of the dialog boxes. When that occurs, the tabs section must be used.

Check Commands window


Check Commands Tree

The Check Command Tree displays all of the available Check Commands used in the MakeView program. The Check Command Tree is not visible until a variable is selected from the drop-down list. The Command Tree is located inside the Check window. Commands located inside the Check window act as buttons when clicked. The dialog boxes that open when a command is selected are also called wizards or generators as they act as a guide through the Check Code process. The Command Tree will not be active while inside some of the dialog boxes. When that occurs, use the Check Commands window tab section to select commands

Check Commands Tree

Available Commands

Define

The DEFINE command allows for the creation of new variables. The DEFINE command is located on the Variables Tab.

Assign

The ASSIGN command stores the value of a variable or assigns the results of arithmetic or string expression mathematics to a variable. The ASSIGN command is located on the Variables Tab.

Hide

The HIDE command hides a field from view. The field will act as a read only (NOENTER) field while it is hidden. The HIDE command is located on the Fields Tab.

Unhide

The UNHIDE command makes a field visible. The UNHIDE command is located on the Fields Tab.

GoTo

The GOTO command can be used alone or in an IF statement to transfer the cursor to a specifically named variable field. The GOTO command is located on the Fields Tab.

Clear

The CLEAR command resets a field to blank. CLEAR is frequently followed by the GOTO command that puts the cursor in position for further entry after an error. More than one field may be CLEARed. The CLEAR command is located on the Fields Tab.

Autosearch

The AUTOSEARCH command allows the Enter module to search for one or more records that match the values in the designated fields. If a match is found, the record can be displayed and edited or ignored during the data entry process. The AUTOSEARCH command is located on the Records Tab.

If

The IF command is used to define conditions or consequences that result when the conditions are met. An alternative consequence can be given after the ELSE statement. The IF command is located on the Records Tab.

Quit

The QUIT command is used to save and close the Enter application. The QUIT command is located on the Programs Tab.

Execute

The EXECUTE command allows the specification and the execution of a Windows or DOS program named in the command or one designated within the Windows registry as appropriate for a document with the file extension named. The EXECUTE tab is located on the Programs Tab.

NewRecord

The NEWRECORD command saves the current record's data and opens a new record for data entry. The NEWRECORD command is located on the Programs Tab.

Dialog

The DIALOG command provides interaction with the user from within a program. Dialogs can display information, ask for and receive input, and offer lists for making choices. The DIALOG command is located on the User Interaction Tab.

Help

The HELP command displays a document that is in .HTM or .CHM format. The HELP command is located on the User Interaction Tab.


MakeView Program Editor

The Program Editor window displays the code generated by the commands created from the Check Command Tree or the Check Commands window. Code can also be typed directly into the Program Editor and saved. The following function keys can be used in the Program Editor: F1 opens the help files, F3 opens a Search window, and F8 selects the current line of code.

Program Editor window

Edit Menu Options

  • Copy reproduces the selected area for placement in the current project or another project file.

  • Cut removes the selected area and places it in the clipboard.

  • Paste inserts copied or cut areas into the current program.

  • Delete Line removes a line of code in the current program.

  • Find allows the user to search for a particular text string in the Program Edit screen.

  • Find Next allows the user to find the next occurrence of the searched text string in the Program Editor.

  • Replace substitutes the specified text string for the search item.

  • Program Beginning takes the user back to the start of the program script.

  • Program End takes the user to the end of the program script.

  • Insert Command at Cursor is a selectable item. When checked in the menu, new commands are inserted at the cursor position into the lines of code. When unchecked in the menu, new commands append to the program after of the last line of code. The INSERT COMMAND status remains in affect until changed.

View Menu Options

The Status Bar provides page, line, and column information for code in the Program Editor.

Fonts Menu Options

Set Editor Font allows a default font to be applied to all text in the Check Code Program Editor. Changes made using Set Editor Font also apply to the Analysis Program Editor. Font settings are saved between sessions of Epi Info. This is useful for teaching classes with a large visible font.

Help Menu Options

  • Contents lists the help topics available for the program and contains separate navigation to individual help topics.

  • About describes the MakeView module and gives information on the Epi Info for Windows version in use.

Save

Use the Save button to save the Check Code created in the Program Editor. The Save button also verifies that the code syntax is correct.

Print

Use the Print button to print the code in the current field.


Page Panel

The Page panel is the left portion of the MakeView Application workspace screen. In this section of the screen you can add, insert, or delete pages. By opening the Program Editor, you can also create Check Code for the project.

Make View Page panel

  • Add Page creates a new page in the View.

  • Insert Page produces a new page above the selected page in the existing list available in the View.

  • Delete Page permanently removes the selected page from the View.

  • Program opens the Program Editor, which allows Check Code to be created for the project.


Import an Epi 6 Related File System

The Import Epi 6 .REC File function of MakeView imports one Epi 6 file at a time. In Epi 6, related files and keys for the relationships are designated within Check Code in the Epi 6 .CHK file. To import an Epi 6 related file system and convert it to an Epi Info for windows project, data must be managed using a combination of steps in MakeView, Analysis, and Enter Data.

  1. To import a system of related files from Epi 6, first make a diagram on paper of the system to understand which file is the main file, which files are related and what are the keys for each.

  • If IF statements were used to express conditional relationships (IF <fieldname> = expression THEN RELATE <Filename>), then note the conditions.

  2. Make a backup copy of all the files to be converted.

  3. Import each of the files into Epi Info using the Import Epi 6 .REC File function.

  4. On the main View, create a relate button, and create a related View making sure to select the option Relate to Existing View. The relational keys will be the same in both Views, since this is enforced by Epi 6.

  • To enter data in Epi Info, it is necessary to convert the relational system used in Epi Info 6 to the Epi Info format. When a relate button is created in MakeView, a new field called FKey (foreign key) is added to the related table. To convert an Epi 6 relationship into an Epi Info relationship it is necessary to fill the fkey field with appropriate data. This is done in Analysis. Use the MERGE command to move values from the Unique Key of the parent table to the FKey of the child table by adding the RELATE command to the MERGE syntax. This is done using the Analysis Program Editor.

  5. Read the child table into Analysis.

  6. From the Data folder, select Merge.

  7. Using the MERGE dialog box create the key relationships and click Save Only. The MERGE syntax appears in the Program Editor.

  8. Place the cursor in the Program Editor at the end of the MERGE syntax and type the command RELATE.

  9. Click Run This Command and close Analysis.

  • Test the new relationships using Enter Data.

  10. Open the project in Enter Data and enter some test data. Continue the above process until all the relationships have been re-established for all the Views.

  • This procedure must be followed each time Epi 6 related tables are converted to Epi Info. Only Epi 6 or Epi Info can be used for data entry; it is not possible to use the same dataset in both systems once it is converted to Epi Info. Do not attempt to MERGE an Epi Info 6 file with an Epi Info dataset, as data may be lost or misidentified.


Import Epi Info 6 Check Code

Import Epi 6 Check Code

In order to import Epi 6 Check Code or a .CHK file, the corresponding Epi 6 REC file must be imported first.

Check Code in Epi Info is not quite the same as that in an Epi 6 check (.CHK) file; however, it is close enough that many features can be reused. Lines of Epi 6 code begin with an asterisk after being imported those that cannot be imported directly are commented with an asterisk and will be ignored in the Program Editor. Verify the correct syntax and test the code in MakeView and Enter. Some Epi6 CHK commands are now properties of the Field Definition dialog box in Epi Info such as RepeatLast, ReadOnly, and Range.

  1. Select Tools > Import Check Code from the MakeView navigation menu. The Import Epi 6 Check Code dialog box opens.

Import Epi 6 Check Code dialog box

  2. Click Browse to select the Path and Filename of the CHK File.

  3. Click Browse to select the Path and Filename of the MDB File to add the Check Code.

  • Select whether or not to Overwrite existing Check Code.

  • Select whether or not to suppress the list of Epi 6 fields that do not match the new file. Verify that the Check Code imported correctly by checking each field marked with an asterisk for error messages in the Program Editor.

  • Select whether or not to automatically generate Code Tables. Code Tables can be generated to make the fields functional. Go to the Field Definition dialog box and re-create any legal value fields using the existing tables.

  4. Click OK.

  5. View the Check Code from the MakeView Program Editor.

  • Code that does not contain the proper syntax will be ignored until changes are made.

  6. Test the code from the Enter module.


Sample INI File

[MnuEpiInfo]

Picture=C:\Epi_Info\EpiInfo.jpg

Buttons=True

LeftLoc=5

TopLoc=1.269531

Height=88.98438

Width=88.98438

WorkDir=C:\Epi_Info

[VARIABLES]

Language=ENGLISH

[Analysis]

Most Recent Database=C:\Epi_Info\Sample.mdb

Process Records=UNDELETED

[Storage]

Results Last Counter=899

Results Name=MyStats

Maximum No of Days Results are available=20

Maximum No of Results allowed=100

Maximum Amount of Space for Results=500

[EPI_INFO]

Represent Yes as=Yes

Represent No as=No

Represent Missing as=Missing

Version=3.4

Compdate=April 21, 2007

TerInsertMode=1

Editor font=Courier New;10

Editor font Bold=False

Editor Font Italic=False

[Statistics]

Statistics Type=COMPLETE

[Output]

Show Complete Prompt=1

Show Selection=1

Show Graphics=1

Show Percents=1

Include Missing=0

Show Hyperlinks=1

Show Tables=1

[Translations]

Lang1=English

Lang2=Spanish

[Enter]

Recent Database=C:\Epi_Info\newfile.mdb

Recent Table=babybp

Setup=Standard screen

[Makeview]

Recent Database2=C:\Epi_Info\newfile2.mdb

Recent Table2=test

Font Name=MS Serif

Font Size=10

Font Bold=False

Font Italic=False

SnapGridnumber=3

Snapgridon=True

VisibleGridoff=False

Snaptofield=True


Compdate Variable

COMPDATE (VERSION)

System Variable

Description

The value of CompDate is the compilation date of the Epi Info application. This date is displayed at the bottom of the Epi Info menu.

Syntax

@@CompDate

Comments

The compilation date is displayed on the Epi Info main page.

Example

ScreenText "@@CompDate", 50, 95, 8, yellow, Arial


Exists Function

EXISTS

Function

Description

This function returns a TRUE if a file exists; otherwise it returns a FALSE.

Syntax

EXISTS(<variable>)

  • <variable> represents the complete file path and name in text format

  • <path> represents the path of the file being located.

  • <path\> represents the path of the directory being located.

Comments

If the user does not have permission to access the file, a FALSE may be returned.

EXISTS(<path>) returns TRUE or FALSE if the file exists or not.

EXISTS(<path\>) returns TRUE or FALSE if the directory exists or not.

The Exists Function should be used with the IF Then Else or Repeat Until commands.

Example

If EXISTS (“C:\Epi Info\Test.BAT”) then

Execute ‘C:\Epi Info\test.bat

End

If Exists("d:\Temp\") then

Dialog "Directory d:\Temp\ exists"

End

If Exists("c:\Epi_Info\EpiInfo.mnu")=(+) then

Dialog "File epiInfo.mnu exists"

End


Predefined Variables

VERSION, COMPDATE, INSTALLDIR, INIDIR, WORKDIR, MENUDIR

  • Predefined variables provide information about the version of Epi Info (Version), the date of its release (CompDate), and the directory in which Epi Info is installed (InstallDir).

  • IniDir provides the path of the directory set in the menu with the SETINIDIR command. If no IniDir is set, InstallDir is returned. IniDir can be used as a directory for storing temporary files, since it is specified to be a writable directory.

  • A separate WorkDir can be set for each .mnu file, using the SETWORKDIR command, and the value of the WORKDIR variable reflects this setting for the current .mnu. It can be used to assure that files for a particular application are stored in a particular directory by including the value of @@WORKDIR in the path to which the files are directed. A space after WORKDIR is necessary to indicate the end of the variable name, but it will not appear in the final text. For example, if WORKDIR is C:\Epi_Info, the path for the database will be C:\Epi_Info\MySystem.mdb. If a space is intended after WORKDIR, then two spaces should be used. WorkDir is defaulted to the current menu folder when there is no WorkDir setup in the MnuEPIInfo section in the EpiInfo.ini file.

  • MenuDir can be used with @@ to obtain the file directory where the current menu file is read. MenuDir is always available and continues to work if the menu is copied to another directory or renamed and copied. For example, if the current menu file is c:\Epi_Info\class\EpiInfo.mnu, then the @@MenuDir is c:\Epi_Info\class. The value of MenuDir does not need to be in EpiInfo.ini, it comes from the EpiInfo.exe program whenever it is called.

Example

EXECUTE Enter.exe '@@WORKDIR \MySystem.MDB':"Surveillance"


SystemDate Variable

SYSTEMDATE

Menu System Variable

Description

Returns the system date and time.

Syntax

SYSTEMDATE

Comments

SYSTEMDATE can be used with @@ to obtain the system date and time.

Example

4/23/2002 9:31:03 AM


Data Reporter Menu

File Menu

  • Open is not available in the Data Reporter.

  • Save keeps changes to a report in the template file.

  • Save As keeps the setting for the currently open report and places them in a new template file.

  • Printer Setup allows the selection of print options such as printer location.

  • Page Setup allows page orientation and page set up selection.

  • Print sends a copy of the current view to the selected printer.

  • Exit closes the Data Reporter Utility.

View Menu

  • Designer displays the report in the designer view.

  • Printer Preview displays the report in the Print Preview window and shows how the printed report will appear.

  • Toolbar displays the Data Reporter toolbar.

  • Layout Window opens the layout dialog box and allows changes or updates to be made to the look of the generated report.

  • Global Settings opens the global settings dialog box and allows for updates or changes to the font, header and footer, font size, etc. of the generated reports.

Options Menu

  • Fit Report to Page resizes the view of the report.

  • Save Current Style as Default saves the current changes as the default settings and report generation style.

Help Menu

  • Help Topics opens the Epi Info Help file on using the Data Reporter.

  • About Data Reporter provides general information on the Data Reporter software.


Data Reporter Toolbar

Saves any changes to report to the template file.

Sends the current report to the selected printer.

Define Default Format saves the current changes as the default settings and report generation style.

Fit to Page resizes the report view.

Available Properties

  • Text allows the formatting of the title, header, footer, and text alignment in the report.

  • Fields allows the formatting of individual fields used in generating the report.

  • Styles allows the formatting of the header, font, background color, border color, spacing and border styles for the generated reports.

  • General allows the formatting of the subtotal position, page/printer settings and line break/page break settings.

Lists all fields in the data source. Fields can be added and grouped in the report by dragging and dropping them into the appropriate list.


Epi Chart Menu

File Menu

  • Open Template opens the Open Chart Template window and allows a previously saved template to be opened and settings applied to the current graph.

  • Save Template opens the Save Chart Template window and allows the current template to be named and saved with the .CHT extension.

  • Save as Windows Metafile opens the Save Chart as Metafile window and allows the current template to be named and saved with the .WMF extension.

  • Print sends the current graph file to the default printer.

  • Print Setup opens the Page Setup dialog box and allows margins to be set. Once OK is clicked, the Print dialog box opens and allows a printer and printing options to be selected.

Edit Menu

  • Edit Data opens the current graph data in a grid format.

  • Copy to Clipboard places a copy of the current graph on the clipboard for pasting into another application.

View Menu

  • 3D changes the display of the graph from 2D to a 3D format.

  • Rotate allows the rotation of a graph from a 3D view.

  • Palette places a color selector on the tool bar.

  • Titles opens the Titles dialog box and allows a new title to be entered and graph bar titles to be entered or edited.

  • Legend places a values legend on the graph. This legend can be selected and moved to new locations on the page as needed with the mouse or right-click to select from the location pop-up menu.

  • Series Legend places the series values legend on the graph. This legend can be selected and moved to new locations on the page as needed with the mouse or right-click to select from the location pop-up menu.

  • Fonts allows each title section to have a customized look by selecting the title location and entering options into the Fonts dialog box.

  • Grids places horizontal or vertical grids on the graph.

  • Scrolling turning the scrolling option on or off as preferred by the user.

Tools Menu

  • Tool Bar opens a tool bar containing many of the same options as the menu in a button format. Hover over individual buttons to access tool tips.

  • Palette Bar opens a color swatch tool bar and allows background colors to be dragged and dropped into the open graph.

  • Pattern Bar opens a pattern swatch tool bar.

About Menu

  • About Epi Chart provides information about the current version of Epi Chart.

  • About Chart FX provides information about the Chart FX module.

  • Exit close the Epi Chart application.


NutStat Menu

File Menu

  • New Table creates a new table.

  • Open Table opens a previously created table.

  • External Data gives the option of Import or Add Statistics. Import allows an .mdb file to be imported into NutStat from an existing table into a new table that has the data structure required by NutStat. The table can be an Epi Info table or a Microsoft Access table. Add Statistics allows the addition of statistical data to an existing table.

  • Save Record keeps changes made to the record.

  • Print sends the records associated with the currently loaded ID to the selected printer.

  • Print Preview opens the Print Preview window and allows for viewing of the printed page.

  • Exit closes NutStat.

Edit Menu

  • Cut removes the selected text and places it on the clipboard.

  • Copy places the selected text on the clipboard.

  • Paste inserts the copied or cut text into a selected field.

  • Find opens the Find dialog box and provides methods of searching for records based on search criteria.

View Menu

  • Grid allows for the viewing of data information in table (grid) format.

  • Refresh allows for the screen layout to be refreshed or updated.

Tools Menu

  • Generate Report opens the Data Reporter and displays the report results.

  • Graph produces a graph based on the open project.

  • Options opens the Customize Anthropometric Data window.

Help

  • Contents opens the Epi Info online help system.

  • About gives information on the Epi Info release.


Introduction to Translation

Translation of Epi Info programs, help files, and exercises into languages other than English is made by placing all English phrases used in the programs in a database called LANGUAGE.MDB, located in the ENGLISH subdirectory under the main directory of Epi Info (usually \Epi Info). Help files and exercises are also contained in the ENGLISH directory or its subdirectories.

Translated phrases, help files, and exercises are placed in similar directories named after the relevant language, such as SPANISH. Translation can be done without changing the names of files, and individual translations can be installed or uninstalled without affecting the main programs. Switching from one language to another can be done from the main menu, and is changed by setting the LANGUAGE variable in the file Epi Info.INI.


Data Compare Menu

File Menu Options

  • New Script opens the Data Compare wizard and walks through the opening and comparing of two tables.

  • Open Script opens the file selection window and allows a previously saved script to be located and selected.

  • Open HTML Report opens the file selection window and allows a previously saved HTML file to be located and selected.

  • Save Script saves the current script.

  • Save Script As allows the current script to be saved with a new file name or in a different directory location.

  • Script Properties opens the Select Script Properties window and allows properties to be viewed and/or edited in the current script.

  • Exit closes the Data Compare program.

Edit Menu Options

  • Cut removes the selected area and places the data on the clipboard.

  • Copy reproduces the selected area for placement in the current project or another project file.

  • Paste inserts the copied or cut areas into the current project or another project file.

  • Copy to Table 2 or Copy to Table 1 is available if there are records on the Unmatched Records tab. Records must be highlight selected for the copy option to be available. Copied records appear in a green grid. From Epi Info Views, when a record being copied has its own grids, these grids are copied over with the record. Copying grid records from Table 1 to Table 2 is allowed.

  • Delete Table 1 Record or Delete Table 2 Record is available is there are records on the Unmatched Records tab. Records must be highlight selected for the delete option to be available. Deleted records appear in a red grid. From Epi Info Views, when a records is deleted from a table, the grid records may also be deleted. Deletion of a grid record is not directly allowed.

View Menu Options

  • View as Read-Only is the default setting for Data Compare. This allows the viewing of compared tables without the ability to make edits. This option is toggled off by deselecting View as Read-Only or by clicking the Read Mode On/Off button from the Data Compare toolbar.

  • Show Introduction Page toggles on or off the Introduction Page that is viewed when the Data Compare wizard is opened from File > New Script or by clicking the New icon from the toolbar.

  • Show Message on Structure Identical toggles on or off the display of the Table Difference messages.

Help Menu Options

  • Contents opens the online help file with information on using Data Compare.

  • About Data Compare opens a window containing information on Data Compare and Epi Info.


Data Compare Toolbar

New New | Opens the Data Compare Wizard and allows for the creation of a new script.
Open Open | Opens the file selection window and allows a Script File (TXT) to be selected and opened.
Edit Script Edit Script | Opens the Data Compare Wizard for the current script so that changes can be made to selections.
Copy Copy | Reproduce the selected area for placement in the current compare.
Cut Cut | Removes the selected area and places it in the clipboard.
Paste Paste | Inserts copied or cut areas into the current compare.
Read Mode On | Read Mode On is the default setting for Data Compare. Tables are compared but changes cannot be made. Click the Read Mode On button to toggle to Read Mode Off.
Read Mode Off | From Read Mode Off status, edits can be made to the tables including copying and pasting and accepting table values.


Data Comparisons

Table Types

Data Compare supports two types of database tables, Epi Info Views or Standard data tables.

  • Views contain fields and may contain grids. There are a number of special fields in a View table including RecStatus which is an indicator field filled with either a 0 or 1. Deleted records appear as 0 in the RecStatus column. UniqueKey is an auto field. FKey is a foreign key contained in a grid table.

  • Standard tables are regular Microsoft Access tables.

Table Structure

  • The Epi Info View table is a table structure or cluster that references to fields and grids in the view. From the view structure, Data Compare collects all record data and grid data that associates to the fields and grids for the data comparison.

  • Epi Info Grids must be identical in grid table structure to be compared.

  • If an Epi Info View includes a Related View, then compare the Related View separately from the current View comparison.

  • Standard table structure is determined in Access when the table is designed. Data Compare only checks Field Names and Data Types for the table structure. Any differences found in structure, generates a Structure Differences Report.

Common Fields

  • Fields with the same name and data type in both tables refer to common fields. The match fields and the compare fields can be selected from these common fields. A field might not be available in common fields, if its name is not included in the Epi Info View table. RecStatus, UniqueKey, and FKey are not included in common fields since they function as Epi Info internal control fields.

  • If Standard tables are used, or if the View is compared as a standard table, then the Autonumber field can be selected as a match key and all hidden Epi Info fields appear in the match selection list. If the Uniquekey, RecStatus, or FKey are not selected as match keys, they will be available as compare fields. The Autonumber field may appear as a difference, but its value is protected by the database system and its value cannot be changed. Common fields may also mean be the fields listed on the right of match fields in Unmatched Records Tab. When copy a record from table 1 to table 2, the values of these fields will be copied over with the match key value.

Match Fields

Match fields (Match Keys) are identifiers used to get records from two tables when using a SQL query. A match key can be single field or multiple fields. A match key must be unique.

  • When comparing grids from Epi Info Views, both table match key and grid match key, must identify a unique combination. Grid match key is a single field only. If a match field is selected for a grid, then the grid is also selected for comparison. Fields with Memo type cannot be selected as match fields.

  • If an Epi Info View is selected as a standard table comparison, then lists, Check Code, or web code can not be a matched fields. They are filtered out from the match fields selection. Null values in a match field may place the record in the Unmatched Records list even if the two records in comparison are identical.

Compare Fields

Compare fields are selected from the common fields after the match key selection. Although Memo type fields can not be matched fields, they may be available for selection as compare fields.