<?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 for Groups within Dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-for-Groups-within-Dataset/m-p/226170#M54008</link>
    <description>&lt;P&gt;Here is how to do this with proc expand:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id qtr :yyq6. x;
format qtr yyq6.;
datalines;
1 2009Q1 1
1 2009Q3 2
2 2010Q1 3
2 2011Q1 4
2 2011Q2 5
;

proc expand data=have out=want to=qtr method=none;
by id;
id qtr;
run;

proc print data=want noobs; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 18 Sep 2015 02:05:07 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2015-09-18T02:05:07Z</dc:date>
    <item>
      <title>Proc Expand for Groups within Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-for-Groups-within-Dataset/m-p/226143#M54005</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm running a program to inset empty values for all variables except date values between two observations that have a gap in their date interval. For example, an observation that has 1999Q1 and the next one has 2000Q3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I want to do this across bygroups in my dataset--I have a set of quarterly observations for a given individual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll impute the date that goes missing after "expansion" later, but right now my main concern is getting the additional observations with the missing dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help and suggestions!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2015 21:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-for-Groups-within-Dataset/m-p/226143#M54005</guid>
      <dc:creator>tahaahsin</dc:creator>
      <dc:date>2015-09-17T21:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Expand for Groups within Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-for-Groups-within-Dataset/m-p/226169#M54007</link>
      <description>Could you please provide sample data and expected output</description>
      <pubDate>Fri, 18 Sep 2015 01:52:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-for-Groups-within-Dataset/m-p/226169#M54007</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-09-18T01:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Expand for Groups within Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-for-Groups-within-Dataset/m-p/226170#M54008</link>
      <description>&lt;P&gt;Here is how to do this with proc expand:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id qtr :yyq6. x;
format qtr yyq6.;
datalines;
1 2009Q1 1
1 2009Q3 2
2 2010Q1 3
2 2011Q1 4
2 2011Q2 5
;

proc expand data=have out=want to=qtr method=none;
by id;
id qtr;
run;

proc print data=want noobs; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2015 02:05:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Expand-for-Groups-within-Dataset/m-p/226170#M54008</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-09-18T02:05:07Z</dc:date>
    </item>
  </channel>
</rss>

