<?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 iml-&amp;gt;sas procedure-&amp;gt;iml in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/iml-gt-sas-procedure-gt-iml/m-p/28967#M134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;1) I am typing some iml inside SAS base; I wonder why there is the need for the module IMl/studio?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;2) From below, when I use iml to compute values,eg. n_by_na and &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; &lt;/SPAN&gt;n_by_nb, then continue with some SAS procedure. After that, I want to use iml again, the previous variables(eg. n_by_na and n_by_nb)are lost from memory. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;What is the standard way to do this? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;IML Newbie &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/*determine the n_a and n_b*/&lt;BR /&gt;proc iml;&lt;BR /&gt;reset log print;&lt;BR /&gt;N=938;&lt;BR /&gt;N_a=731;&lt;BR /&gt;N_b=207;&lt;BR /&gt;Ssqu_a=0.00009162;&lt;BR /&gt;Ssqu_b=0.08779198;&lt;BR /&gt;e=0.009;&lt;BR /&gt;z=1.75;&lt;/P&gt;&lt;P&gt;/*tempo1=N_a*Ssqu_a+N_b*Ssqu_b;&lt;BR /&gt;tempo2=(N_a*Ssqu_a);&lt;BR /&gt;tempo3=(N_a*Ssqu_b);*/&lt;/P&gt;&lt;P&gt;n_by_na= ( N_a* sqrt(Ssqu_a) +N_b*sqrt(Ssqu_b) )/( N_a*sqrt(Ssqu_a) );&lt;BR /&gt;n_by_nb= (N_a*sqrt(Ssqu_a)+N_b*sqrt(Ssqu_b))/(N_b*sqrt(Ssqu_b));&lt;BR /&gt;nsample=(z##2)/(e##2)*(&amp;nbsp; n_by_na*(N_a/N)##2*Ssqu_a + n_by_nb*(N_b/N)##2*Ssqu_b&amp;nbsp; );&lt;/P&gt;&lt;P&gt;nsample_a= ( N_a*sqrt(Ssqu_a) ) /( N_a* sqrt(Ssqu_a) +N_b*sqrt(Ssqu_b) )*nsample;&lt;BR /&gt;nsample_b= ( N_b*sqrt(Ssqu_b) ) /( N_a* sqrt(Ssqu_a) +N_b*sqrt(Ssqu_b) )*nsample;&lt;BR /&gt;/*end:determine the n_a and n_b*/&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DATA SAMPLE_SET_A;&lt;BR /&gt;SET imput_out_MCMC; &lt;BR /&gt;WHERE(RISKGRP_logit='a');&lt;BR /&gt;RUN;&lt;BR /&gt;DATA SAMPLE_SET_B;&lt;BR /&gt;SET imput_out_MCMC; &lt;BR /&gt;WHERE(RISKGRP_logit='b');&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;reset log print; &lt;/P&gt;&lt;P&gt;y_bar=(N_a/N) *0.0013578 + (N_b/N) *0.3169460;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;/*After that, I want to use iml again*/&lt;/SPAN&gt;&lt;BR /&gt;var_y_bar=(1-nsample_a/N_a)*(N_a/N)##2*(Ssqu_a)/nsample_a+ (1-nsample_b/N_b)*(N_b/N)##2*(Ssqu_b)/nsample_b;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jul 2011 20:09:26 GMT</pubDate>
    <dc:creator>telescopic</dc:creator>
    <dc:date>2011-07-11T20:09:26Z</dc:date>
    <item>
      <title>iml-&gt;sas procedure-&gt;iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/iml-gt-sas-procedure-gt-iml/m-p/28967#M134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;1) I am typing some iml inside SAS base; I wonder why there is the need for the module IMl/studio?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;2) From below, when I use iml to compute values,eg. n_by_na and &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; &lt;/SPAN&gt;n_by_nb, then continue with some SAS procedure. After that, I want to use iml again, the previous variables(eg. n_by_na and n_by_nb)are lost from memory. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;What is the standard way to do this? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;IML Newbie &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/*determine the n_a and n_b*/&lt;BR /&gt;proc iml;&lt;BR /&gt;reset log print;&lt;BR /&gt;N=938;&lt;BR /&gt;N_a=731;&lt;BR /&gt;N_b=207;&lt;BR /&gt;Ssqu_a=0.00009162;&lt;BR /&gt;Ssqu_b=0.08779198;&lt;BR /&gt;e=0.009;&lt;BR /&gt;z=1.75;&lt;/P&gt;&lt;P&gt;/*tempo1=N_a*Ssqu_a+N_b*Ssqu_b;&lt;BR /&gt;tempo2=(N_a*Ssqu_a);&lt;BR /&gt;tempo3=(N_a*Ssqu_b);*/&lt;/P&gt;&lt;P&gt;n_by_na= ( N_a* sqrt(Ssqu_a) +N_b*sqrt(Ssqu_b) )/( N_a*sqrt(Ssqu_a) );&lt;BR /&gt;n_by_nb= (N_a*sqrt(Ssqu_a)+N_b*sqrt(Ssqu_b))/(N_b*sqrt(Ssqu_b));&lt;BR /&gt;nsample=(z##2)/(e##2)*(&amp;nbsp; n_by_na*(N_a/N)##2*Ssqu_a + n_by_nb*(N_b/N)##2*Ssqu_b&amp;nbsp; );&lt;/P&gt;&lt;P&gt;nsample_a= ( N_a*sqrt(Ssqu_a) ) /( N_a* sqrt(Ssqu_a) +N_b*sqrt(Ssqu_b) )*nsample;&lt;BR /&gt;nsample_b= ( N_b*sqrt(Ssqu_b) ) /( N_a* sqrt(Ssqu_a) +N_b*sqrt(Ssqu_b) )*nsample;&lt;BR /&gt;/*end:determine the n_a and n_b*/&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DATA SAMPLE_SET_A;&lt;BR /&gt;SET imput_out_MCMC; &lt;BR /&gt;WHERE(RISKGRP_logit='a');&lt;BR /&gt;RUN;&lt;BR /&gt;DATA SAMPLE_SET_B;&lt;BR /&gt;SET imput_out_MCMC; &lt;BR /&gt;WHERE(RISKGRP_logit='b');&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;reset log print; &lt;/P&gt;&lt;P&gt;y_bar=(N_a/N) *0.0013578 + (N_b/N) *0.3169460;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;/*After that, I want to use iml again*/&lt;/SPAN&gt;&lt;BR /&gt;var_y_bar=(1-nsample_a/N_a)*(N_a/N)##2*(Ssqu_a)/nsample_a+ (1-nsample_b/N_b)*(N_b/N)##2*(Ssqu_b)/nsample_b;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2011 20:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/iml-gt-sas-procedure-gt-iml/m-p/28967#M134</guid>
      <dc:creator>telescopic</dc:creator>
      <dc:date>2011-07-11T20:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: iml-&gt;sas procedure-&gt;iml</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/iml-gt-sas-procedure-gt-iml/m-p/28968#M135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have SAS/IML 9.22 software or later (after Nov, 2010), you can use the SUBMIT/ENDSUBMIT statements to call SAS procedures and DATA steps from PROC IML without losing the state of your IML session:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;submit;
DATA SAMPLE_SET_A;
&amp;nbsp;&amp;nbsp; ...
DATA SAMPLE_SET_B;
&amp;nbsp;&amp;nbsp; ...
RUN;
endsubmit;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/imlug/63541/HTML/default/viewer.htm#procs_toc.htm"&gt;http://support.sas.com/documentation/cdl/en/imlug/63541/HTML/default/viewer.htm#procs_toc.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 13:40:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/iml-gt-sas-procedure-gt-iml/m-p/28968#M135</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2011-07-12T13:40:54Z</dc:date>
    </item>
  </channel>
</rss>

