| WINKS Manual Index | Help | Home | Tutorials |

WINKS Online Manual


Chapter 5 Part 1

Advanced Tabulation

The WINKS Advanced Tabulation module allows you to create a wide variety of tables containing counts, averages, sums and more. This procedure can be used to create reports about your data quickly, easily, and in a convenient format. Tabulate categorical data up to two rows and two columns, and up to 128 categories in each row or column. Plus, you can report counts, averages, sums or standard deviations in each cell of your table. You can also request subtotals and totals by row or columns and output tables using a "by" variable. Unlike the Crosstabulation procedure in the BASIC edition of WINKS, which is used for Chi-Square analysis, the Tabulation procedure is primarily a reporting and data reduction program.

What are Tabulation Variables?

Your database for the tabulation procedure must contain at least one categorical variable. Usually, a tabulation database will contain a number of categorical variables and one or more continuous variables. The tabulation procedure cannot use date or logical variables.

Note:
You may want to use the data editor to manipulate your data to specify groups or categories that you wish to use in the tabulation procedure. The new Recode procedure described later in this manual can help you do this.

Selecting Variables for Use in Tabulation

Once you open a database and select “Advanced Tabulation” from the Analyze menu, a dialog box will appear allowing you to specify which variables you want to be available for the Tabulation procedure. Select all variables you may want to use since you will be given a chance within the Tabulation procedure to create any number of tables using only a few or all of the selected variables.

Understanding Missing values in Tabulation:
When you make the initial selection of which variables to use in the Tabulation procedure, notice the following radio button at the bottom of the selection dialog box:

¦
Include records with missing values

If this option is NOT selected, all records with missing values in any of the fields you have selected will be excluded from all tables you create. If you SELECT this item, Tabulation will pass all records to the Tabulation procedure, and it will only eliminate records with missing values as you are building your tables, which means that if a record contains a missing value in one field, but you do not use that field in creating a table, the information in that variable will be used. Once you have selected which variables to use in Tabulation, the tabulation main dialog box will appear, as shown in figure 1.


Figure 1

In the Tabulation dialog box, you specify how you want your table created using these options:

Fields: The Fields list box contains all of the field names you selected to be available for the Tabulation procedure.

Row Gp and Col Gp: These buttons are used to tell the procedure which fields to use to create Columns and Rows in the table. For best results, select only fields containing categorical variables. The variables may be either numeric or character type. You may select up to two columns and two rows.

Remove: If you place a variable in the Col Gp or Row Gp boxes, then decide differently, highlight the name of the field in the Col or Row box and click the Remove button.

Obs Var: This button allows you to specify an observation variable to be used in the table. This variable should be of a numeric type and be continuous. Its purpose is to allow you to create tables containing averages, sums or standard deviations. For example, if you create a table for stores by state, the observation may be sales. This would give you a table that shows sales within each store in each state.

Table Title: This text box allows you to specify a title that will appear at the top of the output.

By Group Combo Box: This selection box allows you to optionally specify a “by” group variable. The field should be categorical, and may be either numeric or character. When selected, this will cause tables to be subgrouped on this variable. For example, if you have a “Month” variable and create a store by state table, the program will create a new table for each month.

Row Totals On and Column Total On: These option boxes allow you to choose to have your tables include totals on variables selected for rows or columns. You must have selected an Obs (Observation) variable for these options to work.

Include Sub Totals: These boxes may be optionally selected if matching Row or Col Totals options are also selected. They cause the program to include subtotals within the tables.

N, Average, St. Dev, Sums: Normally, a table will report the count (N) of observations that fall within each cell. Using these options, you can specify which specific statistics will appear in the table. If you select Average, St. Dev or Sum, you must also have selected an Observation variable.

Field Format and Labels Options: At the bottom of the Tabulation dialog box, you may select formats and labels for the variables selected in Row Gp, Col Gp, and By Group. Under each field name is a drop down box that lists all defined field formats (see “Creating Field Formats” later in this section.) Select the field format that fits the field name. For example, if your field is Gender, where the data contain 0=Male and 1=Female, you would select the field format called SEX01. This will cause the information in the table to be reported as Male and Female instead of the more cryptic 0 and 1.

The Label option allows you to select a label to be used in place of the field name. For example, if your field is called MTH, you may want to label it “Month.” Then, instead of MTH appearing in the table, the label Month will be used.

The Ok Button: Once you have defined your table, click on the Ok button to tell the program to create the table. Depending on the size of your database, this usually takes only a second or two. You may then view the table created by clicking on the View Buffer Button.

