<?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 expand returns values for empty observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-expand-returns-values-for-empty-observations/m-p/596146#M171607</link>
    <description>&lt;P&gt;I believe PROC EXPAND defaults to interpolation using METHOD=SPLINE, which I believe is&amp;nbsp;projecting the spline backwards accross the leading observations (and other observations)&amp;nbsp;with missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try METHOD=NONE&amp;nbsp; in either the PROC&amp;nbsp; EXPAND statement or the CONVERT statement.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2019 02:56:17 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2019-10-14T02:56:17Z</dc:date>
    <item>
      <title>Proc expand returns values for empty observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-expand-returns-values-for-empty-observations/m-p/596137#M171602</link>
      <description>&lt;P&gt;I am using PROC EXPAND to compute daily returns. Theoretically, If the variable is empty, the return should be empty (or at least 0). However, PROC EXPAND gives value for the return of empty observations. Why is it? and How to fix it?&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	proc expand data=data_in out=data_out(drop=time);
		by fund_ticker constituent_ticker;
		convert total_shares_held=etf_growth/ transformout=(ratio 1 -1);
	run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And here is the result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Proc_expand.JPG" style="width: 465px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/33115i2E05E42776441D38/image-size/large?v=v2&amp;amp;px=999" role="button" title="Proc_expand.JPG" alt="Proc_expand.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 01:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-expand-returns-values-for-empty-observations/m-p/596137#M171602</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2019-10-14T01:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc expand returns values for empty observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-expand-returns-values-for-empty-observations/m-p/596146#M171607</link>
      <description>&lt;P&gt;I believe PROC EXPAND defaults to interpolation using METHOD=SPLINE, which I believe is&amp;nbsp;projecting the spline backwards accross the leading observations (and other observations)&amp;nbsp;with missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try METHOD=NONE&amp;nbsp; in either the PROC&amp;nbsp; EXPAND statement or the CONVERT statement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 02:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-expand-returns-values-for-empty-observations/m-p/596146#M171607</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-10-14T02:56:17Z</dc:date>
    </item>
  </channel>
</rss>

