<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: P-value '&amp;lt;.0001' is an invalid argument for INPUT function? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898845#M355264</link>
    <description>&lt;P&gt;Thank you, dear experts, for sharing your knowledge and tips with me!&lt;/P&gt;
&lt;P&gt;It is good to know about formatted values generated by stats procedures...&lt;BR /&gt;All 3 solutions give me the the desired result. And I just pick the first responder's answer as the solution while all answers have the same level of priority for me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 20:29:58 GMT</pubDate>
    <dc:creator>A_Kh</dc:creator>
    <dc:date>2023-10-16T20:29:58Z</dc:date>
    <item>
      <title>P-value '&lt;.0001' is an invalid argument for INPUT function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898553#M355156</link>
      <description>&lt;P&gt;Hi Community,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;When computing on char type P-value&amp;nbsp;using INPUT function in PROC REPORT compute block I'm getting in the log a &lt;STRONG&gt;&lt;EM&gt;NOTE:&amp;nbsp;Invalid argument to function INPUT at line.... &lt;/EM&gt;&lt;/STRONG&gt;(See the code below)..&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;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).&amp;nbsp; Although (??) modifier cleared the note from the log&amp;nbsp; (&lt;SPAN&gt;input(grp1, ?? best.))&lt;/SPAN&gt;, 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.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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, &amp;lt;.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; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;log:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 817px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88852i3BF00205A3288FA2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 21:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898553#M355156</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2023-10-13T21:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: P-value '&lt;.0001' is an invalid argument for INPUT function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898556#M355158</link>
      <description>&lt;P&gt;It's a bit of hack, but probably okay for this example.&amp;nbsp; It will suppress the warning message, and input('&amp;lt;.001',?? best.)&amp;nbsp; will return a missing value.&amp;nbsp; Since in SAS a missing value will evalute to less than .05, it will return true.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally, I'd probably use a different hack.&amp;nbsp; I'd remove the '&amp;lt;' from the string.&amp;nbsp; It's still a hack, but at least it's explicit.&amp;nbsp; I don't like to use ?? in production code, because it suggests there is a lot of messy data you want to ignore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a ;
  x=input('&amp;lt;.0001',?? best.) ;
  put x= ;

  x=input(compress('&amp;lt;.0001','&amp;lt;'), best.) ;
  put x= ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Oct 2023 21:28:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898556#M355158</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-10-13T21:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: P-value '&lt;.0001' is an invalid argument for INPUT function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898559#M355161</link>
      <description>&lt;P&gt;Custom informat will solve that pretty cleanly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format;
invalue mypval
'&amp;lt;.0001'=0.0001
other = [8.]
;
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, &lt;FONT color="#800080"&gt;&lt;STRONG&gt;mypval.&lt;/STRONG&gt;&lt;/FONT&gt;) 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,&lt;FONT color="#800080"&gt;&lt;STRONG&gt; mypval.&lt;/STRONG&gt;&lt;/FONT&gt;) 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,&lt;FONT color="#800080"&gt;&lt;STRONG&gt; mypval.&lt;/STRONG&gt;)&lt;/FONT&gt; lt 0.05 then call define(_col_, "style", "style=[font_weight=bold]");
	endcomp;
	compute after / style=[bordertopcolor=black bordertopwidth=1pt ];
		line ' ';
	endcomp;
run;
title; &lt;/PRE&gt;
&lt;P&gt;The only real trick here could 1) deciding what numeric value to have the result from reading &amp;lt;0.0001 should be and 2) making sure that the informat , the Proc Format code, is available when needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 22:11:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898559#M355161</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-13T22:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: P-value '&lt;.0001' is an invalid argument for INPUT function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898580#M355172</link>
      <description>&lt;P&gt;Some procedures print p-values using a format.&amp;nbsp; So the "&amp;lt;.001" is not necessarily the actual value, just the formatted value.&amp;nbsp; If that is happening here (and it seems like it might be the case because of the bolding and the lack of an error message), just get rid of the INPUT function and refer to the variable name instead.&amp;nbsp; It's likely already a small numeric value.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2023 02:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898580#M355172</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-10-14T02:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: P-value '&lt;.0001' is an invalid argument for INPUT function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898845#M355264</link>
      <description>&lt;P&gt;Thank you, dear experts, for sharing your knowledge and tips with me!&lt;/P&gt;
&lt;P&gt;It is good to know about formatted values generated by stats procedures...&lt;BR /&gt;All 3 solutions give me the the desired result. And I just pick the first responder's answer as the solution while all answers have the same level of priority for me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 20:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-lt-0001-is-an-invalid-argument-for-INPUT-function/m-p/898845#M355264</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2023-10-16T20:29:58Z</dc:date>
    </item>
  </channel>
</rss>

