<?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 convert a very basic linear regression model into a package for model manager in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/convert-a-very-basic-linear-regression-model-into-a-package-for/m-p/825672#M1444</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was hoping you could help me out, we are currently looking at SAS VIYA and considering how we can make best use of it. One of the key features we want to use is model manager, I have watched hours of training and spent more searching for what I would have thought would have been a very simple procedure but it almost seems like it is either impossible or just "not done".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have several super simple models that are imbedded in larger pieces of code and used to give a probability percentage using a straightforward formula with imbedded correlation and slope numbers i.e. WantVar&amp;nbsp; = -1.49746+(HaveVar1*(-0.021799)+(HaveVar2*(0.7232))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my question is this: how on earth do i take that simple formula and get it into SAS model manager so we can start tracking it&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 13:36:24 GMT</pubDate>
    <dc:creator>stew90210</dc:creator>
    <dc:date>2022-07-27T13:36:24Z</dc:date>
    <item>
      <title>convert a very basic linear regression model into a package for model manager</title>
      <link>https://communities.sas.com/t5/SAS-Viya/convert-a-very-basic-linear-regression-model-into-a-package-for/m-p/825672#M1444</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was hoping you could help me out, we are currently looking at SAS VIYA and considering how we can make best use of it. One of the key features we want to use is model manager, I have watched hours of training and spent more searching for what I would have thought would have been a very simple procedure but it almost seems like it is either impossible or just "not done".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have several super simple models that are imbedded in larger pieces of code and used to give a probability percentage using a straightforward formula with imbedded correlation and slope numbers i.e. WantVar&amp;nbsp; = -1.49746+(HaveVar1*(-0.021799)+(HaveVar2*(0.7232))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my question is this: how on earth do i take that simple formula and get it into SAS model manager so we can start tracking it&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 13:36:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/convert-a-very-basic-linear-regression-model-into-a-package-for/m-p/825672#M1444</guid>
      <dc:creator>stew90210</dc:creator>
      <dc:date>2022-07-27T13:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: convert a very basic linear regression model into a package for model manager</title>
      <link>https://communities.sas.com/t5/SAS-Viya/convert-a-very-basic-linear-regression-model-into-a-package-for/m-p/826289#M1457</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/280289"&gt;@stew90210&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First make data step score code like this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.train;
   input HaveVar1 HaveVar2 @@;
   WantVar  = -1.49746+( HaveVar1*(-0.021799)+( HaveVar2*(0.7232) ) );
   datalines;
143 56.3 155 62.3 153 63.3 161 59.0 
191 62.5 171 62.5 185 59.0 142 56.5 
160 62.0 140 53.8 139 61.5 178 61.5 
157 64.5 149 58.3 143 51.3 145 58.8 
191 65.3 150 59.5 147 61.3 180 63.3 
164 66.5 189 65.0 164 61.5 167 62.0 
151 59.3 
;
run;

filename modelref filesrvc folderpath='/Users/myUserID/My Folder' name='score.sas';

proc reg outest=est1 outsscp=sscp1 rsquare;
   eq1: model WantVar=HaveVar1 HaveVar2;
   code file=modelref;
run;
QUIT;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then:&lt;BR /&gt;Import that Model Using a DATA Step Score Code File&lt;BR /&gt;See here on how to do that :&lt;BR /&gt;&lt;BR /&gt;SAS® Model Manager | 2021.2.4&lt;BR /&gt;Macro Reference&lt;BR /&gt;Model Management Macros&lt;BR /&gt;%MM_IMPORT_MODEL Macro&lt;BR /&gt;Example 5: Import a Model Using a DATA Step Score Code File&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/mdlmgrcdc/v_017/mdlmgrmacro/n0gcmowinwrpnyn1obg3o8vtmu79.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/mdlmgrcdc/v_017/mdlmgrmacro/n0gcmowinwrpnyn1obg3o8vtmu79.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jul 2022 20:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/convert-a-very-basic-linear-regression-model-into-a-package-for/m-p/826289#M1457</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-07-30T20:46:42Z</dc:date>
    </item>
  </channel>
</rss>

