<?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: out of sample regression testing with sas studio in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631277#M77755</link>
    <description>&lt;P&gt;Here's a blog post that illustrates 4 different ways of doing this. Don't try PLM if this is all new to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank"&gt;https://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;There's also a full example in the documentation for PROC LOGISTIC (see the little link under the heading to the full code so you can run and test the example).&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_logistic_examples20.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_logistic_examples20.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/314297"&gt;@catkat96&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am very very very new to SAS and to be fair I haven't learnt from the start, I was just thrown into producing regressions, so I am not very acquainted with the language.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two excel datasets, one for training and one for testing the regression.&lt;/P&gt;
&lt;P&gt;What I want to know is how to use the fitted logistic regression to "predict" the classes for the test set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not running these regressions by writing the code myself, I am simply adjusting the settings. Nonetheless, here's the code that I get&lt;/P&gt;
&lt;P&gt;from training the logistic regression:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods noproctitle;
ods graphics / imagemap=on;

proc logistic data=WORK.TRAIN2 plots=(roc);
	class checking_1 checking_23 savings_1 savings_23 amount_to1400 
		amount_1400to1600 amount_1600to2200 amount_2200to3800 purpose_189 purpose_26 
		purpose_05 / param=glm;
	model Good(event='1')=checking_1 checking_23 savings_1 savings_23 
		amount_to1400 amount_1400to1600 amount_1600to2200 amount_2200to3800 
		purpose_189 purpose_26 purpose_05 / link=logit technique=fisher;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My test dataset is called TEST2. How can I achieve this?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Mar 2020 16:23:09 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-03-11T16:23:09Z</dc:date>
    <item>
      <title>out of sample regression testing with sas studio</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631260#M77754</link>
      <description>&lt;P&gt;I am very very very new to SAS and to be fair I haven't learnt from the start, I was just thrown into producing regressions, so I am not very acquainted with the language.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two excel datasets, one for training and one for testing the regression.&lt;/P&gt;&lt;P&gt;What I want to know is how to use the fitted logistic regression to "predict" the classes for the test set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not running these regressions by writing the code myself, I am simply adjusting the settings. Nonetheless, here's the code that I get&lt;/P&gt;&lt;P&gt;from training the logistic regression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods noproctitle;
ods graphics / imagemap=on;

proc logistic data=WORK.TRAIN2 plots=(roc);
	class checking_1 checking_23 savings_1 savings_23 amount_to1400 
		amount_1400to1600 amount_1600to2200 amount_2200to3800 purpose_189 purpose_26 
		purpose_05 / param=glm;
	model Good(event='1')=checking_1 checking_23 savings_1 savings_23 
		amount_to1400 amount_1400to1600 amount_1600to2200 amount_2200to3800 
		purpose_189 purpose_26 purpose_05 / link=logit technique=fisher;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My test dataset is called TEST2. How can I achieve this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 15:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631260#M77754</guid>
      <dc:creator>catkat96</dc:creator>
      <dc:date>2020-03-11T15:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: out of sample regression testing with sas studio</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631277#M77755</link>
      <description>&lt;P&gt;Here's a blog post that illustrates 4 different ways of doing this. Don't try PLM if this is all new to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank"&gt;https://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;There's also a full example in the documentation for PROC LOGISTIC (see the little link under the heading to the full code so you can run and test the example).&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_logistic_examples20.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_logistic_examples20.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/314297"&gt;@catkat96&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am very very very new to SAS and to be fair I haven't learnt from the start, I was just thrown into producing regressions, so I am not very acquainted with the language.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two excel datasets, one for training and one for testing the regression.&lt;/P&gt;
&lt;P&gt;What I want to know is how to use the fitted logistic regression to "predict" the classes for the test set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not running these regressions by writing the code myself, I am simply adjusting the settings. Nonetheless, here's the code that I get&lt;/P&gt;
&lt;P&gt;from training the logistic regression:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods noproctitle;
ods graphics / imagemap=on;

proc logistic data=WORK.TRAIN2 plots=(roc);
	class checking_1 checking_23 savings_1 savings_23 amount_to1400 
		amount_1400to1600 amount_1600to2200 amount_2200to3800 purpose_189 purpose_26 
		purpose_05 / param=glm;
	model Good(event='1')=checking_1 checking_23 savings_1 savings_23 
		amount_to1400 amount_1400to1600 amount_1600to2200 amount_2200to3800 
		purpose_189 purpose_26 purpose_05 / link=logit technique=fisher;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My test dataset is called TEST2. How can I achieve this?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 16:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631277#M77755</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-11T16:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: out of sample regression testing with sas studio</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631309#M77756</link>
      <description>&lt;P&gt;Thank you so much! The second link was really useful and now I can do it for logistic regression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also need to do the same for linear regression (with the same datasets too), but I find that the initial code is a bit different, so I'm not sure the outmodel/inmodel thing works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you happen to have a link to the documentation that explains this too?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 17:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631309#M77756</guid>
      <dc:creator>catkat96</dc:creator>
      <dc:date>2020-03-11T17:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: out of sample regression testing with sas studio</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631323#M77757</link>
      <description>The PROC SCORE documentation has one for PROC REG.&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_score_examples02.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_score_examples02.htm&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Mar 2020 18:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/out-of-sample-regression-testing-with-sas-studio/m-p/631323#M77757</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-11T18:04:59Z</dc:date>
    </item>
  </channel>
</rss>

