<?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: Evaluate normal quantile function at 1 or 0 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319590#M70243</link>
    <description>&lt;P&gt;You could write your own qnorm() with FCMP. However, I don't know that SAS handles ".I" any differently than other missing values, including ".".&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2016 16:43:19 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-12-16T16:43:19Z</dc:date>
    <item>
      <title>Evaluate normal quantile function at 1 or 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319547#M70217</link>
      <description>&lt;P&gt;I am trying to translate code from R into SAS. In R I can evaluate the normal quantile function on the [0,1] intervall. E.g.&lt;/P&gt;&lt;PRE&gt;qnorm(1)
[1] Inf&lt;/PRE&gt;&lt;P&gt;However, if I do this in SAS with the following code&lt;/P&gt;&lt;PRE&gt;y=QUANTILE("NORMAL", 1);&lt;/PRE&gt;&lt;P&gt;I get an error message and the result is a missing value. (Note: between 0 and 1 the function works fine)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a possibility to get Inf (.I) as a result (without manually capturing the cases)?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 14:09:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319547#M70217</guid>
      <dc:creator>philip_</dc:creator>
      <dc:date>2016-12-16T14:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate normal quantile function at 1 or 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319590#M70243</link>
      <description>&lt;P&gt;You could write your own qnorm() with FCMP. However, I don't know that SAS handles ".I" any differently than other missing values, including ".".&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 16:43:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319590#M70243</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-12-16T16:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate normal quantile function at 1 or 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319936#M70380</link>
      <description>&lt;P&gt;PG, thanks for your reply. Regarding ".I", I misinterpreted this link: &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/63541/HTML/default/viewer.htm#imlug_r_sect019.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/imlug/63541/HTML/default/viewer.htm#imlug_r_sect019.htm&lt;/A&gt;. It states: "Some applications use &lt;STRONG&gt;.I&lt;/STRONG&gt; to represent positive infinity and use &lt;STRONG&gt;.M&lt;/STRONG&gt; to represent negative infinity."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this brings me to a closely related question: Is there a symbol in SAS for infinity and could SAS handle inifity as an input? E.g. is something like this possible: CDF("Normal", infinity) which I expect to return 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2016 15:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319936#M70380</guid>
      <dc:creator>philip_</dc:creator>
      <dc:date>2016-12-19T15:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate normal quantile function at 1 or 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319991#M70387</link>
      <description>&lt;P&gt;To my knowledge, only the DIVIDE function handles .I and .M in a special way. Everywhere in SAS Base, the values . and .A-.Z are treated as missing values. You could say that SAS has adopted a pragmatic approach to computation. It is limited to finite values that can be represented with the floating point hardware :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;26   data _null_;
27   ataninf = atan(.i);
28   expminf = exp(.m);
29   expmlarge = exp(-1e200);
30   isZero = expmlarge = 0;
31   put ataninf= expminf= expmlarge= iszero=;
32   run;

ataninf=. expminf=. expmlarge=0 isZero=1
&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Dec 2016 18:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319991#M70387</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-12-19T18:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate normal quantile function at 1 or 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319992#M70388</link>
      <description>&lt;P&gt;Your quote is from the SAS/IML documentation and it probably refers to the use of .M and .P as endpoints for numerical integration on infinite domains, as implemented in the QUAD subroutine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mathematically, the domain of a quantile function is the open interval (0, 1). You can trap out-of-domain errors by using the ideas in the article &lt;A href="http://blogs.sas.com/content/iml/2015/11/04/trap-cap-division-by-zero.html" target="_self"&gt;"Trap and cap: Avoid division by zero and domain errors when evaluating functions."&lt;/A&gt;&amp;nbsp;For quantiles, it might look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   data Q;
   input prob @@;
   if prob &amp;lt;=0 then q = .M; 
   else if prob&amp;gt;=1 then q = .P;
   else q = quantile("Normal", prob);
   datalines;
   -1 0 .1 .5 .9 1 1.2
   ;

   proc print; run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could also define a user-defined format to print .M as "-Infinity" and .P as "+Infinity."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Traditional SAS supports 27 missing value: ., ._, and .A, ..., .Z. You can choose to interpret these missing values any way you want in your programs. However, most numerical functions (SQRT, LOG, EXP,...) accept any missing value and return the generic missing value (.).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2016 18:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Evaluate-normal-quantile-function-at-1-or-0/m-p/319992#M70388</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-19T18:44:42Z</dc:date>
    </item>
  </channel>
</rss>

