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

This article continues to bring you the basic knowledge and operation of JMP software - Types of variables, and settings for variable labels .
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 the variable type setting in the original JMP hides so many tricks and secrets.
Let's take a data set named "Diabetes" as an example. After importing the data, the state shown in Figure 1 is displayed.

Figure 1 Example data
01 from the variable name
If you want to change the name of a variable , such as changing "Gender" to "Gender", There are two ways to do it .
- First, right-click on the variable name you want to change, left-click to select "Line Information", fill in the variable name you want to change in the pop-up window, and click OK, as shown in Figure 2.

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

Figure 3 Change the variable name method 2
02 variable type
" line information " The window can not only change the variable name, but also the variable type.
When importing data, JMP determines two types for each variable, as shown in Figure 4, which are " data type " and " Modeling type " .

Figure 4 Schematic diagram of variable types
- " data type " determines the variable in JMP storage format in , there are four types of drop-down menus, as shown in Figure 5. Under normal circumstances, our data will only involve two types: numeric type and character type: numeric variables are all digits and can be operated on, while Variables can contain letters, digits, or a combination of letters and digits, and cannot perform operations.
Here we can change the "Data Type", but there is one thing that needs special attention: If you change a character variable to a numeric type, all character values in the variable will become missing and cannot be recovered. Therefore, if it is not necessary, do not easily try to modify the default settings of the system.

Figure 5 Schematic diagram of data types
- " Modeling type " Decided JMP How to handle this variable in data analysis , the drop-down menu includes multiple options. In general, we only use the first three: continuous, ordinal and nominal, see Figure 7.
After clarifying the variable type, let's take a look The setting of the variable type is correct JMP What is the impact of graphing, tabulation, and statistical analysis, and how to transform variable types .
03 The variable type determines how JMP will render your tables and graphs
Figures 6 and 8 show the state of the tables and graphs presented by JMP when "age" is used as a "continuous" variable; Figures 7 and 9 show the state of the tables and graphs presented by JMP when "age" is used as a "nominal" variable Status of tables and graphs.
When making a table, drag age into the horizontal target of the table, and the vertical coordinate of "continuous" age will automatically appear "sum". You can also add indicators such as mean and standard deviation to describe continuous variables (Figure 6). );

Figure 6 Statistics for continuous variables tabulated
The ordinate of "nominal" age automatically shows the number of each age value (because age is now a multi-category variable), and you can also add indicators such as row percentages to describe categorical variables yourself (Figure 7).

Figure 7 Statistics for categorical variables tabulated
When drawing, when we drag age into the X-axis of the graph generator and click the horizontal bar button above, the "continuous" age will appear as a distribution map of age distribution, and each column represents the age distribution within a certain age range. number of observations (Figure 8);

Figure 8 Distribution diagram of continuous variable display
Whereas, each bar for "nominal" age represents the number of observations for that age value (representing a class in a multiclass variable) (Figure 9).

Figure 9 Frequency plot of categorical variable display
Maybe you are not very clear about the chart method in the example just now, don't worry, we will introduce it in detail later.
04 JMP The appropriate model can be automatically selected based on the variable type
in the first "5 Reasons Why JMP Software is Right for You? 》 As mentioned in , JMP is a semi-intelligent software that can automatically choose some basic methods according to the type of variables. Let's go into more detail here.
Taking 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, ordinal, and nominal Y as the dependent variable in the sample data.
when we will be continuous Y put into a Y (dependent variable) box , the distribution given by JMP by default is Normality , the distribution that can be selected from the drop-down list is shown in Figure 10. Note that the Logistic regression is gray at this time and cannot be selected.

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

Figure 11 Method of Categorical Variable Presetting
when we will be ordered Y put into a Y (dependent variable) box, the distribution given by JMP by default is ordinal Logistic (Figure 12), except for "Polynomial" in the drop-down menu, other options are gray (not selectable).

Figure 12 The method of ordinal variable preset
05 Parameter estimation results are different when different types of variables are used as arguments
Still taking generalized regression as an example, we generate new variables grouped according to age groups by age (continuous type), set them as nominal type and ordinal type respectively, take Y (continuous type) as the dependent variable, and use age (continuous type) as the dependent variable respectively. ), age (nominal), and age (ordinal) are used as arguments to construct a generalized regression model. The results are shown in Figures 13-15.
When the argument is a continuous variable , there is only one parameter estimate for the variable (Figure 13), which means the average change in the dependent variable for every 1-year increase in age.

