Use SPSS random numbers to easily achieve random grouping

Use SPSS random numbers to easily achieve random grouping

In clinical research, it is often necessary to group research subjects, and the grouping needs to be objective and random. So we often use random grouping method.
Insert picture description here
Random grouping methods include envelope method and random number table method, which are inconvenient. Today we can easily achieve random grouping by using random numbers generated by SPSS.
Suppose we plan to collect 72 patients and randomly divide them into 3 groups. First, we will number the patients from top to bottom in SPSS 1-72.
Insert picture description here
Create a new variable group R,
Insert picture description here
open the SPSS random number generator, set a fixed value, we set it to 5 here (you can also set one at will) and
Insert picture description here
Insert picture description here
click OK. Next, use the calculation variable function.
Insert picture description here
Use the function group random number function, and use the Rv.Uniform function to calibrate the maximum and minimum values. Here we set it to 1-10. After
Insert picture description here
clicking OK, the random number generation
Insert picture description here
uses visual binning for regional segmentation. Select R to
Insert picture description here
Insert picture description here
generate a new sequence: group, click to generate a split point.
Insert picture description here
Split into 3 regions, select 2 split points and
Insert picture description here
click OK, SPSS will help us automatically group into groups, isn’t it easy, for several thousand It is very simple to group tens of thousands of data in this way, and it will be divided in a few minutes.
Insert picture description here
Welcome to pay attention to my official account, and more scientific research articles are updated here.
Use your little hands to pay attention!
Insert picture description here

Guess you like

Origin blog.csdn.net/dege857/article/details/107936226