<?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: Generalize function module in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Generalize-function-module/m-p/191310#M1973</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you have SAS/IML 12.1 (SAS 9.3m2), use &lt;A href="http://blogs.sas.com/content/iml/2014/03/19/define-functions-with-optional-parameters-in-sasiml/"&gt;optional arguments and the ISSKIPPED function&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start vc(y,x,b0,b1,p1,p2,v, cluster=);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if isskipped(cluster) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return( vce(y,x,b0,b1,p1,p2,v) );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return( vcm(cluster,y,x,b0,b1,p1,p2,v) );&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Apr 2014 12:51:42 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2014-04-24T12:51:42Z</dc:date>
    <item>
      <title>Generalize function module</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Generalize-function-module/m-p/191309#M1972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two function modules VCE and VCM that differs only in the way M is computed and an additional argument CLUSTER. How can I create a single function module that can handle both computations of M?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raphael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start vce(y,x,b0,b1,p1,p2,v);&lt;/P&gt;&lt;P&gt;... statements here ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; v = (dg(eta,p2)#dg(xb,p1)#(w-mu)/v)##2;&lt;/P&gt;&lt;P&gt; D = diag(v);&lt;/P&gt;&lt;P&gt; M = t(X)*D*X;&lt;/P&gt;&lt;P&gt;return(M);&lt;/P&gt;&lt;P&gt;finish vce;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; start vcm(cluster,y,x,b0,b1,p1,p2,v);&lt;/P&gt;&lt;P&gt;... statements here ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; M = J(p,p,0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; v = (dg(eta,p2)#dg(xb,p1)#(w-mu)/v)##2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; uClx = unique(Cluster);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do j = 1 to ncol(uClx);&lt;/P&gt;&lt;P&gt;&amp;nbsp; dx = loc(Cluster = uClx&lt;J&gt;);&lt;/J&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; M = M + t(X[dx,])*v[dx]*t(v[dx])*X[dx,];&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;return(M);&lt;/P&gt;&lt;P&gt;finish vce;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 03:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Generalize-function-module/m-p/191309#M1972</guid>
      <dc:creator>R_Fraser</dc:creator>
      <dc:date>2014-04-24T03:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Generalize function module</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Generalize-function-module/m-p/191310#M1973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you have SAS/IML 12.1 (SAS 9.3m2), use &lt;A href="http://blogs.sas.com/content/iml/2014/03/19/define-functions-with-optional-parameters-in-sasiml/"&gt;optional arguments and the ISSKIPPED function&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start vc(y,x,b0,b1,p1,p2,v, cluster=);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if isskipped(cluster) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return( vce(y,x,b0,b1,p1,p2,v) );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return( vcm(cluster,y,x,b0,b1,p1,p2,v) );&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 12:51:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Generalize-function-module/m-p/191310#M1973</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-04-24T12:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Generalize function module</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Generalize-function-module/m-p/191311#M1974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 13:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Generalize-function-module/m-p/191311#M1974</guid>
      <dc:creator>R_Fraser</dc:creator>
      <dc:date>2014-04-24T13:23:04Z</dc:date>
    </item>
  </channel>
</rss>

