Getting Started in ADN/CMS Quick Facts for MINITAB ADN Computer Center Document #1510003 6 Pages September 17, 1990 Introduction This document presents the basic information you need to use MINITAB in CMS. The first section gives a brief overview of MINITAB, and points you to further information about the package. This section is followed by MINITAB features specific to UIC (e.g., running the program, printing the output, etc.). The last two sections discuss using MINITAB and give examples of some simple MINITAB commands. By following the information provided in this manual, you should be able to begin using MINITAB. Throughout this document, the parts of commands that appear in uppercase must be entered exactly as they are typed; parts which appear in lower- case are used as examples -- you can substitute your own names where appropriate. Where To Go For More Information MINITAB is a general purpose statistical computing system designed espe- cially for students and researchers who have no previous experience with computers. Version 7.0 is the current version of MINITAB available on UICVM CMS at UIC. MINITAB provides a manual that contains both specific MINITAB commands and information about the package. The manual is enti- tled MINITAB Reference Manual, Release 7. It is available for purchase at the campus bookstores. In addition, the Computer Center provides several online documents that discuss the use of MINITAB at UIC. To view or print these documents, enter INFORM MINITAB from CMS. Of par- ticular interest is Using MINITAB on CMS at UIC, which includes a sample MINITAB session. Quick Facts for MINITAB page 2 ======================================================================== Getting Online HELP for MINITAB Extensive information about MINITAB commands is available online. To obtain this information: 1. On CMS, enter the command: MINITAB 2. In MINITAB, enter the command: HELP HELP 3. You will be prompted by a menu to enter either HELP OVERVIEW (for general information about MINITAB), or HELP COMMANDS (for informa- tion about specific commands). 4. To leave the MINITAB HELP menu, at the MTB> prompt, enter: STOP Running MINITAB on CMS MINITAB is usually run interactively. This means that each command is submitted and processed individually. As soon as MINITAB encounters an "executable" command (a command that can be processed immediately), that command is processed and the results are displayed. Entering MINITAB To invoke MINITAB follow these steps: 1. In CMS, type MINITAB and press . Your screen will clear and a new screen will appear, with the word "MTB>" near the upper left-hand corner of the screen. Your cursor will be in the lower left-hand corner of the screen. 2. Type a MINITAB command and press . The command you type will appear next to the MTB> prompt and it will be processed. Any output produced by the command will be written directly to the screen. Leaving Interactive MINITAB To leave MINITAB and return to CMS, enter the MINITAB command: STOP MINITAB Output MINITAB output is always displayed on your terminal screen, but you can also have it written to a file on your disk so you can review or print it later. To do this, use the MINITAB command OUTFILE. The format of _______ this command is OUTFILE 'filename filetype filemode' Quick Facts for MINITAB page 3 ======================================================================== Where "filename filetype filemode" is the CMS file identifier of the file where the log of your MINITAB session will be kept. The log will begin with the next MINITAB command you enter. For example: OUTFILE 'minitab listing a' After you leave MINITAB, you can view and/or print your log: * To view the output of your MINITAB session, after leaving MINITAB enter XEDIT filename filetype filemode where "filename filetype filemode" is the same name you used when you issued the MINITAB OUTFILE command. * To print the output of your MINITAB session, after leaving MINITAB enter PRINT filename filetype filemode where "filename filetype file- mode" is the same name you used when you issued the MINITAB OUTFILE command. This invokes a menu driven program that allows you to speci- fy where you would like the file to be printed. MINITAB Programming Logic Your MINITAB session should proceed in a logical fashion. For example, variables must be defined before they are used. In general, you should follow these steps in executing MINITAB: 1. Define the variable names 2. Enter the data 3. Perform any data transformations 4. Perform the analyses You can repeat steps 3 and 4 as often as necessary. Notes and Error Messages MINITAB has two types of error messages: 1. NOTES. If you do something MINITAB thinks might be in error, notes are printed, a reasonable course of action is taken, and the rest of the program is executed. An arithmetic fault also results in a note. Examples include division by zero or taking the square root of a negative number. In all cases, MINITAB sets the value to zero and prints a note. 2. ERRORS. If an error is too serious for a reasonable corrective action to be taken, MINITAB skips the command in error and you are asked to reen- ter the command. Quick Facts for MINITAB page 4 ======================================================================== Simple MINITAB Commands This section is designed to give you some familiarity with some simple MINITAB commands. While it is by no means comprehensive, this section is intended to allow you to see what MINITAB is capable of, and the syn- tax of some basic MINITAB commands. See the MINITAB Reference Manual, Release 7 for further information about these commands as well as other commands. MINITAB Statement Format MINITAB has some basic syntax rules: 1. Each command must start on a separate line. 2. Data are put on separate lines following a READ command. 3. Numbers are separated by commas and/or blanks. 4. Commas cannot appear within a number (use 1234 instead of 1,234). 5. Commands may be continued onto a second line by placing an ampersand "&" at the end of the first line. 6. A list of consecutive column numbers (or stored constants or matri- ces) may be indicated by using a dash. For example, READ C2-C5 is equivalent to READ C2 C3 C4 C5. Specific Commands 1. DEFINING DATA READ C1 C2 ... Cn READ 'filename filetype filemode' C1 ... Cn where: "Cn" indicates the last "column" into which data is read. For example, if you are reading in data about 5 variables, your READ state- ment would look like the following: READ C1 C2 C3 C4 C5 MINITAB stores data in a worksheet of rows and columns, similar to a spreadsheet. READ enters data into the columns you specify -- in the example above, columns 1-5. If you specify "filename filetype filemode" the data will be read from the CMS file so named, otherwise the data will be read from the terminal. 2. ENTERING DATA Data are entered directly after the READ command, one row of data per line. The values should be separated by blanks and/or commas. READ C1 C2 C3 1 2 3 4 5 6 12 13 14 END Quick Facts for MINITAB page 5 ======================================================================== The END command should be entered when you have finished entering the data values. Rules for Data Entry: a. Data lines may contain letters or words (which will be ignored), but cannot start with a valid command name (e.g. READ). b. Data lines may be continued by typing an ampersand, "&", at the end of the line. c. An asterisk, "*", can be used to indicate that a data value is miss- ing. d. Comments can be embedded in the data with the pound sign, "#". e. If data are entered interactively, an END subcommand should follow the last line of data. 3. ASSIGNING NAMES TO COLUMNS NAME C1 = 'name1' ... Cn = 'namen' where: name1 is the name of the variable stored in column 1 (C1). namen is the name of the variable stored in the last column (Cn). For example: NAME C1 = 'Height' C2 = 'Weight' Variable names can be up to 8 characters long. A name may not begin or end with a blank, and single quotes and the pound sign (#) cannot appear as part of a name. 4. CREATING A MINITAB WORKSHEET SAVE 'filename' where "filename" is the filename of the worksheet that you create. MINITAB will automatically provide the worksheet with a filetype of MTW. The MINITAB worksheet contains the variable names and their values, along with all the information provided about your variables (such as variable labels). It also contains any new values that were created up to the point the worksheet was saved. You cannot edit the saved work- sheet with XEDIT or another editor, since it is stored in a format that only MINITAB can read. The creation of a worksheet is an extremely efficient method for storing data that will be analyzed repeatedly by MINITAB. If you are analyzing the same data repeatedly, we urge you to create a worksheet and use that worksheet in all further analyses. As an example, the command: SAVE 'mydata' Quick Facts for MINITAB page 6 ======================================================================== will create a worksheet named MYDATA MTW A1. This file will be stored on your minidisk when your MINITAB session has been completed. 5. USING A SAVED WORKSHEET RETRIEVE 'filename' The RETRIEVE command allows you to read an already existing worksheet. Thus, the command: RETRIEVE 'mydata' will read a previously created worksheet named MYDATA MTW A1. 6. CREATING NEW VARIABLES LET newvar = expression The LET statement is used to create new variables. You can use all basic arithmetic operations in a LET statement. An example of each is presented below: OPERATION: EXAMPLE: Addition LET newvar=oldvar1+oldvar2 Subtraction LET newvar=oldvar1-oldvar2 Multiplication LET newvar=oldvar1*oldvar2 Division LET newvar=oldvar1/oldvar2 Exponentiation LET newvar=oldvar1**oldvar2 Where, in all cases, the variables "oldvar1" and "oldvar2" must be defined previously in your MINITAB session. Mathematical operations are performed in the following order: a. Exponentiation b. Multiplication/Division c. Addition/Subtraction In addition to these mathematical operators, MINITAB also provides a number of mathematical functions, such as the sine, absolute value, or square root of a number. See the MINITAB Reference Manual for a com- plete list of these mathematical functions. 7. STATISTICAL ANALYSES Commands for running various statistical analyses are specified in the MINITAB Reference Manual. This information is also available online during your MINITAB session through the MINITAB HELP facility.