Hi Community, When computing on char type P-value using INPUT function in PROC REPORT compute block I'm getting in the log a NOTE: Invalid argument to function INPUT at line.... (See the code below).. Looking at the output I don't think there is any issue with computation (as all values less than 0.05 get bolded based on computation). Although (??) modifier cleared the note from the log (input(grp1, ?? best.)), I wanted to check in with you to see whether this is the right way to avoid the log note above, or there is more appropriate way to handle it.
Thank you!
data have;
infile cards dlm=',' truncover;
length name grp1 grp2 grp3 $ 40;
input name grp1-grp3 order;
cards;
Responder n/N(%), 4/150 (2.67%), 8/154 (5.19%), 10/150 (6.67%), 1
Odds Ratio (95% CI), 0.798 (0.385-1.657), 2.385 (0.891-6.387), 2.031 (1.080-3.819), 2
P-value, 0.0544, <.0001, 0.0033, 3
;
proc print;run;
title 'Test';
proc report data= have;
column order name grp:;
define order/ noprint;
define name/ '' width=30;
define grp1/ 'Group 1' width=15;
define grp2/ 'Group 2' width=15;
define grp3/ 'Group 3' width=15;
compute Name;
if lowcase(strip(name)) eq 'p-value' then call define(_row_, "style", "style=[font_style=italic]");
endcomp;
compute grp1;
if lowcase(strip(name)) eq 'p-value' and input(grp1, best.) lt 0.05 then call define(_col_, "style", "style=[font_weight=bold]");
endcomp;
compute grp2;
if lowcase(strip(name)) eq 'p-value' and input(grp2, best.) lt 0.05 then call define(_col_, "style", "style=[font_weight=bold]");
endcomp;
compute grp3;
if lowcase(strip(name)) eq 'p-value' and input(grp3, best.) lt 0.05 then call define(_col_, "style", "style=[font_weight=bold]");
endcomp;
compute after / style=[bordertopcolor=black bordertopwidth=1pt ];
line ' ';
endcomp;
run;
title;
log:
... View more