<?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: TTest with boxplot based on weighted means in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/TTest-with-boxplot-based-on-weighted-means/m-p/305858#M10745</link>
    <description>&lt;P&gt;I think you get weighted estimates for all statistics with proc sgplot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods graphics on;
proc sgplot data=have;
hbox days / category=year weight=cases;
run;
ods graphics off;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Oct 2016 04:07:51 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-10-20T04:07:51Z</dc:date>
    <item>
      <title>TTest with boxplot based on weighted means</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/TTest-with-boxplot-based-on-weighted-means/m-p/305778#M10744</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've a dataset at school level, and&amp;nbsp;I wanted to run a T test of DAYs by year, weight by cases in each school. The data, SAS code for TTest (with ODS) is as below. The output is fine except the mean statistics is based on weighted mean but the boxplot&amp;nbsp;is based on unweighted mean.&amp;nbsp;Is there a way to fix it?&lt;/P&gt;
&lt;P&gt;- I assume it can't do boxplot for weighted data because it CAN"T come&amp;nbsp;up with weighted median, Q1 and Q3? Is it possible for me to plot a boxplot from a data table with those summary statistics? (using unweighted median, Q1 and Q3 and weighted mean).&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;I don't actually need boxplot, Just some simple plots showing WEIGHTED mean and confidence interval. Can I produce in the same Ttest procedure? Or other procedures that would do weighted mean plots?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have; &lt;BR /&gt;input SID 1-4 year cases days;&lt;BR /&gt;datalines;&lt;BR /&gt;6060 2011 7 1.14286&lt;BR /&gt;6190 2011 1 3&lt;BR /&gt;6320 2011 3 1&lt;BR /&gt;6400 2011 3 1.66667&lt;BR /&gt;6740 2011 3 1&lt;BR /&gt;6930 2011 5 1.6&lt;BR /&gt;7010 2011 3 1.33333&lt;BR /&gt;7070 2011 10 1.5&lt;BR /&gt;7180 2011 10 1.1&lt;BR /&gt;7360 2011 43 1&lt;BR /&gt;7530 2011 9 1&lt;BR /&gt;7770 2011 7 1.28571&lt;BR /&gt;8140 2011 3 1&lt;BR /&gt;8370 2011 15 1.13333&lt;BR /&gt;8520 2011 30 1.73333&lt;BR /&gt;8580 2011 1 1&lt;BR /&gt;8980 2011 14 1.14286&lt;BR /&gt;9050 2011 80 1.05&lt;BR /&gt;9270 2011 15 1.13333&lt;BR /&gt;9330 2011 2 1&lt;BR /&gt;9350 2011 1 2&lt;BR /&gt;9360 2011 22 1.36364&lt;BR /&gt;9410 2011 13 1.53846&lt;BR /&gt;9420 2011 12 1.33333&lt;BR /&gt;9470 2011 8 1&lt;BR /&gt;9500 2011 54 1.14815&lt;BR /&gt;9510 2011 5 1&lt;BR /&gt;9520 2011 4 1.5&lt;BR /&gt;9530 2011 104 1.05769&lt;BR /&gt;9540 2011 14 1&lt;BR /&gt;9550 2011 8 1.125&lt;BR /&gt;9570 2011 1 1&lt;BR /&gt;9580 2011 10 2.3&lt;BR /&gt;9590 2011 23 1.13043&lt;BR /&gt;9600 2011 132 1.05303&lt;BR /&gt;9620 2011 16 1.125&lt;BR /&gt;9650 2011 1 1&lt;BR /&gt;9660 2011 55 1&lt;BR /&gt;9700 2011 2 2.5&lt;BR /&gt;9740 2011 4 1.25&lt;BR /&gt;9750 2011 51 1.01961&lt;BR /&gt;6060 2015 2 1&lt;BR /&gt;6320 2015 6 1.66667&lt;BR /&gt;6650 2015 3 1&lt;BR /&gt;6740 2015 3 1&lt;BR /&gt;6930 2015 2 1&lt;BR /&gt;7010 2015 7 2.14286&lt;BR /&gt;7070 2015 5 1&lt;BR /&gt;7180 2015 8 1&lt;BR /&gt;7360 2015 15 1.33333&lt;BR /&gt;7450 2015 1 1&lt;BR /&gt;7510 2015 11 1&lt;BR /&gt;7530 2015 10 1&lt;BR /&gt;7770 2015 2 1&lt;BR /&gt;8140 2015 15 1.46667&lt;BR /&gt;8370 2015 19 1.05263&lt;BR /&gt;8520 2015 17 1.70588&lt;BR /&gt;8580 2015 1 1&lt;BR /&gt;8980 2015 8 1&lt;BR /&gt;9050 2015 13 1&lt;BR /&gt;9160 2015 4 1&lt;BR /&gt;9280 2015 1 1&lt;BR /&gt;9300 2015 3 2&lt;BR /&gt;9330 2015 1 1&lt;BR /&gt;9350 2015 2 1&lt;BR /&gt;9360 2015 20 1.35&lt;BR /&gt;9410 2015 5 1&lt;BR /&gt;9420 2015 10 1&lt;BR /&gt;9470 2015 3 1&lt;BR /&gt;9500 2015 28 1.03571&lt;BR /&gt;9510 2015 5 1&lt;BR /&gt;9520 2015 10 1.5&lt;BR /&gt;9530 2015 107 1.1215&lt;BR /&gt;9540 2015 1 1&lt;BR /&gt;9550 2015 10 1.2&lt;BR /&gt;9580 2015 1 3&lt;BR /&gt;9590 2015 6 1&lt;BR /&gt;9600 2015 3 1.66667&lt;BR /&gt;9620 2015 26 1.11538&lt;BR /&gt;9650 2015 1 2&lt;BR /&gt;9660 2015 59 1.0339&lt;BR /&gt;9750 2015 5 1.6&lt;BR /&gt;9950 2015 1 1&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;ods graphics on;&lt;BR /&gt;proc ttest data=have test=diff plots=summary;&lt;BR /&gt; class year;&lt;BR /&gt; weight Cases;&lt;BR /&gt; var days;&lt;BR /&gt; ods output equality=VarEqualityTestHSFR TTests=TTestHSFR Statistics=StatsHSFR;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 20:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/TTest-with-boxplot-based-on-weighted-means/m-p/305778#M10744</guid>
      <dc:creator>Solph</dc:creator>
      <dc:date>2016-10-19T20:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: TTest with boxplot based on weighted means</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/TTest-with-boxplot-based-on-weighted-means/m-p/305858#M10745</link>
      <description>&lt;P&gt;I think you get weighted estimates for all statistics with proc sgplot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods graphics on;
proc sgplot data=have;
hbox days / category=year weight=cases;
run;
ods graphics off;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2016 04:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/TTest-with-boxplot-based-on-weighted-means/m-p/305858#M10745</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-10-20T04:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: TTest with boxplot based on weighted means</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/TTest-with-boxplot-based-on-weighted-means/m-p/306202#M10755</link>
      <description>&lt;P&gt;Thank so much. It worked perfectly. (The only "complaint" is it seems SGplot does not give statistics. But I can get around getting it elsewhere).&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2016 07:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/TTest-with-boxplot-based-on-weighted-means/m-p/306202#M10755</guid>
      <dc:creator>Solph</dc:creator>
      <dc:date>2016-10-21T07:58:58Z</dc:date>
    </item>
  </channel>
</rss>

