<?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: Dealing with missing values in PROC EXPAND in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-missing-values-in-PROC-EXPAND/m-p/606084#M175958</link>
    <description>&lt;P&gt;That is the default behavior of PROC EXPAND. Read the Missing Values section of the &lt;A href="https://documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_expand_details19.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;PROC EXPAND: Transformation Operations&lt;/A&gt;&amp;nbsp;Documentation.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Nov 2019 12:01:00 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-11-21T12:01:00Z</dc:date>
    <item>
      <title>Dealing with missing values in PROC EXPAND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-missing-values-in-PROC-EXPAND/m-p/606082#M175956</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a dataset of daily observations. I am using thhe PROC EXPAND to compute rolling standard deviation over the past 252 days for each stock. For some stocks, there are missing values. How can I tell SAS not to use these missing values?&amp;nbsp; I have an option to set it to 0 (using TRANSFORMIN=(SETMISS 0)) but what if I don't want that?&amp;nbsp;For example, if there are 100 missing values over the past 252 days, I would like to use only 152 obs with values.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;PROC&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;EXPAND&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;daily_returns OUT&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;daily_returns2&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token procnames"&gt;CONVERT&lt;/SPAN&gt; return&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;std&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;/TRANSFORMIN=(SETMISS 0)&lt;/SPAN&gt; TRANSFORMOUT&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;MOVSTD &lt;SPAN class="token number"&gt;252&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token statement"&gt;by&lt;/SPAN&gt; stock&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token procnames"&gt;RUN&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 11:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-missing-values-in-PROC-EXPAND/m-p/606082#M175956</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2019-11-21T11:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with missing values in PROC EXPAND</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dealing-with-missing-values-in-PROC-EXPAND/m-p/606084#M175958</link>
      <description>&lt;P&gt;That is the default behavior of PROC EXPAND. Read the Missing Values section of the &lt;A href="https://documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_expand_details19.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;PROC EXPAND: Transformation Operations&lt;/A&gt;&amp;nbsp;Documentation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 12:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dealing-with-missing-values-in-PROC-EXPAND/m-p/606084#M175958</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-21T12:01:00Z</dc:date>
    </item>
  </channel>
</rss>

