<?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 Proc tabulate enquiry in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-tabulate-enquiry/m-p/711492#M26932</link>
    <description>&lt;P&gt;Hi, I would like to seek some advice regarding proc tabulate. Using the heart dataset as an example, say that for whatever reason, I am interested in finding out the value of 2*mean of systolic of each group (systolic is a continuous variable) after classifying each row in the dataset according to 2 categorical columns (sex and weight_status). The codes below are wrong, but is there an elegant way to do such tabulation using proc tabulate? Or generally, is there a way to customise more complex computations using systolic, apart from computing its mean, median, min, max, etc. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=sashelp.heart;
	class sex weight_status;
	var systolic;
	table sex, weight_status*systolic*(mean*2);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jan 2021 16:14:38 GMT</pubDate>
    <dc:creator>jlin4</dc:creator>
    <dc:date>2021-01-14T16:14:38Z</dc:date>
    <item>
      <title>Proc tabulate enquiry</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-tabulate-enquiry/m-p/711492#M26932</link>
      <description>&lt;P&gt;Hi, I would like to seek some advice regarding proc tabulate. Using the heart dataset as an example, say that for whatever reason, I am interested in finding out the value of 2*mean of systolic of each group (systolic is a continuous variable) after classifying each row in the dataset according to 2 categorical columns (sex and weight_status). The codes below are wrong, but is there an elegant way to do such tabulation using proc tabulate? Or generally, is there a way to customise more complex computations using systolic, apart from computing its mean, median, min, max, etc. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=sashelp.heart;
	class sex weight_status;
	var systolic;
	table sex, weight_status*systolic*(mean*2);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 16:14:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-tabulate-enquiry/m-p/711492#M26932</guid>
      <dc:creator>jlin4</dc:creator>
      <dc:date>2021-01-14T16:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate enquiry</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-tabulate-enquiry/m-p/711538#M26945</link>
      <description>&lt;P&gt;The asterisk symbol used in the TABLES statement does not denote multiplication.&amp;nbsp; That's probably one of the more difficult hurdles one has to leap when learning this.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
proc tabulate data=sashelp.heart 
              out =have(drop=_:);
	class sex weight_status;
	var systolic;
	table sex, weight_status*systolic*(mean) /;
run;
ods select all;

data want;
 set have;
 double_Systolic_Mean=2*Systolic_Mean;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jan 2021 19:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-tabulate-enquiry/m-p/711538#M26945</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-01-14T19:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate enquiry</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-tabulate-enquiry/m-p/711573#M26949</link>
      <description>&lt;P&gt;For this type of problem the approach would be:&lt;/P&gt;
&lt;P&gt;1) summarize the data by the desired groups to get the mean for the groups (Proc summary is easy)&lt;/P&gt;
&lt;P&gt;2) use a data step to multiply that mean by 2 for each group&lt;/P&gt;
&lt;P&gt;3) Print or Proc Report to display the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Tabulate does not let you calculations internally with the resulting statistics or cross statistics.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 22:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-tabulate-enquiry/m-p/711573#M26949</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-14T22:08:25Z</dc:date>
    </item>
  </channel>
</rss>

