Hello, I am trying to use the user written command pbalchk to check balance after IPW.

ely_dly is my matching variable.

When I run this code:
pbalchk ely_dly agecatdum1 agecatdum2 agecatdum3 agecatdum4 agecatdum5 agecatdum6 agecatdum7 ///
mental_rc neck_rc smoke obese sud_rc elixsum muscle_relax nsaids opioid_rx oral_steroid ch_pn_rc , wt(ipt_wt) graph

it produces the desired graph

When I run this code:
pbalchk ely_dly agecatdum1 agecatdum2 agecatdum3 agecatdum4 agecatdum5 agecatdum6 agecatdum7 ///
mental_rc neck_rc smoke obese sud_rc elixsum muscle_relax nsaids opioid_rx oral_steroid ch_pn_rc lx_surg , wt(ipt_wt) graph

I get an error that says may not label 15.5 with lx_surg included

dataex only allowed a smaller number of variables that I am actually trying to use, so below is an abbreviated list. Interestingly, when I have ch_pn_rc in a line that includes more variables, I get the same error message but not with a smaller number of variables.

Can anyone provide advice to help me produce the graph with ch_pn_rc and lx_surg included?

Thanks, Jake



Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long person_id float ely_dly byte(agecatdum1 agecatdum2 agecatdum3 agecatdum4 agecatdum5 agecatdum6 agecatdum7) float(mental_rc neck_rc smoke obese sud_rc elixsum muscle_relax nsaids opioid_rx oral_steroid ch_pn_rc lx_surg ipt_wt)
13939 0 0 0 0 1 0 0 0 1 1 0 1 0  4 1 1 1 1 1 1  .5575319
 3316 0 0 1 0 0 0 0 0 0 0 0 0 0  0 1 1 1 0 0 0 1.1723535
46343 0 0 0 0 0 1 0 0 0 0 0 0 0  2 1 1 1 0 0 0  3.974353
12583 0 0 1 0 0 0 0 0 1 1 0 0 0  4 0 0 0 0 0 0  .5387214
15409 0 0 0 0 1 0 0 0 0 1 0 0 0  1 0 0 0 0 1 1  .6329958
 9748 0 0 1 0 0 0 0 0 0 0 1 0 1  1 0 1 1 0 0 0  .8207506
14084 0 0 0 0 0 1 0 0 0 1 0 0 0  3 0 0 0 0 1 0  .9076101
19857 0 1 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1.2546196
20144 0 1 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1.0122391
44233 0 0 0 0 0 0 0 1 0 0 0 0 0  2 0 0 1 1 0 0   .550765
46892 0 0 0 0 1 0 0 0 0 1 0 0 0  0 0 0 0 0 0 0   .502302
25562 0 0 0 0 1 0 0 0 0 0 0 0 0  1 1 1 1 1 0 0  .5401844
46102 0 0 0 1 0 0 0 0 0 0 1 0 1  1 0 0 1 0 1 0  .8357935
25563 0 0 0 0 1 0 0 0 0 0 0 0 0  1 0 0 0 0 0 0  .7990386
33754 0 1 0 0 0 0 0 0 0 0 0 1 0  1 1 1 1 1 0 0   .905385
 8671 0 0 0 0 0 0 0 1 0 0 0 0 0  0 0 0 0 0 0 0  .6747348
13286 0 0 0 0 0 0 1 0 0 1 0 0 0  3 0 0 0 0 0 0  .7072123
15456 0 1 0 0 0 0 0 0 1 0 0 1 0 10 0 1 0 0 0 0  .3854449
27502 0 0 1 0 0 0 0 0 0 0 0 0 0  0 0 1 1 1 0 0  .8524675
23415 0 0 0 0 0 0 1 0 0 0 0 0 0  0 0 0 1 0 0 0 1.3581762
35542 0 0 0 1 0 0 0 0 1 0 0 0 1  4 1 1 1 0 0 0  .4696056
42318 0 0 0 0 1 0 0 0 0 0 0 0 0  1 1 1 1 1 0 0 1.3414547
 5240 0 0 0 1 0 0 0 0 1 0 1 0 1  1 1 1 1 0 0 0   .859826
16857 0 0 1 0 0 0 0 0 1 0 0 0 0  1 0 1 1 0 0 0  .6877958
38004 0 0 0 0 1 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1.0176553
31211 0 0 0 1 0 0 0 0 0 1 0 0 0  4 0 0 1 1 0 0  .5029148
17249 0 0 0 1 0 0 0 0 0 1 0 0 0  0 1 1 1 1 0 0 1.1942176
 4007 0 0 0 1 0 0 0 0 1 1 0 0 0  2 0 0 1 0 0 0   .619216