End Button: This button ends the Tabulation procedure and returns you to the main WINKS menu. Any tables you have created will be displayed in the WINKS Viewer.

View Buffer: You may see the tables you have created in the Tabulation procedure without having to return to the main WINKS menu by clicking on the View Buffer button. From the viewer, you may print, copy, or save the information. When you exit the procedure, you return to the Tabulation dialog box. From there you can create more tables. Each time you create a table, it is appended onto the information already in the buffer.

Clear Buffer: If you create a table you do not want to keep, click on the Clear Buffer button to clear information in the buffer. This enables you to experiment with the options in the Tabulation dialog box to get your table just right before printing or saving it.

Help: Displays information about using the Tabulation Procedure.

Save: After creating a table definition that you like, you may want to save all of your choices to use them again. (Perhaps you will add new information to your database.) When you click on the Save button, you will be given an opportunity to enter a save file name (must be 8 characters or less.)

Get: The Get button allows you to get a previously saved table definition. You may use this definition on data from a different database than the one used to create it as long as the same variables previously used are available in the different database.

Options: When you click on this button, an Options dialog box is displayed, as shown in figure 2.


Figure 2

 

In the Options dialog box you may select the width of the printed page, the formatting of numbers in the table and the Row label width. All of these options are saved when you select the Save button. For example, if you are creating a wide table to be printed in landscape mode you may want to change the Maximum width from 80 to 130.

Tabulation Program Features: When creating a table, you should keep this information in mind.


Tabulation Example

Follow this example to create an example table.

Step 1: Begin the WINKS program and open the database named TABDATA.DBF. From the Analyze menu, select Advanced Tabulation.

Step 2: Select the fields that will be available in the tabulation procedure. Highlight all of the field names and click Add, then click Ok. The Tabulation dialog box will appear.

Step 3: Select the Region field for the Col variable, and the Area field as the Row variable.

Step 4: On the By Group drop down dialog box, select the Month variable as the “By” Variable.

Step 5: Apply formats to the selected fields. For the By Field, select MTH as the format for MONTH. Select the AREA format for AREA and the REGION format for REGION.

Step 6: Enter labels for the variables: Enter the label Month for MONTH, Area for AREA and Region for REGION.

Step 7: Click Ok to create the table, then click on View Buffer to view the resulting table. Exit the viewer to return to the Tabulation dialog box.

Step 8: Create other tables or End the Tabulation procedure to return to the WINKS main menu.

The tables resulting from this example are shown below:

---------- Month = Jan ----------

------------------------------
|        |     Region        |
|        |-------------------|
|        |   North |   South |
|--------|---------|---------|
| Area   |         |         |
|--------|         |         |
|Inside  |        8|        3|
|--------+---------+---------+
|Outside |        8|        8|
|--------+---------+---------+

---------- Month = Feb ----------

------------------------------
|        |      Region       |
|        |-------------------|
|        |   North |   South |
|--------|---------|---------|
| Area   |         |         |
|--------|         |         |
|Inside  |        8|        3|
|--------+---------+---------+
|Outside |        8|       10|
|--------+---------+---------+

Key: Statistics in table are: N

Notice that two tables were created, labeled Jan and Feb. This resulted from the MONTH “By” variable (the database contains information on two months.) The numbers in the table are the counts of records containing information for Area and Region.

Experiment with this table by adding the Score Field as the Observation variable, and select to display average, totals, and subtotals.

Defining Format Definitions for Tables

In the previous example, several formats were used to enhance the look of the table. This allowed your output to report the name of the month (i.e., Jan, Feb) instead of a more cryptic 1 and 2. The tabulation procedures come with a set of automatically defined formats, but you can also create your own.

The file called FORMAT.DAT, which will be in your WINKS directory, contains format definitions. You can edit this file with any ASCII text editor including Word, WordPerfect. (Just remember to save the results in text format.) Initially, the format file contains this information:

@SEX01
0=Male
1=Female
@SEX12
1=Male
2=Female
@SEXMF$
M=Male
F=Female
@MTH
1=Jan
2=Feb
3=Mar
etc…
:
@ENDFORMAT

You can add your formats using the same syntax shown here. (1) Begin the format name with an “@” (2) If the format is character, place a “$” as the last character in the format name. The last line in the FORMAT.DAT file must be @ENDFORMAT. Once you enter new formats in this file, they will appear in the format drop-down boxes within the Tabulation procedure.


 
Continue to Chapter 5 Part 2. (Advanced ANOVA.)  

     


| Previous Section | Next Chapter | WINKS Manual Index | Help | Home | Tutorials |