<?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 deal with the WARNING &amp;quot; Unable to restore  'Stat.Reg.NObs' from template store!“ in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981394#M379107</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is what I suggested. I meet such kind of problem before.&lt;/P&gt;
&lt;P&gt;The reason why I suggest this code is that I&amp;nbsp; notice there is a WARNING msg under ERROR, that WARNING would appeared if the data is not good enough to fit this model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe this data is not suited for PROC REG. For example, this dataset has only &lt;STRONG&gt;one or two&lt;/STRONG&gt; obs ,that is not enough to fit a REG model.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%if&lt;STRONG&gt; &amp;amp;nobs &amp;gt; 10&lt;/STRONG&gt; %then %do;
&lt;/PRE&gt;
&lt;P&gt;That might suppress these ERROR/WARNING message.&lt;/P&gt;
&lt;P&gt;Just could give it a try&amp;nbsp; I think.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Dec 2025 13:10:29 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-12-31T13:10:29Z</dc:date>
    <item>
      <title>How to deal with the WARNING " Unable to restore  'Stat.Reg.NObs' from template store!“</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981329#M379076</link>
      <description>&lt;P&gt;I am running some codes repeatedly. It was OK. Somehow somewhere it pops out a warning&lt;/P&gt;
&lt;P&gt;" Unable to restore 'Stat.Reg.NObs' from template store!“.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone knows how to deal with this? I donot like to reboot the SAS, and too much need to redone.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;16203  %put "between &amp;amp;stind.+&amp;amp;stoff. and &amp;amp;endind.-&amp;amp;endrange.";
"between 5050+50 and 5583-40"
16204              ods exclude all;
16205              ods output ParameterEstimates = _index_avg_parms;
16206                  proc reg data=&amp;amp;ds.(where=(ind between &amp;amp;stind.+&amp;amp;stoff. and &amp;amp;endind.-&amp;amp;endrange.));
16207                      by tick;
16208                      model _ret_t=ind;
16209                  run;

ERROR: Unable to restore 'Stat.Reg.NObs' from template store!
NOTE: The SAS System stopped processing this step because of errors.
WARNING: Output 'ParameterEstimates' was not created.  Make sure that the output object name, label, or path is spelled correctly.  Also,
         verify that the appropriate procedure options are used to produce the requested output object.  For example, verify that the
         NOPRINT option is not used.
NOTE: PROCEDURE REG used (Total process time):
      real time           0.07 seconds
      cpu time            0.03 seconds

16209!                     quit;
16210              ods exclude none;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Dec 2025 06:02:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981329#M379076</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2025-12-29T06:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with the WARNING " Unable to restore  'Stat.Reg.NObs' from template store!“</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981343#M379079</link>
      <description>&lt;P&gt;Looks like it is probably related to this issue with SAS Statistical Graphics settings.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/67/210.html" target="_blank"&gt;https://support.sas.com/kb/67/210.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either turn off Stat Graphics or fix the paths used by it.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Dec 2025 16:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981343#M379079</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-12-29T16:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with the WARNING " Unable to restore  'Stat.Reg.NObs' from template store!“</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981384#M379101</link>
      <description>&lt;P&gt;It looks like SAS cannot load a standard ODS template (for the NOBS tables).&amp;nbsp; Have you been modifying templates or changing the path for templates? &lt;BR /&gt;Please run the following statement and post the result:&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="code"&gt;
&lt;PRE class="text"&gt;ods path show;&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp;shows how to correctly modify templates in the blog article, &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/11/17/advanced-ods-graphics-deeper-dive-item-stores/" target="_self"&gt;"A deeper dive into item stores."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;After we see your ODS path, we can probably figure out what is wrong. The fix might be a simpe as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="text"&gt;ods path reset;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 11:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981384#M379101</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2025-12-31T11:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with the WARNING " Unable to restore  'Stat.Reg.NObs' from template store!“</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981391#M379104</link>
      <description>&lt;P&gt;I noticed that you have WHERE condition :&lt;/P&gt;
&lt;PRE&gt; proc reg data=&amp;amp;ds.(&lt;STRONG&gt;where=(ind between &amp;amp;stind.+&amp;amp;stoff. and &amp;amp;endind.-&amp;amp;endrange.))&lt;/STRONG&gt;;&lt;/PRE&gt;
&lt;P&gt;Maybe That is where reason from .&lt;/P&gt;
&lt;P&gt;When You add IF or WHERE condition ,that would lead to an empty dataset ,and that empty dataset would generate this WARNING , I think.&lt;/P&gt;
&lt;P&gt;So I suggest you to write some code to check this dataset is empty or have enough obs to do PROC REG. Like:&lt;/P&gt;
&lt;PRE&gt;data _ds;
 set &amp;amp;ds.(where=(ind between &amp;amp;stind.+&amp;amp;stoff. and &amp;amp;endind.-&amp;amp;endrange.));
run;

&lt;STRONG&gt;%let dsid=%sysfunc(open(_ds));
%let nobs=%sysfunc(attrn(&amp;amp;dsid,nlobs));
%let dsid=%sysfunc(close(&amp;amp;dsid));
&lt;/STRONG&gt;
%put &amp;amp;=nobs. ;

&lt;STRONG&gt;%if &amp;amp;nobs ne 0 %then %do;&lt;/STRONG&gt;
ods exclude all;
ods output ParameterEstimates = _index_avg_parms;
    proc reg data=_ds;
        by tick;
        model _ret_t=ind;
    run;
&lt;STRONG&gt;%end;&lt;/STRONG&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Dec 2025 12:17:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981391#M379104</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-12-31T12:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with the WARNING " Unable to restore  'Stat.Reg.NObs' from template store!“</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981392#M379105</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;If the data contained no observations, the OP would get a different ERROR:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods exclude all;
ods output ParameterEstimates = _index_avg_parms;
proc reg data=sashelp.class(where=(Age&amp;gt;100));
   model weight=height;
run;
quit;
ods exclude none;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR: No valid observations are found.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 12:24:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981392#M379105</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2025-12-31T12:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with the WARNING " Unable to restore  'Stat.Reg.NObs' from template store!“</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981394#M379107</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is what I suggested. I meet such kind of problem before.&lt;/P&gt;
&lt;P&gt;The reason why I suggest this code is that I&amp;nbsp; notice there is a WARNING msg under ERROR, that WARNING would appeared if the data is not good enough to fit this model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe this data is not suited for PROC REG. For example, this dataset has only &lt;STRONG&gt;one or two&lt;/STRONG&gt; obs ,that is not enough to fit a REG model.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%if&lt;STRONG&gt; &amp;amp;nobs &amp;gt; 10&lt;/STRONG&gt; %then %do;
&lt;/PRE&gt;
&lt;P&gt;That might suppress these ERROR/WARNING message.&lt;/P&gt;
&lt;P&gt;Just could give it a try&amp;nbsp; I think.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2025 13:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981394#M379107</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-12-31T13:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with the WARNING " Unable to restore  'Stat.Reg.NObs' from template store!“</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981635#M379156</link>
      <description>&lt;P&gt;If you've solved the problem, please select a correct answer and close the thread. If you still need help, please update the thread.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 15:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-deal-with-the-WARNING-quot-Unable-to-restore-Stat-Reg/m-p/981635#M379156</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2026-01-07T15:14:19Z</dc:date>
    </item>
  </channel>
</rss>