10832 0 0 0 0 0 1 0 0 1 0 0 0 0  2 0 0 0 0 0 0  .8476777
45646 0 0 0 1 0 0 0 0 0 0 0 0 0  1 1 0 1 1 0 0 3.1308806
36307 0 0 0 1 0 0 0 0 0 0 0 0 0  0 0 0 1 1 0 0  .9730653
40343 0 0 1 0 0 0 0 0 1 0 0 0 0  1 1 1 1 0 0 0  .9107891
24255 0 0 0 1 0 0 0 0 0 0 1 1 1  1 0 0 1 0 1 0 1.0672215
14914 0 0 0 0 1 0 0 0 0 0 1 0 1  5 0 0 0 0 1 0  .5112361
 4526 0 0 0 0 1 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0  .8385844
38283 0 0 0 0 1 0 0 0 0 0 0 0 0  1 1 1 1 0 0 0 1.0168355
16268 0 0 0 1 0 0 0 0 0 0 0 0 1  3 0 1 1 0 0 0  .4447871
47923 0 0 0 0 0 0 0 1 0 0 0 0 0  2 0 0 0 0 0 0  .5048921
16918 0 1 0 0 0 0 0 0 0 0 0 0 0  1 1 0 1 1 0 0 1.0583472
18893 0 1 0 0 0 0 0 0 0 0 0 0 0  0 1 1 1 1 0 0 1.0230082
40655 0 0 1 0 0 0 0 0 1 0 0 0 0  0 1 0 1 1 0 0  1.100055
12490 0 0 0 1 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1.1150215
14150 0 0 0 0 0 0 1 0 0 0 0 0 0  0 0 1 1 0 0 0  1.361601
49254 0 0 0 0 0 0 1 0 1 0 1 0 1  6 1 1 0 0 0 0  .6272988
 6993 0 0 0 0 0 0 1 0 0 0 1 0 0  6 0 0 0 0 0 0  1.497155
35834 0 0 0 0 1 0 0 0 0 0 0 0 0  1 0 0 1 0 0 0  .7408866
13783 0 1 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1.0122391
45771 0 1 0 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1.2546196
41879 0 0 0 1 0 0 0 0 0 1 0 0 0  0 0 0 0 0 0 1 .54164064
43250 0 0 1 0 0 0 0 0 0 0 0 0 0  0 0 1 1 0 0 0  2.402184
50192 0 0 0 0 0 1 0 0 1 0 0 1 0  4 0 0 0 0 0 0  .6073766
13119 0 0 0 0 1 0 0 0 0 0 0 0 0  0 0 0 1 1 0 0   .893705
43059 0 0 0 1 0 0 0 0 0 0 0 0 0  0 0 0 1 1 0 0  1.201164
36039 0 0 1 0 0 0 0 0 0 0 0 0 0  0 1 0 1 0 0 0 2.1443925
 6076 0 0 0 0 1 0 0 0 0 0 0 0 0  0 0 0 0 0 0 0  .8237873
35817 0 0 0 0 0 0 1 0 0 0 0 0 0  3 0 0 0 0 0 0  .7459563
43417 0 0 0 1 0 0 0 0 1 1 0 1 0  3 0 0 0 0 0 0 .54749244
 6477 0 0 0 0 1 0 0 0 1 0 0 0 0  3 0 0 0 0 0 1  .4682794
24828 0 0 0 0 1 0 0 0 1 1 1 0 1  2 1 0 1 0 0 0  .5485624
11108 0 0 0 0 1 0 0 0 0 0 0 0 0  1 0 0 0 0 0 0  .8904866
21566 0 0 0 0 1 0 0 0 0 0 0 1 0  2 0 0 0 0 0 0 .58565575
49616 0 0 0 0 1 0 0 0 1 0 0 0 0  2 0 1 1 1 0 0  .4846684
 5367 0 0 1 0 0 0 0 0 0 0 0 0 0  1 1 0 1 1 0 0  1.227064
 9746 0 1 0 0 0 0 0 0 1 0 1 0 1  1 0 0 0 0 0 0  .6083775
46203 0 1 0 0 0 0 0 0 1 0 0 0 0  0 0 0 0 0 0 0   .976356
49102 0 0 0 0 0 1 0 0 0 0 0 0 0  0 0 1 1 1 1 0  1.481036
 2844 0 0 1 0 0 0 0 0 0 0 0 0 0  0 1 1 1 0 0 0 1.7159733
