Statistics 401D Getting started on JMP Spring 2014 1. Open the JMP Starter window (you may do this by checking JMP Starter in the View drop list). You may close the Home Window by unchecking it in the View drop list). I like to work with the JMP Starter window and recommend that you do too. The JMP Starter window consists of several tabs (shown above) that provide easy access to many of JMP's features. We will also use the JMP’s window menu system using the menu items on top of the window. Note that the File tab is selected on the left pane above; the tabs on the right pane match this selection. 2. Creating a new JMP data table If using the JMP Starter window: Select the File tab. Click on the New Data Table bar on the resulting dialog. (Shorthand notation for this action is: JMP Starter → File → New Data Table) This may also be brought up directly using the JMP’s window menu system. The menu sequence for this is: File → New → Data Table 2 Either of these actions will create a blank JMP data table in which you can enter data values. Each column in the data table corresponds to a variable and each row to an observation in the data set. That is, the data values in each row of the table correspond to measurements of the variables pertaining to a single individual or an experimental unit. The data tables thus created have a special format and are saved as .jmp files in a folder of your choice using File → Save As … from the JMP menus. Some sample .jmp data files are located in the folder named Sample Data. It is easiest to access this folder by selecting the Help → Sample Data menu item. This will open a window within JMP that contains a sample data index. Clicking on the tab labeled Open the Sample Data Directory (the topmost tab) will produce a dialog box (similar to the dialog box shown below) giving access to the Sample Data folder. Sample .jmp files used in JMP manuals are available in this folder. The Big Class.jmp data file used in examples below is located in this folder. JMP data files can be opened directly in JMP by double-clicking on the file name (either of a file located in a folder in your hard drive or a link on your browser pointing to such a file). Clicking on the .jmp file when using a browser should open up JMP with the data showing in a JMP data table. If you open the JMP system in this way, you may need to open a new JMP Starter window (since one may not be present by default) using View → JMP Starter from the JMP window menu system as described earlier.. 3 3. Creating a new JMP data table from data available in a text file It is not always necessary to create a JMP data table by entering data in the way described in Section 2. In fact, data sets are usually available in some format as a text file. Some common formats for text files are those containing fixed width fields (i.e., each data field has fixed number of columns for all observations), or those containing comma, space, or tab delimited fields (i.e., data values are separated by the same character e.g., a comma, or a space, called a delimiter). To convert a data set available as a text file in any of your folders to a JMP data table, begin by selecting the File menu item Open… from the JMP’s window menu system (or equivalently, use JMP Starter → File → Open Data Table). This action will cause JMP to produce the Open Data File dialog box. An example of this dialog box is shown below. Then you may use the icons on the left panel to navigate through the folder system and then browse a selected folder to locate the data file you want to convert to JMP. Once you have located this folder you could use the drop down menu at the bottom (see the box with Data Files selected, by default) for selecting a file type. To read data stored in a text file (possibly with file type .txt) into JMP, select the item Text Files from this drop list. This will change the appearance of the Open Data Table to the one shown on the next page. Enter the name of the file in the File Name: box (or select the name of the file from the list of files that are displayed) and check Data with preview button in the Open as: set of options (displayed above the file name box). Then click Open. 4 A dialog box that shows a preview of how the rows of the data are to be read appears. A screen shot of this dialog box is shown below. If the preview data lines appear to be incorrect, the type of delimiting character (if the data lines have delimited fields) and/or the end of line character may need to be changed. 5 This is done by checking the appropriate End Of Field and/or End Of Line sets of boxes seen in the middle of this dialog box. To change the delimiting character, select one or more of the options Comma, Tab, Space, or Spaces as applicable. Occasionally, an additional delimiter may have to be entered by checking the Other box and entering the character. Similarly, change the end of line character if needed. In addition, you may have to select (or unselect) the check box labeled File contains column names on line depending on whether or not the first line (or any other specified line) of your data contains names of the columns. When the appropriate boxes have been set, or if nothing needs to be changed, click the Next button at the bottom of the dialog. The next page of the dialog box (not shown) allows the user to change column names and/or types before importing (use the icons displayed on the top line). At this point, if the displayed preview rows of your data are as you expect them to be, click Import. Otherwise, you may reset some of the boxes and try again. By observing the data columns in these two dialogs, we can check if the data set in the text file Big Class.txt appear to have been imported correctly with the options we have selected. The scree shown above shows the JMP data table created using this data. Each column of a JMP data table has a Column Info dialog in which you can specify the name of the column, its data type, its modeling type, and other characteristics specific to that variable. You can access the Column Info dialog by selecting the Cols menu item Column Info… after selecting the column you wish to study or modify. You may then change the name, data type, and/or the modeling type of the selected column. 6 4. Analyzing Distributions To analyze the sample distribution of a variable, choose Distribution menu item from the Analyze menu in the JMP window menu system (i.e. use Analyze → Distribution menu tabs). JMP comes up with the following dialog: Specify the variables you wish to analyze by selecting each of the variable names and clicking the Y, Columns button, one at a time, for each variable selected. Here, sex and height are the selected variables. Click OK. JMP creates a new analysis window with the default output displayed (the default appearance of an output window can be changed in the Preferences: JMP Starter → Preferences or the Preferences item on the File menu). We will stay with the default appearance in most cases. However, changing some Window Specific preferences are helpful, as shown later. 7 The graphical and statistical output displayed depends on the modeling type of the variables. As seen in this example Continuous variables result in histograms, quantiles, and moments, while discrete types result in bar charts and frequencies. Notice that each variable has a pop-up menu (shown as a downward red arrowhead ) providing options for requesting additional graphical and numerical summaries as well as statistical calculations like confidence intervals, t-tests, etc). The entire window also has a pop-up menu (upper left-hand corner by the window title Distributions) allowing one to change the overall display and save the JMP commands used for the entire analysis as a JMP Script. Furthermore, if you right-click anywhere in any JMP analysis window, you will see a context-sensitive pop-up menu that will let you further specify how the output is displayed and which parts of the analysis is displayed. These are called context-clicks. Other JMP tools exist for performing specific functions in each analysis window. For example, the Hand tool may be used to dynamically change the number of bins used to construct the histogram. To experiment with this feature, move the curser to the space just below the horizontal axis of the histogram (for height), and locate the Hand tool. Grab the hand tool by holding the mouse button down, move the cursor along the values on the axis and observe that the mid-points are redrawn. All JMP window elements are dynamically-linked. For example, clicking on the bar for F (on the bar chart for the sex variable) will shade the female observations in the height histogram and hi-lite all female observations in the JMP data table. If you double-click the F bar, JMP will create a new data table containing only the female observations. You can convert the analysis window directly, use the File → Save As command to obtain a Word document as output, or use the Edit → Layout command to create a live journal. A JMP Journal window provides a word processor-friendly version of the output which you can save as a JMP Journal file, as an RTF file (can be read by most word processors), or as an HTML file. The Layout command creates a JMP Journal window in which the analysis elements can be rearranged before saving. (Warning: The menu and toolbar in this window is usually hidden, by default. To find it move your cursor below the title bar of the window. Use Preferences to unhide these permanently.) 8 As an example, a Word document of an analysis of the height variable from the Big Class data set is attached below: Distribution Analysis of Big Class Data: Height Variable Histogram, Box Plot, Normal Probability Plot -1.64 -1.28 -0.67 0.0 0.67 Stem and Leaf 1.28 1.64 Leaf Count 7 0 1 6 8889 4 6 6667 4 6 444455555 9 6 22222333 8 6 0001111 7 5 899 3 5 6 1 5 5 1 5 2 1 5 1 1 Stem 70 65 60 55 50 0.1 0.2 0.5 0.8 0.9 0.95 Normal Quantile Plot 5|1 represents 51 Quantiles 100.0% 99.5% 97.5% 90.0% 75.0% 50.0% 25.0% 10.0% 2.5% 0.5% 0.0% maximum 70 70 69.975 68 65 63 60.25 56.2 51.025 51 51 quartile median quartile minimum Moments Mean Std Dev Std Err Mean Upper 95% Mean Lower 95% Mean N 62.55 4.2423385 0.6707726 63.906766 61.193234 40 Confidence Intervals Parameter Mean Std Dev Estimate 62.55 4.242338 Lower CI 61.19323 3.475158 Upper CI 63.90677 5.447313 1-Alpha 0.950 0.950