In the previous article "5 reasons to tell you why JMP software is more suitable for you? 》 In, we briefly introduced the advantages of JMP software for non-professional statisticians: JMP and its friendly menu interface, powerful visualization tools, rich data cleaning functions, systematic statistical analysis methods, interactive results display methods, etc. , Very friendly to non-statistics professionals.

In order to help clinicians learn how to use JMP to perform data analysis efficiently and improve the efficiency of daily work and publication of papers, JMP senior user and senior statistician Dr. Feng Guoshuang and his team will share a series of statistics and data analysis, JMP operations, etc. Practical content, a classic topic in each issue, to help everyone master a new skill. It is worth noting that these topics are not only for clinicians, but are applicable to all those who use JMP software for data analysis.
This article is the second issue of this series of articles. Dr. Feng and his team introduced the first step of JMP data analysis: importing data. This article will take Excel as an example to teach you how to import existing data cleverly, which is very similar to other types of data sets (such as SPSS data, csv data, etc.).
Three ways to easily import data
Three common ways to import data in JMP are: copy and paste, open existing data directly, and import through the JMP option list in Excel. Let's take a look at them one by one!
(1) Copy and paste
First, open the JMP software, there is a small icon similar to the data set at the bottom of the menu [Document], when the cursor moves to the top, it will display [New Data Table], click this small icon (Figure 1), you will see Go to the interface in Figure 2. At this time, go back to the Excel data set, find the data set you want to analyze, select all the data cells you want to analyze, and copy it.
Here is a little trick. If you have a lot of variables (rows) or observations (columns), it is a bit troublesome to select by dragging. You might as well click the small triangle in the upper left corner of the table to select the entire page. Then copy it to JMP. Don't worry, JMP can accurately identify cells with data content.

Figure 1 Create JMP empty data set

Figure 2 JMP empty data set
After the data is selected and copied, return to the newly created JMP empty data table. Here, it is not a simple paste or ctrl+v, because when we copy in Excel, the first column is the variable name. If you paste directly, the variable name becomes the first column of observations in the JMP data set. Now, this is not feasible.
The correct way is to click [Paste with column name] under [Edit] in the function list in JMP. At this time, the first row of your Excel will be placed in the variable name position of JMP. Of course, you can also use the shortcut compound key, but instead of ctrl+v, ctrl+shift+v.
At this point, the first method of importing Excel data is over. Is not it simple?
(2) Open existing data directly
This method of importing Excel into JMP may be the most commonly used method in daily practice. First, still open the JMP software, select the [Document] drop-down menu, click [Open (O)...], and then locate your Excel data set in the pop-up file browser (Figure 3, if you can’t see it) For Excel-type files, just select the Excel file in the drop-down menu on the right side of the file name. JMP can import most of the commonly used database files, including text files, PDF files, SAS program files, R code, MATLAB code , HTML file, Shape file, JSON data file, etc.), click to select, and then open.
One thing to note here is that when the file type locates an Excel file, a row of small letters and an option will appear above the file name, prompting whether to force the use of the first row of Excel as a label. Generally, we will choose "best guess". That's right, JMP can always correctly determine whether the first column is a variable name. Of course, you can also choose "Always" or "Never", depending on your information.

Figure 3 JMP opens the existing data set interface
After clicking "Open", the preview stage before the data is officially imported, as shown in Figure 4. The upper left corner is the preview of the data, you can drag the scroll here to see if the number of observations and variables are correct (as long as your Excel format is okay, JMP will not go wrong).
There is another useful function in the preview window. You can select a row and click the right button to specify the input format of the data, such as changing the decimal place of a numeric variable, changing it to a percentage or changing it to a date format. Of course , These can be operated after the data is imported into the JMP data table, and if you make a mistake here and want to start again, the bottom "Restore Default Settings" can help you.
The sheet selection on the upper right is the worksheet in Excel. If there are multiple sheets in your Excel sheet, you should pay attention to confirm the name of the sheet here. If you want to import all the sheets in the table, you can choose to select all here, then how many sheets there are in Excel, how many data sheets will be imported by JMP.
The bottom left is the setting of a single worksheet. The default setting is that the row header starts in the first column, the number of columns with headers is 1, and the data starts in the first row and the second column. If your data format is special, then you need Modify according to the situation. For the rest, we just keep the default state.
Everything is ready, now, click [Import].