Figure 13 Parameter estimation results for continuous arguments
When age is entered into the model as a multi-categorical variable , the model presupposes that the last-ranked category is used as a reference, and the comparison of each of the remaining categories with the reference yields a parameter estimate (Figure 14). For example, in this example, we divide the age into 3 age groups: <50, 50-59, >=60. Taking >=60 as a reference, the remaining 2 age groups are compared with this class. The meanings show the results of <50 compared to >=60 and 50-59 compared to >=60, respectively.

Figure 14 Parameter estimation results for categorical variables
Of course, other classes can also be set as reference groups, which can be adjusted by the value order. For details, please refer to the "value order" operation described later.
When age is entered into the model as an ordinal variable , the results show a comparison of two adjacent classes (Figure 15). Its meaning shows the results of 50-59 compared with <50, >=60 compared with 50-59, respectively.

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 as nominal (unordered classification) and ordinal.
06 How to change the variable type?
There are two ways to change the variable type:
One way is Edit in row info (Figure 16);

Figure 16 Change the variable type method 1
Another way is In the variable row table on the left side of the data table Click the icon in front of the variable to change it (Figure 17).

Figure 17 Method 2 of changing the variable type
When changing the variable type, there are a few things to pay attention to:
(1) "Modeling Type" is continuous The variable whose "data type" can only be numeric ;
(2 ) Modeling Type is nominal variable , whose "Data Type" Can be either numeric or character , when modeling, JMP uses it as no order discrete variables of ;
(3) "Modeling Type" is ordinal , like the nominal type, the "data type" of its variable Can be numeric or character , when modeling, JMP uses it as in order discrete variables of .
Now that we understand the impact of variable types on plotting, reporting, and analysis, let's look at how to adjust the order of values. This is also a topic that people often pay attention to.
07 How to adjust the order of values for nominal and ordinal?
For nominal and ordinal, it is important to learn how to adjust the order of variable values.
If the variable value is 1, 2, 3, etc. digits, in this case, don't worry about the order, the software will determine the order of the variables according to the size of the digits. For example, when the graph is displayed, the coordinates will be sorted according to these digits.
But if your value uses letters or other characters like "high", "medium", "low", etc., JMP defaults to the order of the variables in alphabetical order, i.e. "high", "low", " medium" order.
For variables whose values are letters or other characters, sometimes they are not in the desired order. As in the above example, the default order (alphabetical order) of JMP is actually "high", "low", "medium". In this case, both in the chart and in the statistical analysis results, it is in this order Display, obviously this does not meet our expectations. What we expect to see is the order "high", "medium", "low". This requires learning how to modify the order of variable values.
There are two ways to change the order of variable values:
(1) Select the line you want to modify, Right-click menu row properties → value order (Figure 18);

Figure 18 Adjusting the order of values for nominal and ordinal types Method 1
(2) Click Row Properties in the Row Info window → value order (Figure 19);

Figure 19 Adjusting the value order of nominal and ordinal types Method 2
08 variable label
For categorical variables, although we can directly enter the data in the form of characters, such as high, medium, and low mentioned above, in most cases, we enter the data in digital form (such as high, medium, and low). 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 result display, we actually prefer to see the meaning represented by each category (for example, "high", "medium", and "low" are directly displayed in the figure instead of 1, 2, and 3). In this case, you need to use the data tag function .
The following will introduce to you JMP of " value label " Function , Once set up, labels can be used directly in the generated graph, saving time and increasing the readability of the results.
Again, there are two ways to set value labels:
- One is Click Row Properties in the Row Info window → value label (Figure 20);

Figure 20 Setting variable label method 1
- Second, after selecting the row, Right-click menu row properties → value label (Figure 21);

Figure 21 Setting Variable Label Method 2
If you suddenly don't want to look at the label in the future, but want to see the original data, it is 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, put the "Use value label" in front of Just check the check mark (Figure 22).

Figure 22 Cancellation of value labels
The above is the practical guide to JMP that we bring to you in this issue. If you haven't experienced JMP yet, welcome Download JMP Trial , follow the article to practice!