In the previous article, we introduced to you Three common ways to import Excel data into JMP : Copy and paste, import directly, and generate data tables directly from the JMP tab in Excel.

This article continues to bring you the basic knowledge and operation of JMP software— The type of variable and the setting of the variable label .
The variable type itself is not difficult, but in JMP, if you can really use the variable type settings flexibly, you will find a colorful world of results. So, take a closer look at this article and you will find that there are so many tricks and secrets hidden in the variable type settings in the original JMP.
Let's take a data set named "Diabetes" as an example. After importing the data, it will be shown in Figure 1.

Figure 1 Sample data
01 Speaking of variable names
If you want to change the name of a variable , Such as changing "gender" to "Gender", There are two ways to do it .
- The first is to click the right mouse button on the variable name that you want to change, and left-click to select "Line Information". Fill in the box with the variable name you want to change in the pop-up window and click OK, as shown in Figure 2.

Figure 2 How to change several names 1
- Another way is to select the variable you want to change the name in the variable row table on the left side of the window, press it again to change to editable mode (as shown in Figure 3), fill in the new variable name, and click the blank space or press Enter. can.

Figure 3 How to change several names 2
02 Variable type
" Line information " The window can not only change the number name, but also change the number type.
When importing data, JMP determines two types for each variable, as shown in Figure 4, which are " Data type " with " Modeling type " .

Figure 4 Schematic diagram of variable types
- " Data type " Determines the variable in JMP Storage format in , The drop-down menu has four types, as shown in Figure 5. Under normal circumstances, our data will only involve two types: numeric and character type: numeric variables are all digits, which can be operated on, and character type Variables can contain letters, digits, or a combination of letters and digits, and cannot be operated on.
Here we can change the "data type", but there is one point that needs special attention: If you change a character variable to a numeric value, all character values in the variable will become missing values and cannot be restored. Therefore, if it is not necessary, do not easily try to modify the system preset settings.

Figure 5 Schematic diagram of data types
- " Modeling type " Decided JMP How to deal with this variable during data analysis , The drop-down menu includes multiple options. In general, we will only use the first three: continuous, ordered, and nominal, as shown in Figure 7.
After clarifying the variable type, let’s take a look The setting of the variable type is right JMP What are the effects of mapping, tabulation, and statistical analysis, and how to change variable types .
03 The variable type determines how JMP will present your tables and graphs
Figures 6 and 8 show the state of tables and graphs presented by JMP when "age" is used as a "continuous" variable; Figures 7 and 9 show how JMP presents when "age" is used as a "nominal" variable The status of tables and graphs.
When tabulating, drag the age into the horizontal heading of tabulation, the vertical axis of "continuous" age will automatically appear "total", you can also add the mean, standard deviation and other indicators used to describe continuous variables (Figure 6 );

Figure 6 Statistics displayed in the continuous variable tabulation
The ordinate of "nominal" age automatically shows the number of each age value (because age is used as a multi-categorical variable at this time), and you can also add indicators such as row percentages to describe categorical variables (Figure 7).

Figure 7 Statistics shown in the tabulation of classified variables
When drawing, when we drag the age into the X axis of the graph generator and click the bar graph button at the top, the "continuous" age is the distribution map of the age distribution, and each column represents the age in a certain age range. Number of observations (Figure 8);

Figure 8 Distribution diagram of continuous variable display
And each column of "nominal" age represents the number of observations of that age value (representing a class in a multi-class variable) (Figure 9).

Figure 9 Frequency diagram of classification variable display
Maybe you are not very clear about the diagram in the example just now. Don't worry, we will introduce it in detail later.
04 JMP The appropriate model can be automatically selected according to the variable type
In the first post "5 reasons to tell you why JMP software is more suitable for you? 》 As mentioned in the article, JMP is a semi-intelligent software that can automatically make some basic method choices based on the variable type. Let me talk more about it here.
Take the generalized regression model as an example, select Analysis→Fit Model in the top menu column, and select Generalized Linear in the trait box on the right side of the pop-up dialog box. We set continuous, ordered, and nominal Y as dependent variables in the sample data.
when we Continuous Y put into a Y (Dependent variable) box Later, the distribution given by JMP by default is Normality , The selectable distribution from the drop-down list is shown in Figure 10. Note that the logistic regression is gray and cannot be selected.

Figure 10 The method of continuous variable preset
when we Nominal Y put into a Y (Dependent variable) After the box, the default distribution given by JMP is Binomial (Figure 11), and the other options in the drop-down list are gray (not selectable).

Figure 11 Method of presetting classification variables
when we Orderly Y put into a Y (Dependent variable) After the box, the default distribution given by JMP is Ordered Logistic (Figure 12), except for "polynomial" in the drop-down menu, all other options are gray (not selectable).

