<?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: Is there a way to find geometric mean in proc means in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769129#M243990</link>
    <description>&lt;P&gt;Use proc univariate instead.&lt;/P&gt;
&lt;PRE&gt;proc univariate data=sashelp.heart outtable=want noprint ;
var height weight;
run;&lt;/PRE&gt;
&lt;P&gt;Check WANT dataset.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Sep 2021 12:30:15 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-09-22T12:30:15Z</dc:date>
    <item>
      <title>Is there a way to find geometric mean in proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769022#M243954</link>
      <description>&lt;P&gt;i really can't understand why proc means don't have gmean option, i want to find all things one side, if anybody knows is there a way please answer, otherwise you can shut up for your smart ass comments.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 07:14:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769022#M243954</guid>
      <dc:creator>chinaski</dc:creator>
      <dc:date>2021-09-22T07:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to find geometric mean in proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769025#M243956</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;there is a way but why don't you simply use surveymeans??&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SURVEYMEANS data=sashelp.class geomean;
 var age;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if you still want to use proc means, proceed like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA class1;
 set sashelp.class;
 ln_age=log(age);
run;

PROC MEANS data=class1 mean stddev;
 var ln_age;
 output out=class2means mean=a_mean stddev=a_stddev;
run;

DATA class3;
 set class2means;
 geo_mean=exp(a_mean);
 geo_stddev=exp(a_stddev);
run;

PROC PRINT data=class3 noobs;
 var geo_mean geo_stddev;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 07:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769025#M243956</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2021-09-22T07:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to find geometric mean in proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769026#M243957</link>
      <description>&lt;P&gt;Hi Oligolas,&lt;BR /&gt;Thank you for your answer, &lt;STRONG&gt;&lt;U&gt;i simply can't understand why they did not put gmean option in proc means&lt;/U&gt;&lt;/STRONG&gt;.&lt;BR /&gt;i have a code like this:&lt;BR /&gt;&lt;STRONG&gt;proc means data=WORK.datasetv02 n mean median maxdec=2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;var product_price;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;class /*web_site*/ search_key product_name product_code month;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;output out = work.datasetv03 (drop=_type_ _freq_) n= Toplam_Fiyat_Sayısı mean = Ortalama median = Medyan ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;FORMAT ortalama 16.2 ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ways 4;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;So in here i do not only get results but a new table, now i have to do separate operations in separate tables.&lt;BR /&gt;Anyway i will use what you recommend but does proc surveymeans function just like proc means?&lt;BR /&gt;In proc means we can have output in any number of ways and thats perfect, but in proc surveymeans it doesn't work.&lt;BR /&gt;Thank you again.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 07:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769026#M243957</guid>
      <dc:creator>chinaski</dc:creator>
      <dc:date>2021-09-22T07:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to find geometric mean in proc means</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769129#M243990</link>
      <description>&lt;P&gt;Use proc univariate instead.&lt;/P&gt;
&lt;PRE&gt;proc univariate data=sashelp.heart outtable=want noprint ;
var height weight;
run;&lt;/PRE&gt;
&lt;P&gt;Check WANT dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 12:30:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-find-geometric-mean-in-proc-means/m-p/769129#M243990</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-22T12:30:15Z</dc:date>
    </item>
  </channel>
</rss>

