<?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: error in evaluating a double integral in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92397#M591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recommend the following: factor out&amp;nbsp; c = f(0)=v(0)*avrl(0) from the integral.&amp;nbsp; Then you have the integral of&lt;/P&gt;&lt;P&gt;f(z)*phi(z) where phi is the standard normal PDF.&amp;nbsp; By scaling the integral, you might get convergence.&lt;/P&gt;&lt;P&gt;You can call QUAD on this bounded integrand, and then multiply the result of QUAD by c=f(0) in the optimization code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Aug 2013 12:47:20 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2013-08-09T12:47:20Z</dc:date>
    <item>
      <title>error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92384#M578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am evaluating a double integral using the quad function but i got some errors. The integral is f(Z).g(Q).T(Z,Q) where Z is N(0,1) and Q follows a scaled chi distribution .The program is attached and here is a part of the error:" Convergence could not be attained over the subinterval ( .M , .P)". Could you help me to figure out the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aya&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 15:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92384#M578</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-07-26T15:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92385#M579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Be sure to test and debug each function (integrand) before you try to integrate them.&amp;nbsp; Graphing the functions are a good way to ensure that they are implemented correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An integrand will return a scalar quantity when it receives a scalar input.&amp;nbsp; It looks like the INNER function is returning a vector of values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q = 1;&lt;/P&gt;&lt;P&gt;y = inner(0);&lt;/P&gt;&lt;P&gt;print y; /* should be a scalar */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 15:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92385#M579</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-07-26T15:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92386#M580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks alot Rick. The inner function was returning a vector of values. I corrected this mistake, However I got other errors. I don't know how could I overcome these errors. I think this time it is related to the singularity of a matrix!! The modified program is attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jul 2013 11:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92386#M580</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-07-27T11:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92387#M581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry that I am asking too many questions concerning this code.But it is really very important in my research.&amp;nbsp;&amp;nbsp; I have been trying to correct the errors concerning the singularity of a matrix, so i used ginv function to avoid these errors. However, I got other errors related to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Convergence could not be attained over the subinterval&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( 0 , .P)&lt;/P&gt;&lt;P&gt;Convergence could not be attained over the subinterval&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( .M , .P)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Could you please help me to point out the reasons behind these errors?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for your reply,&lt;/P&gt;&lt;P&gt;Aya&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jul 2013 21:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92387#M581</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-07-28T21:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92388#M582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you already graphed the INNER function for various parameter values and determined that it is correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jul 2013 23:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92388#M582</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-07-28T23:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92389#M583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The plots are attached. Each plot is for a certain QQ value (1,3,5) and different ZED values(-5,-4,-3,-2,-1,0,1,2,3,4,5). I have made many trials to have this integration done, but I am always faced with errors. Sometimes related to the singularity of a matrix, so i tried the " ginv"&amp;nbsp; function, so I got errors related to the convergence of the integral over the specified interval. I really can't figure out what the problem is. I tried running the syntax for other integration limits; ZEDinterval (-1,1) and Qinterval (0,1), It gave me an answer&amp;nbsp; without errors " 1.659E-59". The correct answer over the whole interval (-inf,inf) and(0,inf) is supposed to be 339.4!!&lt;/P&gt;&lt;P&gt;Aya&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-EG;"&gt;&lt;BR /&gt; &lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-EG;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 14:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92389#M583</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-07-29T14:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92390#M584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the convergence problem may be due to scaling.&amp;nbsp; The y axis ranges from near 0 to 10^15.&amp;nbsp; I would suggest integrating the log of the function, and applying the chain rule to get back to the integrated value of the basis function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 18:57:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92390#M584</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-07-29T18:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92391#M585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, Steve, I'll bite. I don't see how you propose to do this. How does finding Integral Log(f(x)) dx give us Integral f(x) dx?&amp;nbsp; Furthermore, the OP hasn't claimed that f(x) &amp;gt; 0, which makes log(f(x)) problematic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 19:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92391#M585</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-07-29T19:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92392#M586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While the OP doesn't say f(x) &amp;gt; 0, the plots that were attached certainly were defined only on f(x) &amp;gt; 0.&amp;nbsp; So, here's my thinking.&amp;nbsp; We want Integral f(x) dx.&amp;nbsp; We find Integral log(f(x)) dx, by taking the log of the response variable, and integrating.&amp;nbsp; Then I was thinking because Integral (log x) dx was x log x - x, we could just substitute.&amp;nbsp; But after putting pencil to paper, that's probably not going to work, as the the original function won't be unaffected by the integration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 20:00:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92392#M586</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-07-29T20:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92393#M587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's always hard to understand complicated code that someone else wrote, but at the end of the INNER module you have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; normal=(1/sqrt(2*pi))*exp(-0.5*(ZED**2));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; b=(v*avrl)cc*normal; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; return(b);&lt;/P&gt;&lt;P&gt;To me, it looks like NORMAL is simply the standard normal PDF.&amp;nbsp; The quantity c=(v*avl) is a constant that depends on Q.&amp;nbsp; Therefore the&lt;/P&gt;&lt;P&gt;integral of INNER over the domain (-Infinity, Infinity) is c, because the integral of the PDF is unity.&amp;nbsp; Therefore it is not necessary to call the QUAD function for INNER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like OUTER might be handled similarly.&amp;nbsp; If OUTER is some multiple k of the chi-square distribution, then the integral on [0, infinity) is simply k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incidentally, if you are interested in other limits of integration, you can use the CDF function to compute integrals of a PDF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 18:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92393#M587</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-07-30T18:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92394#M588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your efforts. i really appreciate it.&amp;nbsp; My integration is the product of three quantities&lt;/P&gt;&lt;P&gt;1-standard normal pdf "normal" &lt;/P&gt;&lt;P&gt;2- a scaled chi distribution with degrees of freedom "df"&lt;/P&gt;&lt;P&gt;3- The quantity (v*avrl) which is a function of both variables QQ and ZED where ZED is the variable following the standard normal distribution and QQ is the variable following a scaled chi distribution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The inner module is used to compute the quantity "v*avrl".&amp;nbsp; After computing the quantitty "v*avrl" which depends on both ZED and QQ, the inner integrand is computed by multipying "v*avrl" by the normal density.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of the inner integration should be a function of QQ which is called "w" in our syntax. This w is multiplied by the scaled chi distribution: &lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;(1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;/cf)*(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;/sqrt(df))*(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;**(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;-(df/&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;)))*(QQ**(df-&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;))*(exp((-QQ**&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;)/&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;))/gamma(df/&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, i think I have to call QUAD for both the inner and outer integrals since "v*avrl" depends on both QQ and ZED, see this part in the syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QQstar1=(QQ*z[i, ])+(ZED/(sqrt(mm)));&lt;/P&gt;&lt;P&gt;QQstar=QQstar1-shift;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kone=QQstar+QQ*fun1;&lt;/P&gt;&lt;P&gt;ktwo=QQstar+QQ*fun2;&lt;/P&gt;&lt;P&gt;pij=probnorm(kone)-probnorm(ktwo);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Thus "v*avrl"is not a constant with respect to the inner integral. Am I correct??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Aya&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 20:50:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92394#M588</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-07-30T20:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92395#M589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep. I missed that v*avrl depends on ZED. Too bad. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't suppose you know anything analytically about the function f(z)=v(z)*avrl(z), such as&amp;nbsp; values at +/- infinity and derivative info? If you do, you might be able to integrate by parts using the fact that phi(x) has a known antiderivative, the normal CDF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 21:07:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92395#M589</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-07-30T21:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92396#M590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I don't know the antiderivative information. What I know is that the v*avrl is the average run length of a certain control chart. I am computing the average run length using the markov chain technique. The martrix "r" is the transitional probability matrix and I have t&amp;nbsp; transiet states.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 22:12:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92396#M590</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-07-30T22:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92397#M591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recommend the following: factor out&amp;nbsp; c = f(0)=v(0)*avrl(0) from the integral.&amp;nbsp; Then you have the integral of&lt;/P&gt;&lt;P&gt;f(z)*phi(z) where phi is the standard normal PDF.&amp;nbsp; By scaling the integral, you might get convergence.&lt;/P&gt;&lt;P&gt;You can call QUAD on this bounded integrand, and then multiply the result of QUAD by c=f(0) in the optimization code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Aug 2013 12:47:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92397#M591</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-08-09T12:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92398#M592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for repeating my question, but I don't know what do you mean by scaling the integral? I tried to understand the procedure you explained but I couldn't get the point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aya Emara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Aug 2013 12:50:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92398#M592</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-08-18T12:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92399#M593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry for the delay, but I have a lot of travel in August. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know whether it will work, but I hoped you might be able to scale the integral as follows.&lt;/P&gt;&lt;P&gt;Let h be the integrand. Then \integral h(x) dx = h(0) * \integral (h(x)/h(0)) dx.&lt;/P&gt;&lt;P&gt;Let g(x) = h(x) / h(0). My hope was that the integral of g is better behaved an remains bounded as your parameter varies.&amp;nbsp; The value of the integral should be small for all values of the parameter.&amp;nbsp; However, I haven't had time to think about this problem recently or to see whether my idea actually works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A double integral of a convolution is just too hard for a casual observer to offer much specific help.&amp;nbsp; It would take me quite a bit of effort to understand the details of your problem.&amp;nbsp; I still think your best bet is still to simplify the problem and understand each component. The key is understanding why the integral isn't converging. For example, I notice that the documentation example for the QUAD function says that the inner integral should not range over an infinite domain. Have you tried integrating the inner intergral on a finiate domain such as [-10, 10]?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Aug 2013 20:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92399#M593</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-08-18T20:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92400#M594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Rrick for troubling you, I really appreciate your continious efforts. I tried your first suggestion "scaling the integral". As I understood, I should substitute with ZED=0 and QQ=0 in the integrand. However, this substitution yields h(0)=0. Am I correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 20:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92400#M594</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-08-19T20:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: error in evaluating a double integral</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92401#M595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rick,I tried the following bounds for the inner integral [-10,10] . I got errors concerning matrix inverse and convergence. The log file is attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 20:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/error-in-evaluating-a-double-integral/m-p/92401#M595</guid>
      <dc:creator>Emara</dc:creator>
      <dc:date>2013-08-19T20:41:54Z</dc:date>
    </item>
  </channel>
</rss>

