<?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: Need help in using proc score with proc reg in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95903#M4801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you examine the dataset that you want to score (projected_predictors), is the lagged variable correctly calculated?&amp;nbsp; PROC SCORE is acting like one of the variables needed to create the predicted value is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One work-around would be to append the dataset projected_predictors (assuming that the lagged variable is there and correctly calculated) to the dataset dep_var, making sure that the dependent variable dep_var in projected_predictors is set to missing (.).&amp;nbsp; The dataset model obtained from the output statement should then have predicted values for all records with missing values of the dependent variable if you modify it to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output out=model p=predicted stdp=stderr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Apr 2013 12:40:30 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2013-04-03T12:40:30Z</dc:date>
    <item>
      <title>Need help in using proc score with proc reg</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95900#M4798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple OLS model where dep_var is regressed against predictors that include variables like x and y and also a one period lagged value of dep_var depicted as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lagged_dep_var = lag(dep_var);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The model is then defined as:&lt;/P&gt;&lt;P&gt;proc reg data = dep_var outest =model_out;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model dep_var = lagged_dep_var x y;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out=model;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am now trying to using proc score to predict future values and doesn't work. I can make the proc score if I remove the lagged variable from the OLS regression (However, that is not an option).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;proc score data = projected_predictors score = model_out out = model_predictions type = parms &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;predict;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var dep_var lagged_dep_var x y;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to get thoughts here if there is a workaround.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 09:15:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95900#M4798</guid>
      <dc:creator>model_coder</dc:creator>
      <dc:date>2013-04-03T09:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in using proc score with proc reg</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95901#M4799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you get when you invoke PROC SCORE with that syntax?&amp;nbsp; Are there log messages, or does the output just not what is expected?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 11:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95901#M4799</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-03T11:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in using proc score with proc reg</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95902#M4800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The proc score shows missing values for the dependent variable. I verified that my code is correct by removing the lagged variable from regression and proc score produces correct values. I have also made the code work by exporting regression coefficients and performing the calculations in a data step. However, I wanted to see if there is a cleaner way to perform the calculations.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 12:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95902#M4800</guid>
      <dc:creator>model_coder</dc:creator>
      <dc:date>2013-04-03T12:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in using proc score with proc reg</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95903#M4801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you examine the dataset that you want to score (projected_predictors), is the lagged variable correctly calculated?&amp;nbsp; PROC SCORE is acting like one of the variables needed to create the predicted value is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One work-around would be to append the dataset projected_predictors (assuming that the lagged variable is there and correctly calculated) to the dataset dep_var, making sure that the dependent variable dep_var in projected_predictors is set to missing (.).&amp;nbsp; The dataset model obtained from the output statement should then have predicted values for all records with missing values of the dependent variable if you modify it to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output out=model p=predicted stdp=stderr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 12:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Need-help-in-using-proc-score-with-proc-reg/m-p/95903#M4801</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-03T12:40:30Z</dc:date>
    </item>
  </channel>
</rss>