17477 0 0 0 0 0 1 0 0 0 0 0 0 0  0 0 1 1 0 0 0  1.353559
 6411 0 0 0 0 1 0 0 0 1 0 0 0 0  2 0 0 0 0 0 0 .57096964
10110 0 0 0 0 0 0 0 1 0 0 0 0 0  2 1 0 1 0 0 0  .6023014
33102 0 0 0 1 0 0 0 0 1 0 1 0 1  4 0 0 1 1 0 0  .5276507
36755 0 0 0 0 0 1 0 0 0 0 0 0 0  0 0 0 0 0 0 0  .8141759
11872 0 0 0 0 0 1 0 0 0 0 0 0 0  0 1 1 1 1 0 0  2.200348
35200 0 0 1 0 0 0 0 0 0 1 1 0 1  3 1 0 1 1 0 0    .95183
21435 0 0 0 0 1 0 0 0 0 0 1 0 1  0 0 1 1 1 0 0  .6413481
22417 0 0 0 0 1 0 0 0 0 0 0 0 0  0 1 1 1 1 0 0 1.0285122
 8092 0 0 0 0 1 0 0 0 0 0 1 0 1  1 0 1 1 1 1 0 .58334404
26986 0 0 1 0 0 0 0 0 0 0 0 0 0  0 0 0 1 1 0 0 1.2523463
22744 0 0 0 0 0 0 1 0 0 0 0 0 0  0 0 0 0 0 0 0 1.5343385
 4079 0 0 0 1 0 0 0 0 1 0 0 0 0  1 1 1 1 0 0 0  .8731262
 5362 0 1 0 0 0 0 0 0 1 1 0 0 0  1 0 0 0 0 0 0   .644514
14531 0 1 0 0 0 0 0 0 0 0 0 0 0  0 0 0 1 0 1 0  .9985502
 8472 0 0 0 0 0 1 0 0 0 0 0 1 0  4 0 1 1 0 0 0  .8789674
28210 0 0 0 0 0 1 0 0 0 1 0 0 0  7 1 1 1 0 0 0  .6445903
51258 0 1 0 0 0 0 0 0 0 0 0 0 0  0 1 1 1 0 0 0 1.4656847
24368 0 0 1 0 0 0 0 0 0 1 0 0 0  0 0 0 0 0 0 0  .6559446
50650 0 0 0 0 1 0 0 0 0 1 0 0 0  1 0 0 1 0 1 0  1.272283
13690 0 0 0 0 1 0 0 0 0 0 1 0 1  0 0 0 0 0 0 0  .9935714
23151 0 0 0 0 0 1 0 0 0 0 0 0 0  1 0 1 1 0 0 0 1.2725513
20129 0 0 1 0 0 0 0 0 0 0 0 0 0  0 1 1 1 0 0 0  1.350333
23168 0 0 0 1 0 0 0 0 1 0 0 1 0  9 1 1 1 1 1 0  .4837782
36385 0 0 0 1 0 0 0 0 0 0 0 0 0  0 0 0 1 1 0 0  3.476376
 1206 0 0 0 0 0 0 0 1 0 0 0 0 0  0 1 0 1 1 0 1  .4320661
26638 0 1 0 0 0 0 0 0 1 1 1 0 1  5 1 1 1 0 0 0   .457715
36508 0 0 0 0 0 1 0 0 0 0 0 0 0  1 1 0 1 1 0 0  1.792085
48716 0 1 0 0 0 0 0 0 0 0 0 0 0  1 0 1 1 0 0 0  .6414124
43575 1 0 1 0 0 0 0 0 0 0 0 0 0  0 0 0 1 0 0 0  .7853966
31178 1 1 0 0 0 0 0 0 0 0 0 0 0  0 1 0 1 1 0 0  .9016075
 9000 1 0 0 0 0 0 1 0 0 0 0 0 0  2 0 0 1 1 0 0 1.1426085
19449 1 0 0 0 1 0 0 0 0 0 1 0 0  2 0 0 1 0 0 0  .9678511
end
label values ely_dly ely_dly_lab
label def ely_dly_lab 0 "0 delay PT", modify
label def ely_dly_lab 1 "1 early PT", modify
label values ch_pn_rc ch_pn_rclab
label def ch_pn_rclab 0 "0= no chronic pn", modify
label def ch_pn_rclab 1 "1= has chronic pn", modify