Chapter Contents 
The Ins and Outs of a JMP Data Table
JMP displays data as a data grid, often called a data table. From the data table, you can do table management tasks such as editing cells; creating, rearranging or deleting rows and columns; subsetting the data; sorting; and combining tables. Figure 3.1 identifies active areas of a JMP data table.
There are a few basic things to keep in mind:
Column names can use any keyboard character, including spaces. The size and font for names and values is a setting you control through JMP Preferences (File > Preferences, or JMP > Preferences on the Mac).
If the name of the column is long, you can drag column boundaries to widen the column.
There is no set limit to the number of rows or columns in a data table; however, the table must fit in memory.
Figure 3.1 Active Areas of a JMP Spreadsheet
Selecting and Deselecting Rows and Columns
Many actions from the Rows and Cols menus operate only on selected rows and columns. To select rows and columns, highlight them.
To highlight a row, click the space that contains the row number.
To highlight a column, click in the column header.
These areas are shown in Figure 3.1.
To extend a selection of rows or columns, drag (in the selection area) across the range of rows or columns or Shift-click the first and last row or column of the range. Ctrl-click (-click on the Macintosh) to make a non-contiguous selection. To select both rows and columns at the same time, drag across table cells in the data grid.
To deselect a row or column, Ctrl-click (-click on the Macintosh) on the row or column. To deselect all rows or columns at once, click the triangular rows or columns area in the upper-left corner of the spreadsheet.
Mousing Around a Spreadsheet: Cursor Forms
To navigate in the spreadsheet, you need to understand how the cursor works in each part of the spreadsheet.
* To experiment with the different cursor forms, open the Baseball.jmp sample table, move the mouse around on the surface areas, and see how the cursor changes form.
Arrow cursor ()
When a data table is the active window, the cursor is a standard arrow except when it is on a red triangle menu icon, a grey disclosure icon, or a modeling type icon (to the left of a column name in the Columns panel). It is also a standard arrow when it is in the upper-left corner of the data grid where it is used to deselect rows and columns.
I-beam cursor ()
The cursor is an I-beam when it is over selected text in the data grid, column names or in the Columns panel. It signals that the selected text is editable. Double-click and start typing to replace the existing text.
Selection cursor ()
Move the cursor around. The cursor becomes a large thick plus sign when you move it into a column or row selection area. It is used to select items in JMP data tables and reports. Use the selection cursor to select a single row or column. Shift-click a beginning and ending row (or a beginning and ending column) to select an entire range. Ctrl-click (-click on the Macintosh) to select multiple rows or columns that are not contiguous.
The selection cursor appears in a report window when you select it from the tools menu. It is used to select areas of reports to copy and paste to other locations. See Copy, Paste, and Drag Data for details on using it for cut and paste operations.
Double Arrow cursor ()
The cursor changes to a double arrow when placed on a column boundary. To change the width of a spreadsheet column, click and drag this cursor left or right.
List Check and Range Check cursors ()
The cursor changes when it moves over values in columns that have data validation in effect (automatic checking for specific values). It becomes a small, downward-pointing arrow on a column with list checking and a large double I–beam on a column with range checking. When you double-click, the value highlights and the cursor becomes the standard I–beam; you enter or edit data as usual. However, you can only enter data values from a list or range of values you pre-specify. In addition, you can right-click in columns with list checks to see a menu listing the possible entries for the column.
Pointer cursor ()
The cursor changes to a finger pointer over any red triangle menu icon or grey diamond-shaped disclosure icon. That signifies you are over a clickable item. Click a disclosure icon to open or close a window panel or report outline; click red triangle icons to open menus.
* After you finish exploring, choose File > Close to close the Baseball.jmp table.
Creating a New JMP Table
Hopefully, most of the data you analyze is already in electronic form. However, if you have to key in data, a JMP data table is like a spreadsheet with familiar data entry features. A short example shows how to start from scratch.
Suppose data values are blood pressure readings collected over six months and recorded in a notebook page as shown in Figure 3.2.
Figure 3.2 Notebook of Raw Study Data Used to Define Rows and Columns
Define Rows and Columns
JMP data tables have rows and columns, which represent observations and variables in statistical terms. In JMP, the rows always represent observations, and the columns always represent variables. A cell in the data table grid is defined by the row and column it is in. The raw data in Figure 3.2 are arranged as five columns (month and four treatment groups) and six rows (months March through August). The first line in the notebook describes each column of values, and these descriptions can be used as column names in a JMP data table. To enter this data into JMP, you first need a blank data table.
* Choose File > New > Data Table (or File > New > New Data Table on the Macintosh) to create a new empty data table, with one column and no rows.
Add Columns
You now want to add five columns to the data table to hold the data from the study.
* Choose Cols > Add Multiple Columns and enter the number ‘5’ in the How many columns to add box, and click OK.
The default column names are Column 1, Column 2, and so on, but you can change them by typing the column names you want at the top of the columns in the new table.
To edit a column name, first click the column selection area and begin typing the name of the column. Click the Enter or Return key when you are finished, and repeat for the other columns. Or, click Tab to move to the column header for the next column.
Type the names from the data journal in Figure 3.2 (Month, Control, Placebo, 300 mg, and 450 mg) into the columns headers of the new table.
Set Column Characteristics
Columns can have different characteristics, such as modeling type and data type. By default, the modeling types are continuous, so the columns expect numeric data. However, in this example, the Month column holds a non-numeric character variable.
* Right-click the column name area for Month and select Column Info to see the Column Info dialog in Figure 3.3.
* In the Column Info dialog, use the Data Type menu to change Month to a character variable (Figure 3.3), then click OK. Note: If you don’t change the data type, and enter non-numeric data into a new column, the data type automatically changes.
Figure 3.3 Column Info Dialog
Add Rows
Adding new rows is easy.
* Choose Rows > Add Rows and ask for six new rows.
Alternatively, if you double-click anywhere in the body of the data table, the data table automatically fills with new rows through the position of the cursor.
The last step is to give the data table a name and save it.
* Choose File > Save As to name the data table BP Study.jmp. You may also navigate to another folder if you want to save this data table somewhere else.
The data table is now ready to hold data values. Figure 3.4 summarizes the table evolution so far.
Figure 3.4 JMP Data Table with New Rows, Columns, and Names
Enter Data
Entering data into the data table requires typing values into the appropriate table cells. To enter data into the data table, do the following:
* Move the cursor into a data cell and double-click to begin editing the cell.
A blinking vertical bar appears indicating that you can begin typing.
* Type the appropriate data from the notebook (Figure 3.2).
If you make a mistake, double-click on the entry and correct it. The Tab and Return keys are useful keyboard tools for data entry:
Tab moves the cursor one cell to the right. Shift-Tab moves the cursor one cell to the left. Moving the cursor with the Tab key automatically wraps it to the beginning of the next (or previous) row. Tabbing past the last table cell creates a new row.
Enter (or Return) either moves the cursor down one cell or one cell to the right, based on the setting in JMP Preferences.
Your results should look like the table in Figure 3.5.
Figure 3.5 Finished Blood Pressure Study Table
The New Column Command
In the first part of this example, you used the Add Multiple Columns command from the Cols menu to create several new columns in a data table. Often you only need to add a single new column with specific characteristics.
Continuing with the current example, suppose you learn that the blood pressure readings were taken at one lab, called “Accurate Readings Inc.” during March and April, but at another location called “Most Reliable Measurements Ltd.” for the remaining months of the study. You want to include this information in the data table.
* Begin by choosing Cols > New Column, which displays a New Column dialog like the one shown previously in Figure 3.3.
The New Column dialog lets you set the new column’s characteristics.
* Type a new name, Location, in the Column Name area.
* Because the actual names of the location are characters, select Character from the Data Type menu.
Notice that the Modeling Type then automatically changes to Nominal.
When you click OK, the new column appears in the table, where you can enter the data, “Accurate Readings Inc.” for March and April and “Most Reliable Measurements Ltd.” for the other months.
Note: You can also add a new column by double-clicking in the column header next to your last column.
Plot the Data
There are many ways to check the data for errors. One way is to plot the data to check for obvious anomalous values. Let’s experiment with the Chart command in the Graph menu.
To plot the months on the horizontal (x) axis and the columns of blood pressure statistics for each treatment group on the vertical (y) axis, follow these steps:
* Choose Graph > Chart.
* Highlight Month in the ‘Select Columns’ list and click Categories, X, Level.
* Drag to select (highlight) Control, Placebo, 300 mg, and 450 mg, and select Data from the Statistics drop-down list.
Click OK, to see the bar chart in Figure 3.6.
Figure 3.6 Initial Bar Chart
Now, use some options.
* Click the red triangle menu on the title bar of the chart to see a list of options.
* Make sure the Overlay option is checked, and then select Y Options > Line Chart to see the chart shown in Figure 3.7.
The plot doesn’t appear to have much to say yet because it is difficult to read at the current scaling.
Figure 3.7 Line Chart for Blood Pressure Values over Month
By default, y-axis scaling begins at zero. To present easier-to-read information, the y-axis needs to be rescaled.
* Double-click anywhere in the y-axis area to bring up the Y Axis Specification dialog box.
Based on what you can see in Figure 3.7, the plotted values range from about 145 to 175.
* Type these values into the Axis Rescale dialog as the minimum and maximum.
* Change the increment for the tick marks from 50 to 5, which divides the range into six intervals (145, 150,..., 160).
* Click OK.
Use the Annotate tool () to annotate the chart with captions as shown in Figure 3.8.
* Select the Annotate tool and click in the chart where you want to insert the caption.
* Type “Comparison of Treatment Groups” and click outside the caption.
* Resize the caption by clicking and dragging on its corner. Move the caption by clicking and dragging in its interior.
Figure 3.8 Line Chart with Modified y-Axis
Importing Data
The File > Open command displays a specialized open dialog that lets you locate the file you want to open and then read the file into a JMP data table or as simple text in a JMP script window.
JMP directly reads its own data tables, journals, scripts, projects, reports, add-in files, menu files, application files, and SAS transport files. In addition, JMP can read and write SAS data sets and read SAS program files.
Besides JMP and SAS files, JMP can also read text files with any column delimiter, Excel files, R code files, HTML files, SPSS data files, xBase data files, Minitab files, FACS files, shape files for maps, a variety of Foxpro files, MS Access database, and other flat-file database files. To open database files, you must have an appropriate Open Database Connectivity (ODBC) driver installed on your system.
The example in Figure 3.9 shows a Windows Open Data File dialog when All JMP Files is selected in the file type menu at the lower-right of the Open dialog. Click to display the list of all files that JMP can read.
Figure 3.9 Using the File Open Dialog to Read a JMP Table
Notice that the list of files in the dialog are not all JMP data tables (they don’t have .jmp after their names). If the incoming file is not a JMP data table then JMP determines the file type by the three-character extension appended to its file name and opens it accordingly. This works as long as the file has the structure indicated by its name.
Importing Text Files
The Windows Open Data File dialog shows options appropriate for the file type choice you make. The Macintosh open file dialog displays options according to the type of file you select from the list of files. Because of this different way of handling the open file process, the open dialogs appear different between Windows and the Macintosh.
Open Dialog for Text Importing on Windows
The Windows Open File dialog first expects you to make a selection from the file type menu. Once that selection is made, then only files appropriate for that choice are listed above, and options for those files show at the bottom of the dialog. In Figure 3.10, the file type selection is Text Files (*.txt,*.csv,*.dat,*.tsv) so only files with those suffixes show in the list of files above. In this example Animals.txt is selected to be opened.
The lower area of the dialog has four radio buttons for the following options:
You can set text import preferences in your JMP Preferences file. The Data, using Text Import preferences option accesses the JMP preference file and uses those settings.
The Data, using best guess looks at the data and attempts to determine the best way to present it in a JMP table. This is adequate for rectangular text files with no missing fields, a consistent field delimiter, and an end-of-line delimiter
Note: If double-quotes are encountered when importing text data, JMP changes the delimiter rules to look for a matching end double-quote. Other text delimiters, including spaces embedded within the quotes, are ignored and treated as part of the text string.
Data with preview uses the best guess approach but shows you a sample of the constructed JMP table rows and columns.
Plain text into Script window writes the text file as it is into a script window without attempting to define fields or columns.
Figure 3.10 Options for Text Files as Files of type Selection
Open Dialog for Text Importing on the Macintosh
On the Macintosh, the import options don’t appear until you select a file for the list of readable files. Figure 3.11 shows an example of the Macintosh Open dialog with a text file selected. The options are in a menu at the bottom of the dialog. The options are the same as those described for Windows, but appear in a different order and are worded differently.
Figure 3.11 Macintosh Import Dialog with Text Import Options
Text Import With Preview
The most general and powerful option is Data with Preview (Windows) or Data (Using Preview) on the Macintosh. When you select this option, a preview dialog opens and is automatically filled in with settings from your Preferences file and shows several lines of data as shown in Figure 3.12.
You can identify one or more end-of-field delimiters, end-of-line delimiters, choose the option to Strip enclosing quotation marks, and specify on which row to begin reading data.
If your data has fixed-width fields, press the Fixed width fields button. This alters the dialog so that you can specify the widths of the fields in the input data set.
There is a check box to indicate whether the first line contains column names. If this is checked through preferences, or you check it on the dialog, the first line becomes column names when the data set is imported and data is read starting on column 2, or whatever column you specify.
Figure 3.12 Open Text Data With Preview
The example in Figure 3.12 indicates that there are no column names in the first column the data so clicking Next displays the dialog in Figure 3.13 to further modify the input options. The default column names at the top of the columns are called C000001, C000002, and so on. Click and type in the name area to change them. If needed, click on the data type icon and choose numeric, character, or row state.
Figure 3.13 Name Columns using Open Text With Preview Dialogs
Importing Other File Types
Excel Spreadsheets
JMP can directly import Microsoft Excel worksheets and workbooks. By default, all Excel worksheets are imported as separate JMP tables.
To open an Excel file on Windows, choose Excel Files (*.xls, *.xlsx, *.xlsm) from the menu list on the Open Data File dialog. After selecting an Excel file, you can click Open to see just the first sheet, or use the menu on the Open button, as shown here, to select among individual worksheets contained in a single Excel workbook.
On the Macintosh, the option to select an individual worksheet and the option to use the first line as column headers appear at the bottom of the dialog when you select any kind of Excel file to open.
Using ODBC
JMP can open files for any format that has a corresponding ODBC driver on your system.
Use the Database > Open Table command to import data from relational databases like dBase and MS Access. Details on using the Database > Open Table command are in the Using JMP reference guide, found under the Help > Books menu.
Copy, Paste, and Drag Data
You can use the standard copy and paste operations to move data and graphical displays within JMP and from JMP to other applications. The following commands in the Edit menu let you move data around:
Copy
The Copy command in the Edit menu copies the values of selected data cells from the active data table to the clipboard. If no rows are selected, Copy copies all rows. Likewise, you can copy values from specific columns by selecting them. If no columns are selected, all columns are copied. If you select both rows and columns, Copy copies the highlighted cells. Data you cut or copy to the clipboard can be pasted into JMP tables or into other applications.
If you want to copy part of an analysis window, use the selection tool () from the Tools menu. Click on the area you want to copy to select and highlight it. Shift-click to extend the selection. If nothing is selected, the Copy command copies the entire window to the clipboard.
Note: If you use Copy With Column Names, the first line of information copied to the clipboard is the JMP column names.
Paste
The Paste command copies data from the clipboard into a JMP data table or report. Paste can also be used with the Copy command to duplicate rows, columns, or any subset of cells defined by selected rows and columns.
To transfer data from another application into a JMP data table, first copy the data to the clipboard from within the other application. Then use the Paste command to copy the values to a JMP data table. Rows and columns are automatically created as needed. If you choose Paste With Column Names, the first line of information on the clipboard is used as column names in the new JMP data table.
To duplicate an entire row or column:
1. Select a row or column to be duplicated and use Edit > Copy.
2. Select an existing row or column to receive the values.
3. Use Edit > Paste to transfer the values.
To duplicate a subset of values defined by selecting specific cells, follow the previous steps, but select an identical arrangement of cells to receive the pasted values. If you paste data with fewer rows into a destination with more rows, the source values repeat until all receiving rows are filled.
Drag
You can also move or duplicate rows and columns by dragging. Hold the mouse down in the selection area of one or more selected rows or columns and drag them to a new position in the data table. Use Ctrl-drag to duplicate rows and columns instead of moving them.
Moving Data Out of JMP
Two questions that come up as you start using JMP might be “Can I get my data back out of JMP?” and “How do I get results out of JMP?”
The Save As command saves the active data table to a file after prompting you for a name and file type. JMP can save data in any of the following formats:
JMP Data Tables saves the table in JMP format. This is the default Save As option.
Excel Workbook saves data tables in Microsoft Excel .xlsx or .xls format. The resulting file is directly readable by most versions of Excel.
Text Export Files converts data from a JMP file to a standard text format, with rows and columns.
The Options button in the Save As dialog displays choices to describe specific text arrangements:
Export Column Names to Text File has an Export Table Headers check box to request that JMP column names be written as the first record of the text file.
End of Field and End of Line designate the characters to identify the end of each field and end of line in the saved text file. These options are described previously in the section Importing Data.
SAS Data Set saves the data as a SAS 7 data set (.sas7bdat), readable by SAS 7 or later.
SAS Transport Files converts a JMP data table to SAS transport file format and saves it in a SAS transport library. The Append To option appends the data table to an existing SAS transport library. If you don’t use Append To, a new SAS transport library is created using the name and location you provide. If you do not specify a new file name, the SAS transport library replaces the existing JMP data table.
Use Database > Save Table to save data in database formats that have ODBC drivers installed on your system.
On the Macintosh, to save data as a JMP data table, choose File > Save As. To save data as text, or and Excel, SAS or SAS Transport File, select File > Export, then select the appropriate format from the dialog.
Working with Graphs and Reports
You can use standard copy and paste operations to move graphical displays and statistical reports from JMP to other applications. Although the Edit menu includes both Cut and Copy commands, they both perform the same tasks in report windows. Cut copies all or selected parts of the active report window into the clipboard, including the images.
Copy and Paste
When you copy from a report (results) window, the information is stored on the clipboard. If you want to copy part of a report window, use the selection tool () from the Tools menu or toolbar. To copy and paste:
Click on the area you want to copy, shift-click to extend the selected area, and use the Copy command to copy the selected area to the clipboard.
Use the Paste command to paste the results into a JMP journal or another application.
Drag Report Elements
Any element in a JMP report window that can be selected can be dragged. When you drag report elements within the same report window, they are copied to the destination area where you drop them. As you drag an element, a visual cue shows where the element would be dropped.
You can copy and paste any report element to other applications, and drag and drop JMP reports and graphs to any other application that supports drag-and-drop operations.
The format used when pasting depends on the application you paste into. If the application has a Paste Special command, you can select among paste formats such as rich text, which includes pictures (RTF), unformatted text (TXT), picture (PICT or WMF), bitmap (BMP), and enhanced picture (EMF). On the Macintosh, PDF is available as a Paste Special option.
You can also save the selection in variaty of graphical formats using the Edit >Save Selection As command. Available formats are shown below. On the Macintosh, use File > Export to save in one fo the following formats: PNG, TIFF, SVG, EPS, HTML and RTF.
To delete a copied report element, select it and press the delete key on the keyboard.
Context Menu Commands
Right-click on a report window to see the context menu used in the following examples. The context menu changes depending on where you click (hence its name, context menu). If you are not over a display element with its own context menu, right-clicking shows the menu for the whole platform.
Context Commands for Report Tables
By default, the tables in JMP reports have no formatting to separate rows and columns. Some (or, in many cases, all) available columns for the report are showing. Context menu items for report tables let you tailor the appearance and content of the tables.
Right-click in the table area to see these options:
Table Styleets you enhance the appearance of a table by drawing borders or other visual styles to the table rows and columns. The example shown below has beveled column separators. The default table style is plain.
Table Row Style can put beveled lines around each row, including the column headers.
Columns lets you choose which columns you want to show in the analysis table. Analysis tables often have many columns, some of which may be initially hidden. The leftmost table in Figure 3.14 is a Parameter Estimates table showing only the estimate name, the estimate itself, and the probability associated with the estimate. The standard error and chi-square values (shown by default) are hidden.
Sort by Column sorts the rows of a report table. This command displays a list of visible columns in a report and you choose one or more columns to sort by. The middle table in Figure 3.14 is the Parameter Estimates table on the left sorted by Prob>ChiSq.
Make into Data Table creates a JMP data table from any analysis table. The rightmost data table in Figure 3.14 is the JMP data table created from the sorted Parameter Estimates table with hidden columns.
Figure 3.14 Results of Context Commands for Analysis Tables
Make into Matrix lets you store a report table as a matrix that is useful when you are using the JMP scripting language (JSL). When selected, the dialog shown here appears, allowing you to designate the name of the matrix and where it should be stored.
Juggling Data Tables
Data for analysis rarely reaches you neat, clean, and ready to go. Unless you can find someone else to do house keeping on your data, reorganizing the structure of information is often necessary. Each of the following examples uses commands from the Tables, Rows, or Cols menus to reorganize data.
Data Management
Suppose you have the following situation. Person A began a data entry task by entering state names in order of ascending auto theft rates. Then, Person B took over the data entry, but mistakenly entered the auto theft rates in alphabetical order by state (paying no attention to the state names that were already there).
* To see the result, open the Automess.jmp sample table.
Could this ever really happen? Never underestimate the diabolical convolution of data that can appear in an electronic table, and hence a circulated report. Always check your data with common sense..
Here is one way to solve this problem that uses JMP data management tools.
First, you need sorted Auto theft values associated with the state names as they are in the table. To do this in JMP (without having to reenter the theft values) do the following:
1. Make a copy of the Automess table.
2. Sort the Auto Theft variable in the copy in ascending order.
3. Join the sorted result with the original table, keeping only the State variable from the original table and the Auto Theft variable from the sorted table.
Follow theses steps to correct the Automess table.
* With Automess.jmp active, choose Tables > Subset and press OK.
This automatically creates a duplicate table since no rows or columns were selected in the original table.
The non-descriptive table name is Subset of Automess.JMP, but you don’t need to give this table a descriptive name because it is only temporary.
* With this subset table active, choose Tables > Sort.
* When the Sort dialog appears, choose Auto theft as the sort variable and click Sort.
There is now an untitled table that is sorted by auto theft rates in ascending order.
* Close Subset of Automess.jmp, as it is no longer needed.
Join the incorrectly sorted Automess.jmp table with the correctly sorted Untitled table
* Choose Tables > Join.
* When the Join dialog appears, note which table is listed next to the word Join (either Automess or Untitled), then click the other table’s name in the list of tables.
* By default, the Matching Specification box will say By Matching Columns. Use the Matching Specification menu and change the specification to By Row Number.
* Because you don’t want all the columns from both tables in the final result, click the Select Columns check box.
The variables from both tables appear in list boxes.
* Select State from the Automess table and click Add,
* Select Auto theft from the Untitled table, and click Add.
* Click OK on the Join launch dialog.
Visually verify the new joined data table. The first row is South Dakota with a theft rate of 110 and the last row is the District of Columbia with a rate of 1336. If you want to keep this table, use Save As and specify a name and folder for it.
Give New Shape to a Table: Stack Columns
A typical situation occurs when response data are recorded in two columns and you need them to be stacked into a single column. For example, suppose you collect three months of data and enter it in three columns. If you then want to look at quarterly figures, you need to change the data arrangement so that the three columns stack into a single column. You can do this with the Stack command in the Tables menu.
* To see an example of stacking columns, open the Cheese Taste.jmp sample data to see the table on the left in Figure 3.15.
This sample data (McCullagh and Nelder, 1983) has columns for four kinds of cheese, labeled A, B, C, and D. In a taste test, four judges ranked the cheeses on an ordinal scale from 1 to 9 (1 being awful, and 9 being wonderful). The Response column shows these ratings. The counts for each cheese and for each ranking of taste are the body of the table. Its form looks like a two-way table, but to analyze this data, JMP needs the cheese categories in a single column. To rearrange the data:
* Choose Tables > Stack.
* In the Stack dialog that appears, select the cheeses (A, B, C, and D) from the Select Columns list and add them to the Stack Columns list. Leave everything else as is.
* Click OK to see the table on the lower right in Figure 3.15.
Figure 3.15 Stack Columns Example
The Label column shows the cheeses, and the Data column is now the count variable for the response categories (1 through 9). Now use JMP to generate a contingency table.
* Right-click in the Data column header area, and select Preselect Role > Freq to assigning the Data column the frequency role for the analysis.
This causes the values in the Data column in the Untitled table to be interpreted by analyses as the number of times that row’s response value occurred.
To see how response relates to type of cheese:
* Choose Analyze > Fit Y by X.
* In the Fit Y by X launch dialog select Response as Y, Response and Label as X, Factor.
If you preselected its role, Data is already assigned as a Freq variable. If not, make it so in the launch dialog.
When you click OK, the contingency table platform appears with a Mosaic plot, Crosstabs table, Tests table, and menu options. To find more information about the platform components, you can use the Help tool (labeled with a question mark) in the Tools menu and click on the platform surface. A simplified version of the Crosstabs table with only counts is shown in Figure 3.16. (Right-click on the contingency table to modify what it displays.) The stacked Cheese data is used again later for further analysis.
Figure 3.16 Contingency Table for the Cheese Data
* Extra Credit: For practice, see if you can use the Split command on the stacked data table to reproduce a copy of the Cheese Taste table.
Creating Summary Statistics
One of the most powerful and useful commands in the Tables menu is the Summary command.
Summary creates a JMP window that contains a summary table. This table summarizes columns from the active data table, called its source table. It has a single row for each level of a grouping variable you specify. A grouping variable divides a data table into groups according to each of its values. For example, a gender variable can be used to group a table into males and females.
When there are several grouping variables (for example, gender and age), the summary table has a row for each combination of levels of all variables. Each row in the summary table identifies its corresponding subset of rows in the source table. The columns of the summary table are summary statistics that you request.
Create Summary Statistics with the Summary Command
The example data used to illustrate the Summary command is the JMP table called Companies.jmp (see Figure 3.17).
* Open the Companies.jmp sample table.
It is a collectfion of financial information for 32 companies (Fortune 1990). The first column (Type) identifies the type of company with values “Computer” or “Pharmaceutical.” The second column (Size Co) categorizes each company by size with values “small,” “medium,” and “big.” These two columns are typical examples of grouping information.
Figure 3.17 JMP Table to Summarize
* Choose Tables > Summary.
* In the Summary dialog select the variable Type in the Columns list and click Group to add it to the grouping variables list (shown in Figure 3.18).
You can select as many grouping variables as you want but for now, look at a single variable.
* Click OK to see the summary table.
The new summary table appears in an active window as shown at the bottom in Figure 3.18. This table is linked to its source table. When you highlight rows in the summary table, the corresponding rows are also highlighted in its source table.
Figure 3.18 Summary Dialog and Summary Table
Initially, a summary displays frequency counts (N Rows) for each level of the grouping variables. This example shows 20 computer companies and 12 pharmaceutical companies. You could have requested other statistics on the Summary dialog. The Statistics menu in the Summary dialog lists standard univariate descriptive statistics.
To add summary statistics to an existing summary table, follow these steps:
* Select Add Statistics Column command from the red triangle menu on the Columns tab at the left of the summary table. This command displays the Summary dialog again.
* Select any numeric column (for example, Profit $M) from the source table columns list.
* Select the statistic you want (for example, Sum) from the Statistics menu on the dialog.
* If desired, repeat to add more statistics to the summary table.
* Click OK to add the columns of statistics to the summary table.
The table in Figure 3.19 shows the sum of Profits ($M) in the summary table grouped by Type.
Figure 3.19 Expanded Summary Table
Another way to add summary statistics to a summary table is with the Subgroup button in the Summary dialog (Figure 3.18). This method creates a new column in the summary table for each level of the variable you specify with Subgroup. The subgroup variable is usually nested within all the grouping variables.
Create Summary Statistics with Tabulate
You can use Tables > Tabulate to create the same table interactively.
With the Companies.jmp table active,
* Chose Tables > Tabulate to see an interactive arena in Figure 3.20 to drag and drop variables. You’ll see the list of variables in the Companies table in the variables list on the left of the dialog.
* First, drag the N from the statistics panel and drop it in the Drop Zone for Columns. This creates the small table shown here. So far this is just showing the total N of 32 for the whole table.
* Next drag the Type variable to the Drop Zone for the Rows (which is now a small box). Now you should see a row for each type of company, with the appropriate N for each type.
Figure 3.20 Initial Tabulate Palette for Dragging and Dropping Variables
* Drag Profit ($M) just to the right of N in the tabulate palette.
You see a new small gray column indicating that you want a new column. When you release the mouse a menu appears asking whether you want a grouping column or an analysis column, as shown at the top in Figure 3.21. Since you want a statistic (the sum of profit), the analysis column is the correct choice. When you release the mouse, Tabulate creates the table shown at the lower left in Figure 3.21.
* Select Make into Data Table from the red triangle menu on the Tabulate title bar to create the summary data table.
Note: The Sum statistic is the default. If you want a different statistic, right-click at on the statistics name in the Tabulate drop zone to see the menu of statistics. Then choose the one you want.
Figure 3.21 Add Analysis Column and Create Summary Table
Working with Scripts
JMP contains a full-fledged scripting language, used for automating repetitive tasks, scripting instructional simulations, and much more. Several scripts are featured throughout this book to demonstrate statistical concepts.
Scripts are stored in two formats:
attached to a data table
as a stand-alone scripting file
Scripts attached to a data table are listed in the Tables panel. This example is from the Big Class.jmp sample data table, showing several scripts that have been saved with it.
To run an attached script:
* Click the button beside the script’s name.
* Select Run Script from the menu that appears.
Opening and Running Scripts on Windows
Stand-alone scripts are stored as simple text files with the JSL (.jsl) extension. They can be opened and run independently of a data table.
To open and run a stand-alone script on Windows
* Use File > Open and navigate to the folder that contains the script you want.
* Or, choose Help > Sample Data and click on Open the Sample Scripts Folder.
* Double-click the script name to open it.
Some scripts are designed to run when they open. Other scripts open in a script editor window. To execute the script in the script editor window:
* Select Edit > Run Script, use the shortcut key Ctrl-R, or click the red running man icon on the tool bar.
Opening and Running Scripts on the Macintosh
To open and run a stand-alone script on the Macintosh:
* Use File > Open and navigate to the folder that contains the script you want. Or, use Help > Sample Data as described above.
* Double-click the script to open.
* If the script does not run when you open it, click the Run Script icon on the tool bar, select Edit > Run Script or press the shortcut key -R.
As an example, use the TestMeanScript.jsl script stored in the Sample Scripts folder.
* Open and run the TestMeanScript.jsl script.
The resulting window (shown in Figure 3.22) illustrates several key features of a typical instructional script.
Figure 3.22 Test an Estimated Mean with an Hypothesized Mean Window
A handle is a script element you can drag to update the display as it is dragged. In this case, the handle controls the t distribution for hypothesized mean, and changes as you drag it, adjusting the t-ratio and p-value.
Text output is sometimes drawn directly on the graphics screen rather than displayed as reports below the window. This script shows the estimated mean, the hypothesized mean , the t-ratio, and the p-value, in the upper right corner of the window.
Buttons reveal options, set conditions, or trigger actions in the script. In this example, the buttons are for a two-sided p, or the one sided upper or lower p-value.
To practice with these elements:
* Click and drag the handle to different places in the window and observe how the hypothesized mean and the p-value change.
* Click the buttons to see how the p-values change.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset