<?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: Can you use a class statement to calculate statistics for two datasets all in one proc means? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600351#M16589</link>
    <description>&lt;P&gt;No. You only need to put all necessary data into one dataset to feed into proc means. How you created that dataset is of no interest to the procedure.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2019 12:15:23 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-10-30T12:15:23Z</dc:date>
    <item>
      <title>Can you use a class statement to calculate statistics for two datasets all in one proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/547443#M8380</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to solve the following question but I am lost as to how to do this. There are two datasets involved but they can be linked by patient id which is present in both datasets. However I am trying to calculate statistics of three variables as described in my code below: Any thoughts or queries. Sorry, I can't post the dataset but I'd appreciate some help.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*8
Using the SAS datasets demogdemo and visitdemo and PROC MEANS with the CLASS statement, &lt;BR /&gt;compute the mean, median, 25th percentile, 75th percentile, and the number of non-missing&lt;BR /&gt;values for the variables CD4, Weight, and Age for each value of civil status 
including missing.  Report the statistics to three decimal places.  In the same PROC MEANS,&lt;BR /&gt;create a summary dataset with the OUTPUT statement containing the median and mean of CD4, &lt;BR /&gt;Weight, and Age.  Using _TYPE_, print only the overall (i.e. all civil 
status categories combined) mean and median from this summary dataset. 
*/
title "Using a CLASS Statement with PROC MEANS";
proc means data=lb.visitdemo n mean median Q1 Q3 maxdec=3; *what about demogdemo?;
   class civilstatus;
   var CD4 Weight Age ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;T&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 21:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/547443#M8380</guid>
      <dc:creator>cheenaChuks</dc:creator>
      <dc:date>2019-03-30T21:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can you use a class statement to calculate statistics for two datasets all in one proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/547469#M8388</link>
      <description>&lt;P&gt;proc means accepts one dataset as input, so you will have to do the join first.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 05:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/547469#M8388</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-31T05:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can you use a class statement to calculate statistics for two datasets all in one proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600335#M16584</link>
      <description>&lt;P&gt;How would you join these datasets?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 11:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600335#M16584</guid>
      <dc:creator>Flexluthorella</dc:creator>
      <dc:date>2019-10-30T11:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can you use a class statement to calculate statistics for two datasets all in one proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600345#M16586</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/297482"&gt;@Flexluthorella&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How would you join these datasets?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;With SQL or with a data step merge.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 12:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600345#M16586</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-30T12:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can you use a class statement to calculate statistics for two datasets all in one proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600349#M16588</link>
      <description>&lt;P&gt;Does it matter if you use proc sql or merge if you want to use the proc means by class statement?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 12:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600349#M16588</guid>
      <dc:creator>Flexluthorella</dc:creator>
      <dc:date>2019-10-30T12:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can you use a class statement to calculate statistics for two datasets all in one proc means?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600351#M16589</link>
      <description>&lt;P&gt;No. You only need to put all necessary data into one dataset to feed into proc means. How you created that dataset is of no interest to the procedure.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 12:15:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-you-use-a-class-statement-to-calculate-statistics-for-two/m-p/600351#M16589</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-30T12:15:23Z</dc:date>
    </item>
  </channel>
</rss>

