In the process of data analysis, You may need to break down one or more columns of indicators into multiple columns of indicators. For example, in the census results, you can understand the distribution of men and women in different age groups; or, for the purpose of analysis or drawing, split the height into two columns according to gender, etc. Today I will show you how to practice splitting one column of data into multiple columns in JMP.

Suppose we have a piece of repeated measurement data, and the time point and measurement value are recorded as two variables. For example, the common male and female comparison pyramid chart also needs to divide the male and female data into two variables before drawing. Today we will introduce JMP to you based on these two examples. Another useful feature of - splitting.
First, let’s take a look at the sample data of repeated measurements, a total of 15 Each subject was divided into three groups to receive different treatments. The measurement was repeated three times. The data record (intercepted part) is as shown in the figure. 1 .

figure 1
In order to perform a repeated measures ANOVA, we need to separate the measurements at the three time points into three columns based on time point. Split the dialog box by clicking Tables on the toolbar →Split (Split) , as shown in the figure 2.

figure 2
We put the time point into the Split by box, and then put the measured value into the split column, that is, split the measured value according to the time point into the same number of columns as the number of time points. We can choose to keep all the remaining columns. If they are not needed for subsequent analysis, we can also choose to delete them all, or manually select the columns we want to save, as shown in Figure 3. .

image 3
Because splitting the data column will inevitably form a new data table, the new data table can be renamed. Below we use a simple gif Perform dynamic demonstration, see picture 4 .

Figure 4
The new data table generated after splitting is shown in Figure 5 shown. The original data is 45 Column, each subject occupies one column for each of the three time points. After splitting, the new data is 15 columns, each subject occupies one column, and the three time points are at t1-t3 Three columns are displayed, which can meet the data format requirements of repeated measures analysis of variance.

Figure 5
Let me give you another example that requires the use of JMP The situation of splitting functions, such as our common gender pyramid, as shown in the figure 6

Figure 6
If you want to make such a graph, the data of men and women must be listed separately as two variables. However, under normal circumstances, gender often exists as an independent variable. In this case, you need to use the splitting method discussed today. sub-function.
We use a certain data to display using animations. Suppose we want to display the BMI of male and female diabetics. How to split the value distribution? As shown in the picture 7 As shown in the animation.

Figure 7
After the new data table is generated, we can make graphs. As for how to make a pyramid diagram, please stay tuned for the continuation of this series of JMP Make a picture album.
Splitting and stacking columns is what everyone in JMP Cleaning data is a very common and practical function. # Must learn data analysis 10 The series of articles on skills is being pushed continuously, so stay tuned! download JMP Try it out and practice following the article!
Recommended reading:
Original link: "Split" of data cleaning - quickly split one column into multiple columns
Note: This article is the sixth issue of this series. Click #Data analysis must learn 10 Skill , to review other articles.