Getting Started
Organizing your data for analysis
Suppose you have three test scores collected from a class of ten students (5 females, and 5 males) during a semester. The information you have for each student is: identification number, gender (1=female, 2=male), score for test one, test two and test three (the full data is collected toward the end of this section for you to enter into the Worksheet window). Your first task is to present the data in a form acceptable to MINITAB for processing. Before showing you how to enter the data, let us look at what MINITAB accepts as data.
MINITAB uses data organized in row and columns. The rows are cases, and the columns are variables. MINITAB automatically numbers columns in the worksheet as C1, C2, and so on. A MINITAB worksheet can contain up to 4000 columns, and as many rows as your worksheet size will allow. Minitab dynamically allocates memory to hold the data for the current worksheet. If the data in the current worksheet grows, Minitab will allocate more memory. If you ever run out of memory, Minitab will display error messages about insufficient memory or insufficient storage space. The messages will advise you on how to immediately increase available memory. If you receive memory error messages frequently, you can change your preferences for memory allocation, although there are advantages and disadvantages to doing this. To change your memory preferences, choose Tools > Options > System .
A case contains information for one unit of analysis, e.g., a person, an animal, a product, etc... Variables are information collected for each case, such as name, score, age, etc... In the chart below, there are two cases and four variables. When data are arranged in rows and columns like this and stored in a file, it is called a case-by variables or rectangular data file.
|
variable
|
|||
|
↓
|
|||
| Name | Test1 | Test2 | Test3 | |
|---|---|---|---|---|
|
Tim
|
20
|
23
|
24
|
←case
|
|
Hans
|
21
|
26
|
28
|
MINITAB handles three types of data: Numeric (numbers and *), Text (characters that can consist of a mix of letters, numbers, spaces, and special characters) and Date/Time (dates, times or both). MINITAB determines the type of a variable based on the first row of the column. A numeric variable will only have numbers as values. Each text variable can have a maximum of 80 characters (letters, numbers, punctuation symbols, blanks). Upper and lower case character values in a variable are differentiated.
Text variables cannot be used in analysis in most of MINITAB procedures. If you want to use text data in a place where only numeric data are supported, you can use the Code command in the Data menu to convert text values into numeric values.
The numbers stored in numeric variables can have up to 15 or 16 digits (depending on the number) without round-off error. You can use a negative (-) sign for negative numbers. MINITAB reads numbers with decimal points or exponential notation.
Even though MINITAB automatically assigns a column number for each variable in the worksheet, you may assign a unique name for each variable. A variable name (column name) can contain up to 31 characters, with no leading or trailing spaces, no single quotation marks (') and no octothorpes (#). A name cannot consist of a single asterisk (*). A variable can be addressed with its column number or the name you assign to it.
Numeric missing value is flagged by a * and by a blank for text (formerly called alpha) variable. Use the continuation symbol ampersand (&) at the end of any line to indicate that the command or data row continues on to the next line. MINITAB returns with the CONT> prompt. MINITAB ignores any statement you enter after the comment symbol (#). In a prompted session, MINITAB uses several different prompts to help you know what kind of input it expects (e.g., MTB>, SUBC>, DATA>, CONT>, Continue?).
With the above information in mind, let us get ready to enter our data mentioned in the above example. Even though it is not mandatory to assign a name for each variable to be entered into the worksheet, since MINITAB assigns column numbers (e.g., C1, C2, C3,..) as variable names, it is a good idea to name columns so that you won't forget what they contain. Before entering data into the worksheet, we suggest preparing a code book, as shown below, especially when dealing with several variables of varying types. A code book, however, is not mandatory for data analysis.
Column var. name type length C1 ID numeric 2 C2 SEX numeric 1 C3 TEST1 numeric 2 C4 TEST2 numeric 2 C5 TEST3 numeric 2
In our example, all variable types are numeric, and all but one variable, sex, take up two fields/spaces in their assigned columns.
The next task is to enter the data into the computer. There are several options for entering your data. You may enter your data using a text editor or word processing packages (e.g., MS-Word, Word Perfect ). Files created using word processing software should be saved in text format before trying to read it into a MINITAB session. Data entered into spreadsheet packages (e.g., Excel, Lotus) can be read directly into a MINITAB session.
Entering data into worksheet
Now, let us enter the data into the worksheet. The first task is entering the variable names.
Move the cursor to the cell immediately below the cell labeled C1 and type id and press TAB. Now the cursor moves to the cell below the cell labeled C2. Type in sex and press the TAB key. Type in the remaining three variables, test1, test2 and test3 under columns C3, C4, and C5.
Instead of using the TAB key for moving to the next cell, you could use the ENTER key. However, the ENTER key moves the cursor in the direction of the data entry arrow shown in the top left corner of the Data window. You can change the direction of this arrow by clicking on it.
The top row should have the above five variable names (below each column number). The next task is to enter the data points. Make sure the data entry arrow is pointing right. Move the cursor to the cell immediately below the variable id. Highlight 10 rows of the worksheet, beginning with the cell containing the cursor. To do so, press the shift key down, and use the right arrow key to move the cursor to column 5. Now, while continuing to hold the shift key down press the down arrow key until the cursor reaches 10th row. Now 10 rows and 5 columns are highlighted. You may also use the mouse to accomplish this task. Make sure that the selected columns are highlighted as you enter the data.
Enter the data as shown in the worksheet below, pressing the ENTER key after each value. Since the rows and columns are highlighted the cursor automatically moves to the second row when you are finished with the first row. If you don't highlight the worksheet, use an arrow key to move the pointer to the beginning of the second row after finishing the first row. If the numlock key is on, you can use the keypad to type in numbers.
Creating a new variable
Now that you have entered the data into the worksheet, save it on to Desktop. Before saving it, let us create a new variable, average, to represent the mean score from the three tests for each student he/she took during the semester. (Note that creating the variable average is independent of saving the file.)
- From the Calc menu select Row Statistics...
- Select Mean from the options appearing in the dialog box.
- Click on the box below the Input variables:. Now the variables in your data set will appear in the box on the left of the dialog box.
- Type in test1 test2 test3 (or select them from the variable list).
- Click on the box to the right of Store result in:.
- Type in average.
- click OK.
The variable average will appear in column 6 (the next empty column). Note that, instead of typing the variable names (test1 test2 test3) you could also type C3-C5 in the Input variable box.
Now, suppose you want no decimal points for the new variable in column 6.
- Move the pointer to column 6, which is the variable named average and click on the the cell labeled C6 to highlight the variable column.
- Select Format Column > Numeric... from Editor menu.
- Select Fixed decimal width and type 0 in the box right to it. (Note that this affects only the way the numbers are displayed in the data window, but not how the values are stored.)
- Click OK.
Now the variable average appears with whole numbers.
Save the data file
Now to save the data (worksheet) file:
- Select Save Current Worksheet As... from the File menu. A dialog box appears.
- Click on the icon of Desktop to change the path to Desktop.
- Type example1.mtw as filename (specify appropriate pathname if you are using alternate location to store the file)
- Click OK.
The file will be saved on to the Desktop in MINITAB format.
Reading a data file in ASCII (text) format
In some situations, you may have created a data file using other software applications (e.g., Excel, Lotus, Quattro Pro), a data editor, or a word processor. In such a situation, you do not have to enter your data again into the Worksheet. You can import such files into MINITAB. Refer to the MINITAB Reference Manual for details on importing files created using spread sheet software. In the example below, we are going to import an ASCII data file into MINITAB worksheet. MINITAB can read ASCII data in free-format (each value is separated by at least one space, or comma, without any blank cells, and no text variables), and fixed format (each value appears in the same place for every case). Text variables also can be imported using fixed format.
Suppose the data file we discussed above is stored on Desktop as an ASCII file, example1.dat, as follows:
01 1 83 85 91 02 1 65 72 68 03 2 60 74 64 04 2 88 96 92 05 2 84 79 82 06 1 90 94 90 07 1 87 80 82 08 1 78 86 80 09 2 90 87 93 10 2 76 73 70
To import the data into MINITAB:
- Select New... from the File menu , and choose Minitab Worksheet from appeared dialog box, then click OK.
- From the File menu select Other Files > Import Special Text....
A Import Special Text dialog box appears.
- Specify C1-C5 as the columns to store the data.
- Click OK.
Another dialog box appears titled Import Text from File.
- Click on the icon of Desktop to change the path to Desktop (specify appropriate pathname if the file is stored in alternate location).
- Type example1.dat. (You may use the mouse to select the file.)
- Click OK.
Now the data will appear in the worksheet. You may enter the labels for each variable immediately below the column number, as you did in the earlier example.
If the data you intend to import has more than 160 characters per row, then go to the Session window and type the command: IW 512 before choosing Import Special Text... from the File menu.
If your data is entered without a blank space between the variables you may read it into MINITAB using fixed format style. To import ASCII data involving text variables use the fixed format. Suppose in the above ASCII data file, example1.dat, the variable sex was given as a text variable (1=F, 2=M) as shown below.
01F838591 02F657268 03M607464 04M889692 05M847982 06F909490 07F878082 08F788680 09M908793 10M767370
To import the file:
- From the File menu select Other Files > Import Special Text...
- Specify C1-C5 as the columns to store the data.
- Click Format...
- Click User-specified format from the dialog box titled Import Special Text - Format.
- Type in F2,A1,F2,F2,F2 or F2,A1,3F2
- Click OK.
Descriptive statistics
Now that we have data in the worksheet (here we are using the file where the variable sex is entered as a numeric variable), let us run a few descriptive statistics. (The worksheet will still be displayed in the Data window. If not, from the File menu select Open Worksheet and choose example1.mtw; the file you saved earlier.)
Of the variables in our data set, sex is a categorical variable, and test1, test2, test3, and average are continuous variables. We will use the Tally (Stat > Tables > Tally Individual Variables...) command to obtain frequency counts for the variable sex, and Descriptive Statistics (Stat > Basic Statistics > Display Descriptive Statistics...) to obtain descriptive statistics (e.g., Mean, StDev, N).
Tally Individual Variables
To run the Tally procedure:
- Select Tables from the Stat menu.
- Select Tally Individual Variables... from the Tables menu. A dialog box titled Tally Individual Variables... appears.
- Highlight the variable sex from the box on the left.
- Click Select. The variable sex appears in the Variables: box.
- Select Count, and Percents from under the Display menu. (You may choose more options as necessary.)
- Click OK. The output appears as shown below.
Descriptive Statistics
To run the descriptive statistics:
- From the Stat menu select Basic Statistics. From Basic Statistics select Display Descriptive Statistics. Select test1, test2, test3, and average for variables. The variables appear in the box on the right.
- Click OK.
The output from the commands you just executed appears on the screen as shown below.
The number of decimal places in the output cannot be tailored through any menu options in MINITAB. However, you may edit the Session window. To edit the output select Editor > Make Output Editable.
You may select a grouping variable to obtain separate analysis for individual groups. Suppose you want to obtain separate listing of the above analysis for males and females.
- From the Stat menu select Basic Statistics. From Basic Statistics select Display Descriptive Statistics. Select test1, test2, test3, and average for variables. The variables appear in the box on the right.
- Select By variable: and type in sex in the box.
- Click OK.
The output appears as shown below. Note that the amount of information provided by the Descriptive Statistics in the output cannot be tailored. However you can use the Calc menu to calculate a particular statistic you want and write to a column.
Printing output
Once you are satisfied with your analysis you may want to obtain a hard copy of the output. You may print the entire output or selectively delete unwanted portion of the output before printing, or select the part you want and then print that part. You may also save the output file (File > Save Session Window As... from the Session window) into files on your Desktop (or where directed) for later use.
To print the output from the Session window:
- Select Print Session Window... from the File Menu.
- Click OK at the print dialog box.
The contents of the window will now be printed.
Next: Data Analysis
Prev: Orientation
Up: Table of Contents



