<?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: Proc means weight option - explain SAS Help example in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120202#M6308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1zmm, thanks for answering, but I have read the documentation that you refer to (a number of times) and it does not answer my question. That is why I am asking if someone can help me here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Feb 2013 14:33:46 GMT</pubDate>
    <dc:creator>iank131</dc:creator>
    <dc:date>2013-02-25T14:33:46Z</dc:date>
    <item>
      <title>Proc means weight option - explain SAS Help example</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120200#M6306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SAS 9.2 Help, there is an example entitled "Weighted Statistics Example" that uses the Proc Means Weight option. I am trying to understand how the variances in the example are calculated by doing it manually in EXCEL, but I cannot work out how SAS calculates it. Referring to the code below, I am able to calculate the variance that is in Example 1, but can someone please explain to me Example 2 and 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My exact questions are: &lt;/P&gt;&lt;P&gt;1. In example 2, how do you calculate Est_SigmaSq (i.e. var)? &lt;/P&gt;&lt;P&gt;2. If you were to transform the variable ObjectSize in Example 2, what would it be in order to get the variance Est_SigmaSq?&lt;/P&gt;&lt;P&gt;3. The same two questions apply for Example 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code as given in SAS Help and I also attach the Excel I am using to do my manual calculations if you need it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Ian.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data size;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input Distance ObjectSize @@;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Precision=1/distance;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;1.5 30 1.5 20 1.5 30 1.5 25&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; 43 3&amp;nbsp;&amp;nbsp; 33 3&amp;nbsp;&amp;nbsp; 25 3&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P&gt;4.5 25 4.5 36 4.5 48 4.5 33&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp; 43 6&amp;nbsp;&amp;nbsp; 36 6&amp;nbsp;&amp;nbsp; 23 6&amp;nbsp;&amp;nbsp; 48&lt;/P&gt;&lt;P&gt;7.5 30 7.5 25 7.5 50 7.5 38&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*EXAMPLE1;&lt;/P&gt;&lt;P&gt;proc means data=size maxdec=3 n mean var stddev;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var objectsize;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; title1 'Unweighted Analysis of the SIZE Data Set';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**EXAMPLE2;&lt;/P&gt;&lt;P&gt;proc means data=size maxdec=3 n mean var stddev;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; weight precision;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var objectsize;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output out=wtstats var=Est_SigmaSq std=Est_Sigma;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; title1 'Weighted Analysis Using Default VARDEF=DF';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**EXAMPLE3;&lt;/P&gt;&lt;P&gt;proc means data=size maxdec=3 n mean var std vardef=weight;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; weight precision;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; var objectsize;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; title1 'Weighted Analysis Using VARDEF=WEIGHT';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 13:10:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120200#M6306</guid>
      <dc:creator>iank131</dc:creator>
      <dc:date>2013-02-25T13:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc means weight option - explain SAS Help example</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120201#M6307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The documentation for the WEIGHT statement in PROC MEANS.describes how the sample variance is calculated from the individual variable values and their weights, the weighted mean, and the divisor[the default value of n-1 or of the sum of the weights when VARDEF=WEIGHT].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 13:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120201#M6307</guid>
      <dc:creator>1zmm</dc:creator>
      <dc:date>2013-02-25T13:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc means weight option - explain SAS Help example</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120202#M6308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1zmm, thanks for answering, but I have read the documentation that you refer to (a number of times) and it does not answer my question. That is why I am asking if someone can help me here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 14:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120202#M6308</guid>
      <dc:creator>iank131</dc:creator>
      <dc:date>2013-02-25T14:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc means weight option - explain SAS Help example</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120203#M6309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to mimic the calculation in Excel, take the weight and multiply it by the observation, precision*object_size&lt;/P&gt;&lt;P&gt;Then calculate STD and Variance as you would normally in excel using the weighted observations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 15:47:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120203#M6309</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-25T15:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc means weight option - explain SAS Help example</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120204#M6310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. Thanks. I have been able to reproduce the results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 10:39:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-means-weight-option-explain-SAS-Help-example/m-p/120204#M6310</guid>
      <dc:creator>iank131</dc:creator>
      <dc:date>2013-02-27T10:39:22Z</dc:date>
    </item>
  </channel>
</rss>

