<?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: How do I generated confidence Intervals for 2-year Lagged Predicted Values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350277#M273637</link>
    <description>&lt;P&gt;Sorry I am new here, I'll continue posting on that thread. Thanks!&lt;/P&gt;</description>
    <pubDate>Sat, 15 Apr 2017 15:43:10 GMT</pubDate>
    <dc:creator>ImSame</dc:creator>
    <dc:date>2017-04-15T15:43:10Z</dc:date>
    <item>
      <title>How do I generated confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350263#M273635</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My dataset is in the following format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Year Exposure Outcome&lt;/P&gt;&lt;P&gt;2001 10 35&lt;/P&gt;&lt;P&gt;2002 23 45&lt;/P&gt;&lt;P&gt;2003 12 78&lt;/P&gt;&lt;P&gt;2004 17 70&lt;/P&gt;&lt;P&gt;2005 27 80&lt;/P&gt;&lt;P&gt;2006 59 100&lt;/P&gt;&lt;P&gt;2007 39 190&lt;/P&gt;&lt;P&gt;2008 20 391&lt;/P&gt;&lt;P&gt;2009 60 192&lt;/P&gt;&lt;P&gt;2010 10 53&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both Exposure and Outcome are continuous variables. I have constructed a simple linear regression model with Exposure as the independent variable and Outcome as the dependent variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the results of the linear regression, I have manually generated predicted values of the Outcome for given exposure values with 2-year lag period (e.g. prediction for 2003 based on 2001 exposure). How can I automate this process in SAS because I need the corresponding 95% confidence intervals for the predicted values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 15:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350263#M273635</guid>
      <dc:creator>ImSame</dc:creator>
      <dc:date>2017-04-15T15:08:07Z</dc:date>
    </item>
    <item>
      <title>How do I: Generate confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350264#M273639</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My dataset is in the following format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Year Exposure Outcome&lt;/P&gt;&lt;P&gt;2001 10 35&lt;/P&gt;&lt;P&gt;2002 23 45&lt;/P&gt;&lt;P&gt;2003 12 78&lt;/P&gt;&lt;P&gt;2004 17 70&lt;/P&gt;&lt;P&gt;2005 27 80&lt;/P&gt;&lt;P&gt;2006 59 100&lt;/P&gt;&lt;P&gt;2007 39 190&lt;/P&gt;&lt;P&gt;2008 20 391&lt;/P&gt;&lt;P&gt;2009 60 192&lt;/P&gt;&lt;P&gt;2010 10 53&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both Exposure and Outcome are continuous variables. I have constructed a simple linear regression model with Exposure as the independent variable and Outcome as the dependent variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the results of the linear regression, I have manually generated predicted values of the Outcome for given exposure values with 2-year lag period (e.g. prediction for 2003 based on 2001 exposure). How can I automate this process in SAS because I need the corresponding 95% confidence intervals for the predicted values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 15:17:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350264#M273639</guid>
      <dc:creator>ImSame</dc:creator>
      <dc:date>2017-04-15T15:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I: Generate confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350269#M273640</link>
      <description>&lt;P&gt;The simple linear regression can be done like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; have&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;input&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Year&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;Ex&lt;/SPAN&gt;posure Outcome&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token datalines"&gt;&lt;SPAN class="token keyword"&gt;datalines&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token data string"&gt;
2001 10 35
2002 23 45
2003 12 78
2004 17 70
2005 27 80
2006 59 100
2007 39 190
2008 20 391
2009 60 192
2010 10 53
&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;

&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;reg&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; have&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;model&lt;/SPAN&gt; Outcome &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;Ex&lt;/SPAN&gt;posure &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; cli clm&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&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;&lt;/PRE&gt;
&lt;P&gt;Though I am not sure what you are askeing regardring lagging values? Do you want to lag values of outcome before of after the regression analysis?&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 15:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350269#M273640</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-15T15:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I generated confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350271#M273636</link>
      <description>&lt;P&gt;Please do not cross post, most of the users in here are on multiple communities, so stick to the statistical procedures community for this one &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 15:40:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350271#M273636</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-15T15:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I: Generate confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350276#M273641</link>
      <description>&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The abovementioned code gives a regression equation as follows,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outcome = Constant + Beta*Exposure&lt;/P&gt;&lt;P&gt;Outcome = 83.23453 + 1.45002*Exposure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I want to predict Outcome for 2005, then it would be 122.4 (83.23453 + 1.45002*(27)). However, if I lag the exposure by 2-year period, then it would be 100.6 (83.23453+ 1.45002*(12)). SAS does the former automatically, but I need to automate the latter because I need the corresponding confidence intervals for the predicted values based on 2-year exposure lag. I hope this clarified the question.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 15:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350276#M273641</guid>
      <dc:creator>ImSame</dc:creator>
      <dc:date>2017-04-15T15:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I generated confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350277#M273637</link>
      <description>&lt;P&gt;Sorry I am new here, I'll continue posting on that thread. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 15:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350277#M273637</guid>
      <dc:creator>ImSame</dc:creator>
      <dc:date>2017-04-15T15:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I generated confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350278#M273638</link>
      <description>&lt;P&gt;No Problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 15:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350278#M273638</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-15T15:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I: Generate confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350296#M273642</link>
      <description>&lt;P&gt;What you're asking for is called scoring a dataset. There are multiple options to do so which are illustrated here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will need to lag the data yourself though because you're using a REG model, if you were using a Time Series Proc it may be more automated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 17:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350296#M273642</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-15T17:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I: Generate confidence Intervals for 2-year Lagged Predicted Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350297#M273643</link>
      <description>&lt;P&gt;FYI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/117992"&gt;@ImSame&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;I've merged the two threads into one.&lt;/P&gt;
&lt;P&gt;EDIT: three threads...&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 22:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-generated-confidence-Intervals-for-2-year-Lagged/m-p/350297#M273643</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-15T22:47:51Z</dc:date>
    </item>
  </channel>
</rss>