Figure 12 Preset method of ordered variables
05 The parameter estimation results are different when different types of variables are used as arguments
Still taking generalized regression as an example, we generate age (continuous type) into new variables grouped by age group, and set them as nominal type and ordered type respectively, with Y (continuous type) as the dependent variable, and age (continuous type) respectively. ), age (nominal type), and age (ordered type) are used as arguments to construct a generalized regression model. The results are shown in Figure 13-15.
When the argument is a continuous variable , There is only one parameter estimation value of the variable (Figure 13), which means that for every 1 year increase in age, the average change due to the variable.

Figure 13 Parameter estimation results of continuous parameters
When age enters the model as a multi-class variable , The model presets the last category as a reference, and the comparison of each of the remaining categories with the reference generates a parameter estimate (Figure 14). For example, in this example, we divide the age into 3 age groups: <50, 50-59, >=60. Take >=60 as a reference, and compare the other two age groups with this category. The meanings respectively show the results of comparing <50 with >=60 and 50-59 with >=60.

Figure 14 Parameter estimation results of classification variables
Of course, you can also set other classes as the reference group, which can be adjusted by the value sequence. For details, see the "value sequence" operation described later.
When age enters the model as an ordered variable , The result shows the comparison of two adjacent categories (Figure 15). The meanings respectively show the results of comparing 50-59 and <50, >=60 and 50-59.

Figure 15 Parameter estimation results of ordered variables
Comparing Figure 14 and Figure 15, it is not difficult to understand the difference between the results of the nominal type (unordered classification) and the ordered type.
06 How to change the number type?
There are two ways to change the number type:
One way is Edit in line information (Figure 16);

Figure 16 Method 1 to change the number type
Another way is In the variable row table on the left side of the data table Click the icon before the variable to change it (Figure 17).

Figure 17 Method 2 to change the number type
When changing the number type, there are several things to pay attention to:
(1) The "modeling type" is Continuous Variable, its "data type" Can only be numeric ;
(2 ) "Modeling Type" is Nominal variable , Its "data type" It can be either a number or a character , When modeling, JMP regards it as No order Discrete variables ;
(3) The "modeling type" is Ordered , Like the nominal type, the "data type" of its variable Can be numeric or character , When modeling, JMP regards it as In order Discrete variables .
After understanding the impact of variable types on drawing, reporting, and analysis, let’s look at how to adjust the value order. This is also a topic that people often pay attention to.
07 How to adjust the value order of nominal and ordered types?
For nominal and ordered types, it is more important to learn how to adjust the order of variable values.
If the variable value is 1, 2, 3... etc., in this case, there is no need to worry about the order problem, the software will determine the order of the variable according to the size of the digit. For example, when graphics are displayed, the coordinates will be sorted according to these digits.
But if your value uses letters like "high", "medium", "low" or other characters, JMP defaults to determine the order of the variable in alphabetical order, namely "high", "low", " medium" order.
For variables whose values are letters or other characters, sometimes their order is not what we expect. As in the above example, the default order (alphabetical order) of JMP is actually "high", "low", and "medium". In this case, whether in the chart or the statistical analysis result, it is in this order Show, obviously this does not meet our expectations. What we expect to see is the order of "high", "medium", and "low". This requires learning how to modify the order of variable values.
There are two ways to modify the sequence of variable values:
(1) Select the row you want to modify, Right-click menu row properties → Value order (Figure 18);

Figure 18 Method 1 of adjusting the value order of nominal and ordered types
(2) Click on the row properties in the row information window → Value order (Figure 19);

Figure 19 Method 2 of adjusting the value order of nominal and ordered types
08 Variable label
For classification variables, although we can directly enter in the form of characters when entering, such as the high, medium, and low mentioned above, in most cases, we enter the data in digital form (such as high, Medium and low are recorded as 1, 2, and 3 respectively), this is for the convenience of analysis, and the data table looks neat.
But from the perspective of the results, we actually want to see the meaning of each category (such as directly displaying "high", "medium", and "low" in the figure instead of 1, 2, 3). In this case, you need to use the data label function .
Let me introduce you JMP of " Value label " Features , Once set, labels can be used directly in the generated chart, which saves time and increases the readability of the results.
Similarly, there are two ways to set value labels:
- One is Click on the row properties in the row information window → Value label (Figure 20);

Figure 20 Method 1 of setting variable labels
- Second, after selecting the row, Right-click menu row properties → Value label (Figure 21);

Figure 21 Method 2 of setting variable labels
If in the future you suddenly don’t want to look at the label and want to see the original data, it’s also very simple. You don’t need to delete the value label that has been set. Just right-click on the variable, and in the menu that appears, set the Just tick the check mark (Figure 22).

Figure 22 Cancel the value label
The above is the practical guide to JMP that we brought to you in this issue. If you have not experienced JMP, welcome Download JMP trial , Follow the article to practice!