我正在尝试获取-2.0到1.55范围内的数据集,并对该数据进行三档处理。数据是代表长度的z分数,我试图从本质上找到“短,中,长”的分界线。
我知道这不能使用单变量完成,因此我一直在使用bin语句,但是遇到了麻烦。
这是我无法使用的数据和一些代码:
data limbs;
input
LowerLimb
;
datalines;
0.5945611665
-0.5826515170
-1.2089586047
-0.7638814175
-1.3541648163
-0.8279052306
-0.9069854423
0.9439623714
-0.1525671573
0.4056990026
1.5466954947
0.4034370839
0.8766515519
-1.5657943810
0.1315781412
0.5884629368
0.6104427011
-0.1874296672
-0.6318866100
-1.0145154507
0.4573267066
-0.0788037696
0.0988716187
-0.1062918576
1.6032740744
0.0366051704
1.2256319114
-0.0975189376
-0.2566850316
1.6652074953
-0.2515183734
0.5004921436
-0.1593883100
0.8129010817
1.1351908320
0.8123843303
1.2870155459
-1.1128448929
0.4506147031
-0.6403088674
-1.0680294390
0.6944292489
-1.5325710123
0.5268637927
1.2873515926
-0.1441695459
-0.7166217143
1.2461334186
-0.9583531596
-0.7342533139
-0.4907715810
0.2059216422
-1.3839801362
0.7310499731
0.6130932991
1.0859079024
1.4255534497
-0.1813774454
0.6544726467
-1.0171713430
-0.5005970523
0.5884629368
-1.4752458285
-0.9195150817
-1.4752458285
0.8515222486
-0.6348874123
-1.0206723355
-0.3331377791
-1.1015990720
-0.1196299907
-0.3504059025
-0.5797983640
-0.2784242647
0.4381186749
0.4665127006
-1.8605760577
-1.5943485819
-0.4196862951
0.5247889197
1.6982671983
-0.5015070356
0.2510690218
-0.1088654424
-0.0470926244
-1.1256998568
-0.4694781522
-0.4903309954
-0.1706456902
-0.7996053224
-0.2106636370
1.1087050595
1.5393390992
0.6407710538
0.8738320036
-1.1218388138
0.5477816746
0.5999120789
0.2915917178
0.5932996471
-0.4754278117
-0.1195030573
0.3480903069
0.1629924791
-0.8543653798
0.0602221361
-0.3484280234
0.8213886228
1.0996879917
-1.0171713430
-0.2613938856
0.1435928118
-0.2410397237
2.0380301721
0.9942206208
-0.7858668669
1.0463609814
0.5651396814
-0.4366703308
-1.2232641582
-0.3770888329
-1.9197016431
1.0463609814
-1.3738499052
-1.0554234361
1.1701816705
-0.8687068897
-0.8743902197
-1.3518493892
-1.6473112739
-0.2953961077
0.5734156662
0.5065516647
1.1603237185
-0.3369092077
1.0982075159
-1.0002141384
-0.9192524613
-0.0431072738
-0.0742208903
0.8658302777
-1.1095158202
-0.8361540961
0.5871263103
-0.3311134236
0.3331929252
-0.6499008335
-1.1966097379
0.7227541366
0.1853978157
0.8074323856
-0.8096153897
-1.0220042319
1.1172583088
1.3540629514
-1.3149667205
-0.7600725098
1.1145492382
1.3270625584
1.1572834877
-1.1877623250
0.3202875975
0.8779400227
-0.4333817521
1.2656618368
-1.1416425163
-0.9014599711
0.3918324501
-0.7997140876
-0.2229835864
-0.0362833762
-0.4399531798
1.1975110853
-0.0183032379
-0.7413393186
0.8474043498
1.2789829755
0.8673767628
-0.4438902513
1.0776590402
0.1910287517
1.1313548102
0.8659515949
-0.9444619985
-0.9926366647
0.6447604307
0.8370824694
-0.8917575544
1.5862615371
0.8437626048
0.2362696149
-1.1429415083
-1.2621422188
-0.7364910931
0.3618265073
0.1708182871
-0.3114446248
0.0011119450
-1.0323790009
0.5951509779
1.6392758858
0.9646250229
-0.9076823320
-0.1409210592
-0.8529359998
;
cutpts = do(-2.00, 1.55);
b = bin(x, 3); /* i_th element is 1-8 to indicate bin */
答案 0 :(得分:0)
如果要将数据分为3组,则可以将PROC RANK与GROUP = 3一起使用。您不必按目标变量进行排序,但是我可以更轻松地查看已完成的操作。
opened