<?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: Writing function in IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565975#M4699</link>
    <description>&lt;P&gt;Show us the SAS log so we can see the errors (and the code too). Please copy the log and paste it into the window that appears when you click on the {i} icon.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2019 19:03:05 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-06-13T19:03:05Z</dc:date>
    <item>
      <title>Writing function in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565974#M4698</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after writing the below code, I am trying to write the code as a function in the next code but I receive errors what am I doing wronging?&lt;/P&gt;&lt;PRE&gt;proc iml;
mean_1 = 268.1; print mean_1; 
mean_2 = 384.4; print mean_2;
s_1=124.8; print s_1;
s_2=168; print s_2;
s_pooled = sqrt((s_1**2 + s_2**2)/2);
print(s_pooled);
md =mean_1 - mean_2;print md;

d=abs(md)/s_pooled;

print(d);
quit;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc iml;&lt;BR /&gt;start cohen.d (s_1, s_2, mean_1, mean_2);
s_pooled = sqrt((s_1**2 + s_2**2)/2);
md = mean_1 - mean_2;
return (abs(md)/s_pooled);
finish cohen.d;

print (cohen.d (124.8, 168.3, 268.1, 384.4))&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 18:59:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565974#M4698</guid>
      <dc:creator>Lawongd</dc:creator>
      <dc:date>2019-06-13T18:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Writing function in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565975#M4699</link>
      <description>&lt;P&gt;Show us the SAS log so we can see the errors (and the code too). Please copy the log and paste it into the window that appears when you click on the {i} icon.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565975#M4699</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-06-13T19:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Writing function in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565982#M4700</link>
      <description>&lt;P&gt;Module names cannot include a dot (.)&lt;/P&gt;
&lt;P&gt;They have the same rules as SAS variable names.&lt;/P&gt;
&lt;P&gt;Change the module name to cohen_d and all will be well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565982#M4700</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-06-13T19:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Writing function in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565991#M4701</link>
      <description>&lt;DIV class="sasSource"&gt;here is the log&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;PRE&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 start cohen.d (s_1, s_2, mean_1, mean_2);
_____
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

74 s_pooled = sqrt((s_1**2 + s_2**2)/2);
________
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

75 md = mean_1 - mean_2;
__
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

76 return (abs(md)/s_pooled);
______
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

77 finish cohen.d;
______
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

78
79 print (cohen.d (124.8, 168.3, 268.1, 384.4))
_____
180
ERROR 180-322: Statement is not valid or it is used out of proper order.

80 quit;

81
82 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Writing-function-in-IML/m-p/565991#M4701</guid>
      <dc:creator>Lawongd</dc:creator>
      <dc:date>2019-06-13T19:38:10Z</dc:date>
    </item>
  </channel>
</rss>

