<?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: Regression at different hours in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473778#M30723</link>
    <description>&lt;P&gt;Sorry, one more question:&lt;/P&gt;&lt;P&gt;How can I edit my code to make the x axis&amp;nbsp;go from 60-95 in every plot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sort data=matt (where=(Month in(6,7,8)));
by Month Hour;
run;

proc sgplot data=matt (where=(Month in(6,7,8)));
scatter x=Temperature y=Load;
by Hour;
xaxis label="Temperature (degrees F)";
yaxis label="Load (MW)";
title 'Load vs Temperature';
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Jun 2018 15:08:49 GMT</pubDate>
    <dc:creator>matt23</dc:creator>
    <dc:date>2018-06-27T15:08:49Z</dc:date>
    <item>
      <title>Regression at different hours</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473717#M30717</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have this model but I want to make a regression model for each specific hour,&lt;/P&gt;&lt;PRE&gt;proc reg data=dataname(where=(Month in(6,7,8)));
model Load=Temperature;
label Load="Load (MW)" Temperature="Temperature";
title 'Load vs Temp (Summer)';
run;&lt;/PRE&gt;&lt;P&gt;How can I include where=(Hour in(1)) or&amp;nbsp;&lt;SPAN&gt;where=(Hour in(22))&amp;nbsp;&lt;/SPAN&gt;etc.&amp;nbsp;I tried&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(where=(Month in(6,7,8))(Hour in(1)))&lt;/PRE&gt;&lt;P&gt;but it didn't work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also what can I do when I only want a model where Temperature is Between 55 and 65?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473717#M30717</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-06-27T13:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regression at different hours</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473755#M30719</link>
      <description>&lt;P&gt;if you want two or more conditions in a where clause use AND&lt;/P&gt;
&lt;PRE&gt;  (where=(Month in(6,7,8) and Hour in(1)) )
&lt;/PRE&gt;
&lt;P&gt;same with temperature&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and&amp;nbsp;&amp;nbsp; 55 le temperature le 65&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And "Didn't work" is awful vague. Since the syntax you show&lt;/P&gt;
&lt;PRE&gt;(where=(Month in(6,7,8))(Hour in(1)))&lt;/PRE&gt;
&lt;P&gt;would have generated at least one error you should post the code from the LOG including the error message(s). Best is to copy from the log and then paste into a code box to maintain the text formatting of the messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I were looking to get separate models for each hour I would sort my data by the hour variable and use BY Hour; instead of having 12 or 24 separate where clauses.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 14:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473755#M30719</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-27T14:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regression at different hours</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473778#M30723</link>
      <description>&lt;P&gt;Sorry, one more question:&lt;/P&gt;&lt;P&gt;How can I edit my code to make the x axis&amp;nbsp;go from 60-95 in every plot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sort data=matt (where=(Month in(6,7,8)));
by Month Hour;
run;

proc sgplot data=matt (where=(Month in(6,7,8)));
scatter x=Temperature y=Load;
by Hour;
xaxis label="Temperature (degrees F)";
yaxis label="Load (MW)";
title 'Load vs Temperature';
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jun 2018 15:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473778#M30723</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-06-27T15:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regression at different hours</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473783#M30725</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216327"&gt;@matt23&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Sorry, one more question:&lt;/P&gt;
&lt;P&gt;How can I edit my code to make the x axis&amp;nbsp;go from 60-95 in every plot:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sort data=matt (where=(Month in(6,7,8)));
by Month Hour;
run;

proc sgplot data=matt (where=(Month in(6,7,8)));
scatter x=Temperature y=Load;
by Hour;
xaxis label="Temperature (degrees F)";
yaxis label="Load (MW)";
title 'Load vs Temperature';
run;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Add a VALUES option to the Xaxis statement. You could either explicitly list the values of interest Values=(60 70 80 95) or use something like values=(60 to 95 by 5) to have a tick mark and value at 60, 65, 70 etc.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 15:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473783#M30725</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-27T15:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regression at different hours</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473787#M30727</link>
      <description>You're the best!</description>
      <pubDate>Wed, 27 Jun 2018 15:24:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regression-at-different-hours/m-p/473787#M30727</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-06-27T15:24:48Z</dc:date>
    </item>
  </channel>
</rss>

