<?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: How to calculate standard deviation for all the values in a column? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514669#M2783</link>
    <description>&lt;P&gt;Then you could start with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select *, std(diff) as sd_a
from have;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And you could use the same step to do some more calculations with diff and sd_a.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Nov 2018 05:29:21 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-11-20T05:29:21Z</dc:date>
    <item>
      <title>How to calculate standard deviation for all the values in a column?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514666#M2780</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose I have a column called 'Diff' in a dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Diff&lt;/U&gt;&lt;/P&gt;&lt;P&gt;23.56&lt;/P&gt;&lt;P&gt;45.77&lt;/P&gt;&lt;P&gt;23.67&lt;/P&gt;&lt;P&gt;67.86&lt;/P&gt;&lt;P&gt;24.97&lt;/P&gt;&lt;P&gt;86.45&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the standard deviation (a single value= 26.66928) of Diff (it's not a rolling standard deviation).&lt;/P&gt;&lt;P&gt;My variable for standard deviation is SD_A. What should be the code to get a single value of SD_A which I will need for further calculation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 04:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514666#M2780</guid>
      <dc:creator>d6k5d3</dc:creator>
      <dc:date>2018-11-20T04:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard deviation for all the values in a column?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514667#M2781</link>
      <description>&lt;P&gt;There are countless ways. Here is one, assuming &lt;EM&gt;Diff&lt;/EM&gt; is a&amp;nbsp;variable in dataset&amp;nbsp;&lt;EM&gt;have&lt;/EM&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have;
output out=want std(diff)=sd_a;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The std will be in dataset &lt;EM&gt;want&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 05:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514667#M2781</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-11-20T05:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard deviation for all the values in a column?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514668#M2782</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;, Thank you so much. However, I need to work with 'Have' dataset, and use SD_A. If the SD_A in a different dataset, how can I make use of it in 'Have'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your time. Much thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 05:23:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514668#M2782</guid>
      <dc:creator>d6k5d3</dc:creator>
      <dc:date>2018-11-20T05:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard deviation for all the values in a column?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514669#M2783</link>
      <description>&lt;P&gt;Then you could start with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select *, std(diff) as sd_a
from have;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And you could use the same step to do some more calculations with diff and sd_a.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 05:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-standard-deviation-for-all-the-values-in-a/m-p/514669#M2783</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-11-20T05:29:21Z</dc:date>
    </item>
  </channel>
</rss>