Figure 4 Import EXCEL data set interface
(3) Through the JMP option list in Excel (this is a unique function of Excel)
This method may be the simplest of the three methods! Under normal circumstances, when we install the JMP software, the JMP plug-in will also be installed in Excel. Open your Excel data sheet and you can see the list of options for JMP, just like the EndNote plug-in we saw in Word (Figure 5).

Figure 5 JMP plug-in in EXCEL
Before generating the JMP data table, we have to click on the preferences to set it. After clicking [Preferences], the Figure 6 interface will pop up. You need to check "Use the first row as column name", that is, use the first column of the Excel data as the row variable name, click OK and then click [Data Table] next to the preferences (Figure 7), JMP data table can be directly generated.

Figure 6 The settings of the JMP plug-in in EXCEL

Figure 7 Click "Data Sheet" to automatically enter JMP software from EXCEL
The above are the three most common and easiest ways to import Excel data into JMP. Importing data may seem simple, but if you master some tricks, you can get twice the result with half the effort. Based on our years of experience in using JMP, here are two precautions for importing data.
(1) The data in the original data must not have any non-numeric symbols
In JMP, the variable name of "continuous type" is displayed as a blue triangle, and the variable name of "nominal type" is displayed as a red bar (Figure 8, the ordered type is displayed in green, and there is no ordered variable in the figure. Therefore not shown). After importing the data, if the software determines that the variable is of numeric type, you can change it to any type. If the software determines that a variable is of character type, then the variable can only be in the “order type” and “nominal type”. Type".

Figure 8 Schematic diagram of different variable types
Under normal circumstances, after data is imported, JMP defaults that all values are "continuous", wherever there are any non-values in the variable (such as accidentally writing 8.6 to 8.6, or a cell with "+", " #" and other non-digital symbols, etc.) are considered to be "nominal". Therefore, if a variable is supposed to be numeric (such as age, height, etc.), but it is found to be "nominal" by default after importing, it means that the variable must have non-numeric letters or symbols (such as a decimal point written as a comma, etc.). It is necessary to check the original data, otherwise nominal variables cannot be analyzed as numerical values.
For example, the BMI in Figure 9 is all values in the original data (such as Excel), so it is directly preset as a continuous variable after importing, and there is no problem.

Figure 9 When the original data is a numeric value, it is preset as a continuous variable after import
In the BMI in Figure 10, in the original data set (such as Excel), because one of the values is accidentally knocked out with a period, the cell that looks like a value is not a value. Therefore, if you import directly to JMP, you can successfully import, but because there is a non-numerical value (21.6) in BMI, the default is a nominal variable.

Figure 10 The existence of non-numeric symbols in numeric variables causes them to become nominal variables after import
Therefore, it must be noted that when you import data from Excel and other data sets to JMP, if you find that a variable that should be a numeric value is preset to a character variable (marked in red), there is only one possibility: it must be yours At least one of the variable in the original data contains a non-numeric character, which may be inadvertent things such as a period or a comma. It may also be that you are used to adding spaces such as "-", "/" and other characters, or it may be Some software defaults to fill in "#NULL" and so on for empty values. In short, everything that is non-numerical will not work.
(2) The restriction on variable names is the most relaxed when JMP is imported
At the end, I have to mention another huge advantage of JMP when importing Excel data-you don't have to worry about your variable name software not being able to recognize it! At present, most statistical software has restrictions on variable names, such as no brackets, no special characters, etc. For example, age (years), such variable names cannot be directly imported in other analysis software or programming software, and they are all prompted to not recognize (unrecognized). This is especially troublesome when drawing. Either you have to edit the picture, or you have to change the variable display method through the label form, and one more procedure.
In JMP, there is no such concern. Whether your variable name is pure numbers, pure letters, special symbols or various strange combinations, JMP can import them as they are. After the analysis results are obtained, there is no need to edit the picture, just change the variables. Just change it to the format required by your own article. Although it seems a very simple improvement, it actually saves a lot of trouble for publishing an article.
Data import, as the first step of data analysis, seems simple but very important, especially when you have a huge amount of data, you will find these methods particularly useful.