<?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: Use regression parameters to predict values in another dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337790#M17817</link>
    <description>&lt;P&gt;Nevermind, I had to add out=testout predicted/ilink;&lt;/P&gt;
&lt;P&gt;Now it works. Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2017 12:05:10 GMT</pubDate>
    <dc:creator>Demographer</dc:creator>
    <dc:date>2017-03-03T12:05:10Z</dc:date>
    <item>
      <title>Use regression parameters to predict values in another dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337421#M17794</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I computed multinomial logit regression parameters using proc logistic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=edu.educationClean;by EU15 sex;run;&lt;BR /&gt;proc logistic data=edu.educationClean;&lt;BR /&gt;class cohort2(ref='2') Langue(ref='0') cntr_regr(ref=first) genstat3(ref='0') eduM3(ref='2') religion(ref='0') /param=ref;&lt;BR /&gt;model edu3(ref='2')= cntr_regr cohort2 cntr_regr*cohort2 Langue genstat3 religion eduM3&amp;nbsp; /link=glogit rsquare;&lt;BR /&gt;weight pond / norm;&lt;BR /&gt;by EU15 sex;&lt;BR /&gt;where model=1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to use parameters to predict values of edu3 in another dataset&amp;nbsp; (donnees.popbase2) which has the same shape, but a different population. Is it possible?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 15:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337421#M17794</guid>
      <dc:creator>Demographer</dc:creator>
      <dc:date>2017-03-02T15:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use regression parameters to predict values in another dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337425#M17795</link>
      <description>&lt;P&gt;Yes. This is called "scoring," and you can read about how to do it in the article &lt;A href="http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_self"&gt;"Techniques for scoring a regression model in SAS."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your situation, I suggest using&amp;nbsp;the STORE statement and the PLM procedure. To your PROC LOGISTIC code, add the SCORE statement, then use the SCORE statement in PROC PLM. &amp;nbsp;There is an example in the article.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 16:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337425#M17795</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-03-02T16:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use regression parameters to predict values in another dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337759#M17814</link>
      <description>&lt;P&gt;Thank you. I tried this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=edu.educationClean;by EU15 sex;run;&lt;BR /&gt;proc logistic data=edu.educationClean;&lt;BR /&gt;class cohort2(ref='2') cntr_regr(ref=first) genstat3(ref='0') eduM3(ref='2') religion(ref='0') /param=ref;&lt;BR /&gt;model edu3(ref='2')= cntr_regr cohort2 cntr_regr*cohort2 genstat3 religion eduM3&amp;nbsp; /link=glogit rsquare;&lt;BR /&gt;weight pond / norm;&lt;BR /&gt;where model=1;&lt;BR /&gt;by EU15 sex;&lt;BR /&gt;store work.regout;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc plm restore=work.regout;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; score data=edu.missing_countr;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; by EU15 sex;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is an error message saying "At least one variable used in the model is not present or has incompatible type in the EDU.MISSING_COUNTR score data set"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I noted that the dataset regout doesn't appear in the work folder. What I did wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 09:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337759#M17814</guid>
      <dc:creator>Demographer</dc:creator>
      <dc:date>2017-03-03T09:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use regression parameters to predict values in another dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337774#M17815</link>
      <description>&lt;P&gt;REGOUT is not a data set. It is an item store.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error message is reminding you that the data set that you are attempting to score must have every &amp;nbsp;variable that is in the model. You can use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC CONTENTS SHORT data=&lt;SPAN&gt;edu.missing_countr; run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;to see which variables are in the scoring data and (more importantly) which are not.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 10:36:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337774#M17815</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-03-03T10:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use regression parameters to predict values in another dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337780#M17816</link>
      <description>&lt;P&gt;Right... the label of the weight variable was not the same.&lt;/P&gt;
&lt;P&gt;Now I have values in the predicted value column, but I am not totally sure what they mean. I was expecting having probabilities for the 3 modalities of the dependent variable, but I have values such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" width="128" cellspacing="0" cellpadding="0" border="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" width="64" span="2" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD style="height: 15.0pt; width: 48pt;" width="64" height="20"&gt;Ordinal Response&lt;/TD&gt;
&lt;TD style="width: 48pt;" width="64"&gt;Predicted value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD style="height: 15.0pt;" height="20" align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;-1.79479&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD style="height: 15.0pt;" height="20" align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;-1.18285&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD style="height: 15.0pt;" height="20" align="right"&gt;2&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 03 Mar 2017 11:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337780#M17816</guid>
      <dc:creator>Demographer</dc:creator>
      <dc:date>2017-03-03T11:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use regression parameters to predict values in another dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337790#M17817</link>
      <description>&lt;P&gt;Nevermind, I had to add out=testout predicted/ilink;&lt;/P&gt;
&lt;P&gt;Now it works. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 12:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Use-regression-parameters-to-predict-values-in-another-dataset/m-p/337790#M17817</guid>
      <dc:creator>Demographer</dc:creator>
      <dc:date>2017-03-03T12:05:10Z</dc:date>
    </item>
  </channel>
</rss>

