<?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: How to get F value in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275800#M2841</link>
    <description>&lt;P&gt;I agree with Rick, the more clearly and carefully you state the problem, the more likely you are to get useful help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my code above,&amp;nbsp;both x (categorical) and y (numeric)&amp;nbsp;are column&amp;nbsp;vectors of the same length, and they do not need to be sorted by category.&amp;nbsp; It looks like you are trying to make a matrix x&amp;nbsp;with&amp;nbsp;3 columns which is wrong.&amp;nbsp;&amp;nbsp; So&amp;nbsp;I am&amp;nbsp;guessing that&amp;nbsp;if you go with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;use have;
read all var {useful} into y;
read all var {tem} into x;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then run my code, you should get the F-value that you want.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2016 20:13:58 GMT</pubDate>
    <dc:creator>IanWakeling</dc:creator>
    <dc:date>2016-06-07T20:13:58Z</dc:date>
    <item>
      <title>How to get F value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275266#M2823</link>
      <description>&lt;P&gt;I need to use reduction operator to get F value for a dataset, that contains one coninous variable (y) and one categoricacl variable (x), whith three levels. my continous dependent variable and categorical independent variable in my single factor anova model&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now I need to use sas iml to get sum of squares (SS), with this, I can calculate F value, MSmodel/MSerror.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anybody provide a sample code? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2016 21:12:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275266#M2823</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-05T21:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get F value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275271#M2824</link>
      <description>&lt;P&gt;Is there a particular reason to be using IML instead of SAS Procs?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2016 22:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275271#M2824</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-05T22:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get F value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275351#M2827</link>
      <description>&lt;P&gt;Here is one possible way using the DESIGN function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  y = y - y[:];
  d = design(x);
  n = nrow(y);
  m = ncol(d);
  r = ssq(y - d * ((d / d[+,])` * y) );
  F = (( y[##] - r)/(m - 1)) / (r/(n - m));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jun 2016 11:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275351#M2827</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2016-06-06T11:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get F value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275428#M2828</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 15:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275428#M2828</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-06T15:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get F value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275740#M2839</link>
      <description>&lt;P&gt;is x independent variable, y dependent variable?&amp;nbsp; My y variable is charcter variable, should I change it to "1,2,3" as it has three groups so that the code can be used? Or is there an alternative way to run it? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;736 proc iml;&lt;/P&gt;&lt;P&gt;NOTE: IML Ready&lt;/P&gt;&lt;P&gt;737 reset print;&lt;/P&gt;&lt;P&gt;738 use have;&lt;/P&gt;&lt;P&gt;739 read all var {useful} into z;&lt;/P&gt;&lt;P&gt;WARNING: No output destinations active.&lt;/P&gt;&lt;P&gt;740 read all var {useful} into x1 where(tem="low");&lt;/P&gt;&lt;P&gt;741 read all var {useful} into x2 where(tem="mid");&lt;/P&gt;&lt;P&gt;742 read all var {useful} into x3 where(tem="war");&lt;/P&gt;&lt;P&gt;743 read all var {tem} into y;&lt;/P&gt;&lt;P&gt;744 print y;&lt;/P&gt;&lt;P&gt;745&lt;/P&gt;&lt;P&gt;746 x=x1||x2||x3;&lt;/P&gt;&lt;P&gt;statement : ASSIGN at line 769 column 3&lt;/P&gt;&lt;P&gt;770 F = (( y[##] - r)/(m - 1)) / (r/(n - m));&lt;/P&gt;&lt;P&gt;ERROR: Character operation not implemented yet.&lt;/P&gt;&lt;P&gt;ERROR: (execution) Unknown or error operation executed.&lt;/P&gt;&lt;P&gt;operation : [ at line 770 column 11&lt;/P&gt;&lt;P&gt;operands : y, $SUB0008&lt;/P&gt;&lt;P&gt;y 33 rows 1 col (character, size 3)&lt;/P&gt;&lt;P&gt;statement : ASSIGN at line 770 column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 16:44:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275740#M2839</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-07T16:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get F value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275747#M2840</link>
      <description>&lt;P&gt;In your original message you stated that the data "&lt;SPAN&gt;contains one continous variable (y) and one categoricacl variable (x) with three levels." &amp;nbsp;Now you are saying that y is character with three levels. Which is it?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the code that Ian provided, the X variable can be numeric or character because the DESIGN function always returns a numerical matrix. However, the Y variable must be numerical to make sense of the centering operation (y - y[:]), sum of squares (y[##]), and the other arithmtic operations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are very happy to provide you with assistance, but please state the conditions of your problem clearly and accurately, including the nature of the data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 17:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275747#M2840</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-06-07T17:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get F value</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275800#M2841</link>
      <description>&lt;P&gt;I agree with Rick, the more clearly and carefully you state the problem, the more likely you are to get useful help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my code above,&amp;nbsp;both x (categorical) and y (numeric)&amp;nbsp;are column&amp;nbsp;vectors of the same length, and they do not need to be sorted by category.&amp;nbsp; It looks like you are trying to make a matrix x&amp;nbsp;with&amp;nbsp;3 columns which is wrong.&amp;nbsp;&amp;nbsp; So&amp;nbsp;I am&amp;nbsp;guessing that&amp;nbsp;if you go with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;use have;
read all var {useful} into y;
read all var {tem} into x;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then run my code, you should get the F-value that you want.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 20:13:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-get-F-value/m-p/275800#M2841</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2016-06-07T20:13:58Z</dc:date>
    </item>
  </channel>
</rss>

