<?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: 1 standard deviation of from the mean, construct three portfolios. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/1-standard-deviation-of-from-the-mean-construct-three-portfolios/m-p/141246#M261529</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are okay with proc sql then you can try something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want as&lt;/P&gt;&lt;P&gt;select&amp;nbsp; pfoyr,min(index1) - std(index1) as profile1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg(index1) - std(index1) as profile2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg(index1) + std(index1) as profile3&lt;/P&gt;&lt;P&gt;from pfo.merged_A1&lt;/P&gt;&lt;P&gt;group by pfoyr;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Sep 2014 18:53:01 GMT</pubDate>
    <dc:creator>stat_sas</dc:creator>
    <dc:date>2014-09-11T18:53:01Z</dc:date>
    <item>
      <title>1 standard deviation of from the mean, construct three portfolios.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/1-standard-deviation-of-from-the-mean-construct-three-portfolios/m-p/141245#M261528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I want to create three pfos for each year. my variable using to cut the observation is index1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to use the mean and construct&lt;/P&gt;&lt;P&gt;pfo1: from the &lt;STRONG&gt;lowest numbe&lt;/STRONG&gt;r to &lt;STRONG&gt;mean - 1 std dev.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;pfo 2: &lt;STRONG&gt; mean - 1 std dev &lt;/STRONG&gt; to &lt;STRONG&gt;&amp;nbsp; mean - 1 std dev.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pfo 3: &lt;/STRONG&gt; mean + 1 std dev to highest number &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;i know how to obtain 1st and 99th percentile of the observations of each year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc univariate data=pfo.merged_A1 noprint; var index1; by pfoyr; &lt;/P&gt;&lt;P&gt;output out=mean pctlpts=1 99 pctlpre=p; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i feel like i have to use something in that sort....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thx,&lt;/P&gt;&lt;P&gt;aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 18:24:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/1-standard-deviation-of-from-the-mean-construct-three-portfolios/m-p/141245#M261528</guid>
      <dc:creator>aarony</dc:creator>
      <dc:date>2014-09-11T18:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: 1 standard deviation of from the mean, construct three portfolios.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/1-standard-deviation-of-from-the-mean-construct-three-portfolios/m-p/141246#M261529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are okay with proc sql then you can try something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want as&lt;/P&gt;&lt;P&gt;select&amp;nbsp; pfoyr,min(index1) - std(index1) as profile1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg(index1) - std(index1) as profile2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg(index1) + std(index1) as profile3&lt;/P&gt;&lt;P&gt;from pfo.merged_A1&lt;/P&gt;&lt;P&gt;group by pfoyr;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 18:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/1-standard-deviation-of-from-the-mean-construct-three-portfolios/m-p/141246#M261529</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-09-11T18:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: 1 standard deviation of from the mean, construct three portfolios.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/1-standard-deviation-of-from-the-mean-construct-three-portfolios/m-p/141247#M261530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understood what you mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data class;
 set sashelp.class;
run;
proc sort data=class;by sex;run;
proc summary data=class ;
by sex;
var weight;
output out=stat(drop=_:) mean=mean std=std;
run;
data want;
 merge class stat;
 by sex;
 select;
&amp;nbsp; when(weight(mean+std)) pfo=3;
&amp;nbsp; otherwise pfo=2;
end;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 13:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/1-standard-deviation-of-from-the-mean-construct-three-portfolios/m-p/141247#M261530</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-09-12T13:49:33Z</dc:date>
    </item>
  </channel>
</rss>

