<?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 How to calculate mean of a variable excluding the observation itself in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-mean-of-a-variable-excluding-the-observation/m-p/165912#M31984</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I'm try to compute the mean of a variable (A) for &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;its joint industry (X), performance (Y) decile, where the mean excludes the obs itself. I already created deciles for variable Y within each industry X,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;but can't figure out how to calculate the mean of each decile excluding the obs. Any suggestions are much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Aug 2014 18:53:18 GMT</pubDate>
    <dc:creator>amanda_cz</dc:creator>
    <dc:date>2014-08-18T18:53:18Z</dc:date>
    <item>
      <title>How to calculate mean of a variable excluding the observation itself</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-mean-of-a-variable-excluding-the-observation/m-p/165912#M31984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I'm try to compute the mean of a variable (A) for &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;its joint industry (X), performance (Y) decile, where the mean excludes the obs itself. I already created deciles for variable Y within each industry X,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;but can't figure out how to calculate the mean of each decile excluding the obs. Any suggestions are much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 18:53:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-mean-of-a-variable-excluding-the-observation/m-p/165912#M31984</guid>
      <dc:creator>amanda_cz</dc:creator>
      <dc:date>2014-08-18T18:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate mean of a variable excluding the observation itself</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-mean-of-a-variable-excluding-the-observation/m-p/165913#M31985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amanda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assuming that you already know how to compute the mean for each X/Y group, how to save the results as a SAS data set, and how to merge that back into the original data.&amp;nbsp; (If not, you will have some studying ahead of you.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Getting the mean excluding the current observation is not very different.&amp;nbsp; Instead of computing the mean, compute the SUM and N statistics for each X/Y group.&amp;nbsp; Save the results as a SAS data set.&amp;nbsp; Merge it back onto the original data.&amp;nbsp; Using the same step that merges SUM and N back onto the data, add a few statements to calculate the mean.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEAN = (SUM - A) / (N - 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The programming may be easy or difficult, depending on which parts you already know how to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 19:17:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-mean-of-a-variable-excluding-the-observation/m-p/165913#M31985</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-08-18T19:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate mean of a variable excluding the observation itself</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-mean-of-a-variable-excluding-the-observation/m-p/165914#M31986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It works like a charm!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 19:47:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-mean-of-a-variable-excluding-the-observation/m-p/165914#M31986</guid>
      <dc:creator>amanda_cz</dc:creator>
      <dc:date>2014-08-18T19:47:14Z</dc:date>
    </item>
  </channel>
</rss>

