<?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: Invalid arugument error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-arugument-error/m-p/484418#M287045</link>
    <description>Probably dividing by zero.</description>
    <pubDate>Mon, 06 Aug 2018 15:34:33 GMT</pubDate>
    <dc:creator>tomrvincent</dc:creator>
    <dc:date>2018-08-06T15:34:33Z</dc:date>
    <item>
      <title>Invalid arugument error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-arugument-error/m-p/484390#M287044</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote this code to calculate the Incidence Rate of few patients in my dataset.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*making the IR table;
proc sql ;
	create table _04_allinf_IR as 
	select count(enrolid) as N
			,sum(post_ind) as  events
			,sum(PY) as Person_Years
			,(SUM(post_ind)/SUM(PY))*100000 as IR
			,CINV(0.025,2*SUM(post_ind))/(2*SUM(PY))*100000 as Lower95
			,CINV(0.975,2*(SUM(post_ind)+1))/(2*SUM(PY))*100000 as Upper95
	from _04_PY ;
quit ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I am getting this error. How to resolve this ?&lt;/P&gt;&lt;PRE&gt;*making the IR table;
68         proc sql ;
69         	create table _04_allinf_IR as
70         	select count(enrolid) as N
71         			,sum(post_ind) as  events
72         			,sum(PY) as Person_Years
73         			,(SUM(post_ind)/SUM(PY))*100000 as IR
74         			,CINV(0.025,2*SUM(post_ind))/(2*SUM(PY))*100000 as Lower95
75         			,CINV(0.975,2*(SUM(post_ind)+1))/(2*SUM(PY))*100000 as Upper95
76         	from _04_PY ;
NOTE: Invalid argument 2 to function CINV. Missing values may be generated.
NOTE: Table WORK._04_ALLINF_IR created, with 1 rows and 6 columns.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 14:47:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-arugument-error/m-p/484390#M287044</guid>
      <dc:creator>manya92</dc:creator>
      <dc:date>2018-08-06T14:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid arugument error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-arugument-error/m-p/484418#M287045</link>
      <description>Probably dividing by zero.</description>
      <pubDate>Mon, 06 Aug 2018 15:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-arugument-error/m-p/484418#M287045</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2018-08-06T15:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid arugument error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-arugument-error/m-p/484572#M287046</link>
      <description>&lt;P&gt;Or probably =0.&lt;/P&gt;
&lt;P&gt;Create a variable with the value of the second argument since that's where the error is&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token number"&gt;, 2&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SUM&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;post_ind&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt; as ARG&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 23:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-arugument-error/m-p/484572#M287046</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-08-06T23:08:50Z</dc:date>
    </item>
  </channel>
</rss>

