In the process of data analysis, You may need to subdivide one or more columns of indicators into multi-column indicators. For example, understand the distribution of men and women in different age ranges in the results of the census; or, for analysis or mapping needs, split the height into two columns according to gender, etc. Today I will show you how to split one column of data into multiple columns in JMP practice.

Suppose we have a repeated measurement data, the time point and the measured value are recorded as two variables. For example, the common male and female comparison pyramid chart also needs to separate the male and female data into two variables before drawing. Today we will introduce JMP to everyone based on these two examples Another practical function of the device-split.
First look at the sample data of repeated measurements, a total of 15 The subjects were divided into three groups to receive different treatments, and the measurement was repeated three times. The data record (intercepted part) is shown in the figure 1 .

figure 1
In order to perform repeated measures analysis of variance, we need to divide the measured values at the three time points into three columns according to the time points. Split the dialog box by clicking on the table in the toolbar (Tables) → Split (Split) , As shown 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, and split it into the same number of columns as the time point. We can choose to keep all the remaining columns. If they are not needed for subsequent analysis, we can also choose to delete 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 Carry out dynamic demonstration, see picture 4 .

Figure 4
The new data table generated after the split is shown in Figure 5 Shown. The original information is 45 Column, each participant occupies a column at three time points. After splitting, the new data is 15 Column, each participant occupies one column, the three time points are in t1-t3 Three columns are displayed, so that the data format requirements of repeated measures analysis of variance can be met.

Figure 5
Let me list one more need to use JMP The situation of splitting functions, such as our common gender pyramid, as shown in the figure 6

Image 6
If you want to make such a graph, the male and female data must be separated into columns and used as two variables. However, under normal circumstances, gender often exists as an independent variable. In this case, we need to use today’s split Function.
We use a moving picture to display a certain data. Suppose we want to make a picture to show the BMI of men and women with diabetes. How to split the value distribution? As shown 7 As shown in the animation.

Figure 7
When the new data table is generated, we can make the graph. As for how to make a pyramid chart, stay tuned for the continuation of this series of JMP Make a picture album.
The splitting and stacking of the column is everyone in JMP Cleaning data is a very common and practical function, # Data analysis must learn 10 Tips series articles are continuing to be pushed, so stay tuned! download JMP Try it out, follow the article to practice!
Recommended reading:
Original link: "Splitting" of data cleaning — quickly splitting one column into multiple columns
Note: This article is the sixth issue of this series of articles. Click on #Data analysis must learn 10 Skill To review other articles.