<?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 divide two variables (with replications) and compare the means? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400516#M278651</link>
    <description>Please post the expected output and post the data you have as data-step.&lt;BR /&gt;&lt;BR /&gt;Proc summary can create mean-values for each group.</description>
    <pubDate>Tue, 03 Oct 2017 05:05:33 GMT</pubDate>
    <dc:creator>error_prone</dc:creator>
    <dc:date>2017-10-03T05:05:33Z</dc:date>
    <item>
      <title>How to divide two variables and compare the mean of different groups?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400468#M278650</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following is the data that I want to analyze. The variables are Group, A and B. Basically, I want to find the mean of A and B in each group, divide A_mean by B_mean (= y), and compare the value of y between the groups (by Tukey for example). A and B are measured three times in all groups, except for B in Group 2. A and B are also independent. How should I write my SAS code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;6.57&lt;/TD&gt;&lt;TD&gt;3.14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;6.77&lt;/TD&gt;&lt;TD&gt;3.09&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&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;/TD&gt;&lt;TD&gt;6.77&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;13.10&lt;/TD&gt;&lt;TD&gt;6.86&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;13.87&lt;/TD&gt;&lt;TD&gt;6.99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;17.29&lt;/TD&gt;&lt;TD&gt;8.81&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;16.83&lt;/TD&gt;&lt;TD&gt;8.92&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;17.26&lt;/TD&gt;&lt;TD&gt;8.83&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 13:50:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400468#M278650</guid>
      <dc:creator>hjong</dc:creator>
      <dc:date>2017-10-04T13:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide two variables (with replications) and compare the means?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400516#M278651</link>
      <description>Please post the expected output and post the data you have as data-step.&lt;BR /&gt;&lt;BR /&gt;Proc summary can create mean-values for each group.</description>
      <pubDate>Tue, 03 Oct 2017 05:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400516#M278651</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-10-03T05:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide two variables (with replications) and compare the means?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400575#M278652</link>
      <description>&lt;P&gt;Here's my SAS code. The problem with this code is that after dividing A_Mean by B_Mean, a single value of y for each group is obtained. As a result, I am not able to compare and test the significance of the the y's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data data;
input Group A B;
datalines;
1	6.57	3.14
1	6.77	3.09
1	6.71	3.14
2	20.27	9.37
2	20.27	10.20
2	21.82	10.14
2	.		10.44
2	.		9.83
2	.		9.69
2	.		9.37
3	21.35	10.71
3	21.34	10.74
3	21.63	10.79
4	13.40	6.77
4	13.10	6.86
4	13.87	6.99
5	17.29	8.81
5	16.83	8.92
5	17.26	8.83
;
proc print;
run;

proc means;
class Group;
var A B;
output out=out mean= / autoname;
run;

proc print data=out;
run;

data new;
set out;
y=divide(A_Mean, B_Mean);
run;
proc print;
run;

proc glm data=new;
class Group;
model y=Group;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 13:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400575#M278652</guid>
      <dc:creator>hjong</dc:creator>
      <dc:date>2017-10-04T13:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide two variables (with replications) and compare the means?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400731#M278653</link>
      <description>&lt;P&gt;Never used proc glm, but maybe removing the class statement solves the problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 18:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400731#M278653</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-10-03T18:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to divide two variables (with replications) and compare the means?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400743#M278654</link>
      <description>&lt;P&gt;No, it did not help.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 19:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-divide-two-variables-and-compare-the-mean-of-different/m-p/400743#M278654</guid>
      <dc:creator>hjong</dc:creator>
      <dc:date>2017-10-03T19:14:49Z</dc:date>
    </item>
  </channel>
</rss>

