<?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: Linear Equation with Date in x-axis in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701254#M214718</link>
    <description>&lt;P&gt;"Dates" on month intervals are not evenly spaced and the regression is going to be just a bit suspect.&lt;/P&gt;
&lt;P&gt;If you actually need to know the slope, m, per calendar month then you may be better off creating a sequence variable instead of using a date. Or use a proper timeseries procedure.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2020 15:22:14 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-11-24T15:22:14Z</dc:date>
    <item>
      <title>Linear Equation with Date in x-axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701154#M214686</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this data:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile datalines dlm='';
input bin_val $8. variable_name $6. _yyyymm_ yymmn6. PERCENT ;
format _yyyymm_ yymmn6.;
datalines;
6.0-7.0 alpha 201503 0.54
6.0-7.0 alpha 201506 0.48
6.0-7.0 alpha 201509 0.47
6.0-7.0 alpha 201512 0.85
6.0-7.0 alpha 201603 0.74
6.0-7.0 alpha 201606 0.9
6.0-7.0 alpha 201609 1.12
6.0-7.0 alpha 201612 1.01
6.0-7.0 alpha 201703 0.99
6.0-7.0 alpha 201706 0.43
6.0-7.0 alpha 201709 0.47
6.0-7.0 alpha 201712 .
6.0-7.0 alpha 201803 0.46
6.0-7.0 alpha 201806 0.37
6.0-7.0 alpha 201809 0.34
6.0-7.0 alpha 201812 0.38
6.0-7.0 alpha 201903 0.34
6.0-7.0 alpha 201906 0.32
6.0-7.0 alpha 201909 0.27
6.0-7.0 alpha 201912 0.26
6.0-7.0 alpha 202003 0.3
6.0-7.0 alpha 202006 0.25
6.0-7.0 alpha 202009 0.26
;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I &lt;STRONG&gt;want&lt;/STRONG&gt; equation&amp;nbsp;&lt;STRONG&gt;y=mx+b&lt;/STRONG&gt; equation for&amp;nbsp;&lt;STRONG&gt;percent&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;on Y-axis and &lt;/SPAN&gt;&lt;STRONG&gt;_YYYYMM_&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;on X-axis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I was able to get below chart and equation in excel but not sure how to get this in SAS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I want the equation more than the chart.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="david27_0-1606198192729.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51948i3FB73ADD77B049F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="david27_0-1606198192729.png" alt="david27_0-1606198192729.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 06:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701154#M214686</guid>
      <dc:creator>david27</dc:creator>
      <dc:date>2020-11-24T06:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Equation with Date in x-axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701157#M214687</link>
      <description>&lt;P&gt;Please paste usable code.&lt;/P&gt;
&lt;P&gt;Copy the code back to SAS after pasting to ensure it can be run.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 06:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701157#M214687</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-24T06:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Equation with Date in x-axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701158#M214688</link>
      <description>Updated. Apologies!!!</description>
      <pubDate>Tue, 24 Nov 2020 06:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701158#M214688</guid>
      <dc:creator>david27</dc:creator>
      <dc:date>2020-11-24T06:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Equation with Date in x-axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701166#M214691</link>
      <description>&lt;P&gt;A simple Proc Reg call will give you both&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select fitplot;
proc reg data = have;
   model PERCENT = _yyyymm_;
run;quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Nov 2020 08:27:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701166#M214691</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-11-24T08:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Equation with Date in x-axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701254#M214718</link>
      <description>&lt;P&gt;"Dates" on month intervals are not evenly spaced and the regression is going to be just a bit suspect.&lt;/P&gt;
&lt;P&gt;If you actually need to know the slope, m, per calendar month then you may be better off creating a sequence variable instead of using a date. Or use a proper timeseries procedure.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 15:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Linear-Equation-with-Date-in-x-axis/m-p/701254#M214718</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-24T15:22:14Z</dc:date>
    </item>
  </channel>
</rss>

