<?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 to score a data set with linear mixed effect model in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456062#M3091</link>
    <description>&lt;P&gt;You can &lt;A href="https://blogs.sas.com/content/iml/2014/02/17/the-missing-value-trick-for-scoring-a-regression-model.html" target="_self"&gt;use the "missing value trick" to score additional data&lt;/A&gt;&amp;nbsp;in conjunction with the PREDICT statement that you are already using. Some caveats and examples are discussed &lt;A href="https://communities.sas.com/t5/General-SAS-Programming/proc-nlmixed-score-a-new-data-set/td-p/174132" target="_self"&gt;in another thread&lt;/A&gt;&amp;nbsp;and on the excellent &lt;A href="https://stats.idre.ucla.edu/sas/faq/how-can-i-use-the-predict-statement-with-nlmixed-to-get-predictions-based-on-fixed-and-random-effects/" target="_self"&gt;UCLA statistics site.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2018 20:13:08 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2018-04-20T20:13:08Z</dc:date>
    <item>
      <title>How to score a data set with linear mixed effect model</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456053#M3090</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read a paper about applying mixed effect model to predict a fractional response attribution with the range of [0,1]. Please see the code in below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%let level=obligor_id;
proc sort data=MyData;
 by &amp;amp;level;
run;

proc nlmixed data=MyData noad qpoints=80 tech=quanew maxiter=3000 maxfunc=3000
 qtol=0.0001;
 parms b0-b14=0.0001
 gamma1-gamma2=0.4;
 cov_mu=b0+b1*Var1+b2*Var2+…+b14*Var14;
 con_mu=cov_mu+gamma1*z;
 con_sigma=gamma2**2;
 model RR~normal(con_mu,con_sigma);
 random z~normal(0,1) subject=&amp;amp;level;
 predict con_mu out= mix_output_&amp;amp;level (keep=instrument_id RR pred);
run; &lt;/PRE&gt;&lt;P&gt;For my problem, I replaced the obligor_id with account_num, which is unique in my dataset. The result returned from this model was really good. The problem now is how to apply this model to score a out-of-time data set with the random effect?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward to any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Shelly&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 19:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456053#M3090</guid>
      <dc:creator>NaNaN</dc:creator>
      <dc:date>2018-04-20T19:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to score a data set with linear mixed effect model</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456062#M3091</link>
      <description>&lt;P&gt;You can &lt;A href="https://blogs.sas.com/content/iml/2014/02/17/the-missing-value-trick-for-scoring-a-regression-model.html" target="_self"&gt;use the "missing value trick" to score additional data&lt;/A&gt;&amp;nbsp;in conjunction with the PREDICT statement that you are already using. Some caveats and examples are discussed &lt;A href="https://communities.sas.com/t5/General-SAS-Programming/proc-nlmixed-score-a-new-data-set/td-p/174132" target="_self"&gt;in another thread&lt;/A&gt;&amp;nbsp;and on the excellent &lt;A href="https://stats.idre.ucla.edu/sas/faq/how-can-i-use-the-predict-statement-with-nlmixed-to-get-predictions-based-on-fixed-and-random-effects/" target="_self"&gt;UCLA statistics site.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 20:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456062#M3091</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-20T20:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to score a data set with linear mixed effect model</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456082#M3092</link>
      <description>Thanks for your suggestion! I’m not sure how this missing value trick can be applied if I want to implement this model in a system that can score in live.</description>
      <pubDate>Fri, 20 Apr 2018 20:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456082#M3092</guid>
      <dc:creator>NaNaN</dc:creator>
      <dc:date>2018-04-20T20:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to score a data set with linear mixed effect model</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456092#M3093</link>
      <description>&lt;P&gt;I don't think that&amp;nbsp;trick works for new data. You'll have to write the DATA step code to score the model from the parameter estimates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that I look at your model, isn't it linear? If so, you can switch to PROC MIXED and use the STORE statement to save the model and PROC PLM to evaluate the model on new data.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 21:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-to-score-a-data-set-with-linear-mixed-effect-model/m-p/456092#M3093</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-20T21:04:16Z</dc:date>
    </item>
  </channel>
</rss>

