<?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 How to estimate on a subsample and predict on full? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-estimate-on-a-subsample-and-predict-on-full/m-p/57842#M2693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question doesn't seem to match your title, so I'll answer the question, or try, I'm not 100% sure what you're after. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you're doing some sort of time series analysis and that looking into PROC EXPAND might be worthwhile. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;See the last tip/trick on this page &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.sas.com/offices/NA/canada/downloads/presentations/Vansug-Nov2011/1111Newsletter.pdf"&gt;http://www.sas.com/offices/NA/canada/downloads/presentations/Vansug-Nov2011/1111Newsletter.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Dec 2011 18:51:27 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2011-12-01T18:51:27Z</dc:date>
    <item>
      <title>How to estimate on a subsample and predict on full?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-estimate-on-a-subsample-and-predict-on-full/m-p/57841#M2692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have encountered a problem I hoped someone here would be able to help me out with. The setup is I want to estimate a simple OLS, proc reg, on observations prior to a specified data and then predict on all observations in my sample to calculate residuals. The estimation command is &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: navy;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: navy;"&gt;reg&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;data&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;=analy6_w2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;model&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; felt_200 = jan feb mar apr may jun jul aug sep okt nov dec /&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;noint &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; dto &amp;lt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;17897&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: navy;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;; &lt;/P&gt;&lt;P&gt;However,&amp;nbsp; 17897 is end of 2008 and I would to use to parameter estimate on the monthly dummies for prediction and calculations of residuals on my full sample (dto goes to 18840). Basically want I would like is to subtract the monthly average in jan 2008 from the monthly average in jan 2009, and jan 2010 and 2011 same with feb and so on.&lt;/P&gt;&lt;P&gt;At the moment I am doing by hand like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: navy;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; analy6_w3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;set&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; analy6_w2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; jan=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;134662&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; feb=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;130125&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; mar=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;156824&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; apr=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;139780&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; may=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;157908&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; jun=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;119785&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; jul=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;128617&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; aug=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;113352&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; sep=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;119487&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; okt=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;186362&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; nov=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;149815&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;IF&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; dec=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: blue;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt; res = felt_200 - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: teal;"&gt;290729&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="background-color: white; font-family: 'Courier New'; color: navy;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there must be an easier way. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 09:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-estimate-on-a-subsample-and-predict-on-full/m-p/57841#M2692</guid>
      <dc:creator>SantaCruz</dc:creator>
      <dc:date>2011-12-01T09:55:02Z</dc:date>
    </item>
    <item>
      <title>How to estimate on a subsample and predict on full?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-estimate-on-a-subsample-and-predict-on-full/m-p/57842#M2693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question doesn't seem to match your title, so I'll answer the question, or try, I'm not 100% sure what you're after. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you're doing some sort of time series analysis and that looking into PROC EXPAND might be worthwhile. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;See the last tip/trick on this page &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.sas.com/offices/NA/canada/downloads/presentations/Vansug-Nov2011/1111Newsletter.pdf"&gt;http://www.sas.com/offices/NA/canada/downloads/presentations/Vansug-Nov2011/1111Newsletter.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 18:51:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-estimate-on-a-subsample-and-predict-on-full/m-p/57842#M2693</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-12-01T18:51:27Z</dc:date>
    </item>
  </channel>
</rss>

