<?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 Graph with known intercept and slope in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585737#M18804</link>
    <description>&lt;P&gt;I got some intercept and slopes from proc mixed effect model, like the following table show.&lt;/P&gt;&lt;P&gt;I want to make line graph using those intercept (25.00) and slope (0.040). How to do it in SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV align="center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32178iC3C0CE22CC576425/image-size/large?v=v2&amp;amp;px=999" role="button" title="11.png" alt="11.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 03 Sep 2019 09:50:45 GMT</pubDate>
    <dc:creator>Jie111</dc:creator>
    <dc:date>2019-09-03T09:50:45Z</dc:date>
    <item>
      <title>Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585737#M18804</link>
      <description>&lt;P&gt;I got some intercept and slopes from proc mixed effect model, like the following table show.&lt;/P&gt;&lt;P&gt;I want to make line graph using those intercept (25.00) and slope (0.040). How to do it in SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV align="center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32178iC3C0CE22CC576425/image-size/large?v=v2&amp;amp;px=999" role="button" title="11.png" alt="11.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Sep 2019 09:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585737#M18804</guid>
      <dc:creator>Jie111</dc:creator>
      <dc:date>2019-09-03T09:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585796#M18813</link>
      <description>&lt;P&gt;PROC SGPLOT with the LINEPARM statement will do this. Maybe PROC PLM will also do this, I don't know, I never tried.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 12:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585796#M18813</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-03T12:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585798#M18814</link>
      <description>&lt;P&gt;Thank you for the reply. However, the LINEPARM must be used with another plot statement.&lt;/P&gt;&lt;DIV class="xis-refProc"&gt;&lt;DIV class="xis-procStatement"&gt;It is not possible to do like following:&lt;/DIV&gt;&lt;DIV class="xis-procStatement"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xis-procStatement"&gt;proc sgplot;&lt;BR /&gt;lineparm x=0 y=26.8 slope=0.335;&lt;BR /&gt;run;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Sep 2019 12:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585798#M18814</guid>
      <dc:creator>Jie111</dc:creator>
      <dc:date>2019-09-03T12:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585801#M18815</link>
      <description>&lt;P&gt;Then get creative — plot data that is transparent and can't be seen. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
scatter x=height y=weight/transparency=1;
lineparm x=0 y=26.8 slope=0.335;
xaxis min=0 max=200 label='Timepoint';
yaxis min=0 max=200 label='Y';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or look into using PROC PLM by saving the output of the PROC MIXED using the STORE command in PROC MIXED.&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect066.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect066.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 13:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585801#M18815</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-03T13:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585803#M18816</link>
      <description>&lt;P&gt;Interesting idea.&lt;/P&gt;&lt;P&gt;It works now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 13:03:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/585803#M18816</guid>
      <dc:creator>Jie111</dc:creator>
      <dc:date>2019-09-03T13:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586104#M18822</link>
      <description>&lt;P&gt;You can do this with PROC PLM without needing to hard-code the estimates. In your PROC MIXED call, add the STORE statement, such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;store out=MixStore;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then call PROC PLM and use the EFFECTPLOT statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc plm restore=MixStore;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;effectplot fit; /* or use the noclm option to suppress the CLM */;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:20:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586104#M18822</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-09-04T13:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586119#M18824</link>
      <description>&lt;P&gt;Thanks for the reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the graph using proc plm but it was not what I want. It only gave me one line representing the sex=1 but I want to show two lines for sex=0 and sex=1 (shown in the estimate table), respectively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2019-09-04 155935.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32202i9764EF4C8826FB4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2019-09-04 155935.png" alt="Annotation 2019-09-04 155935.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:02:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586119#M18824</guid>
      <dc:creator>Jie111</dc:creator>
      <dc:date>2019-09-04T14:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586127#M18825</link>
      <description>&lt;P&gt;Show us the LOG for PROC PLM (not just any errors that may be in the log, but the entire log for the PROC PLM step).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please click on the {i} icon and paste the log as text into that window.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:18:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586127#M18825</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-04T14:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586133#M18826</link>
      <description>&lt;P&gt;OK. This is a different model that in your initial post, To display this model, use&amp;nbsp; the SLICEFIT(sliceby=sex) option. &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect027.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;The doc for PROC PLM is here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You might also want to read the article &lt;A href="https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html" target="_self"&gt;"Use the EFFECTPLOT statement to visualize regression models in SAS."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc plm restore=MixStore;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;effectplot slicefit( sliceby=Sex );&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:27:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586133#M18826</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-09-04T14:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586138#M18827</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no error in the LOG. I attached with my code for mixed and plm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                                %macro mix_group(dataset,group);
                             
                                   proc sort data=&amp;amp;dataset;
                                    by L_PNR;
                                   run;

                                   proc mixed data=&amp;amp;dataset;                                        
                                     class t &amp;amp;group;
                                     model col1=timepoint &amp;amp;group &amp;amp;group*timepoint /solution ddfm=kr;
                                     repeated t /subject=L_PNR type=un;
                                          estimate "intercept:&amp;amp;group=0" intercept 1 &amp;amp;group 0 1 /cl;
                                          estimate "intercept:&amp;amp;group=1" intercept 1 &amp;amp;group 1 0 /cl;
                                          estimate "intercept:1-0"   intercept 0 &amp;amp;group 1 -1 /cl;            
                                          estimate "slope for &amp;amp;group=0" timepoint 1  &amp;amp;group*timepoint 0 1  /cl;
                                          estimate "slope for &amp;amp;group=1" timepoint 1  &amp;amp;group*timepoint 1 0  /cl;
                                          estimate "slope for &amp;amp;group 1- &amp;amp;group 0" timepoint 0  &amp;amp;group*timepoint 1 -1  /cl; 

                                      store MixStore;
                                  run;
                                %mend;
                              
                                %mix_group(atl_two_bmi_3,sex);
                           


								 
proc plm restore=MixStore;
   effectplot fit;
run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2019-09-04 162725.png" style="width: 589px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32204iE0D8DC1ADEC4CC09/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2019-09-04 162725.png" alt="Annotation 2019-09-04 162725.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586138#M18827</guid>
      <dc:creator>Jie111</dc:creator>
      <dc:date>2019-09-04T14:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Graph with known intercept and slope</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586139#M18828</link>
      <description>Thanks. It is very helpful and powerful.</description>
      <pubDate>Wed, 04 Sep 2019 14:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-with-known-intercept-and-slope/m-p/586139#M18828</guid>
      <dc:creator>Jie111</dc:creator>
      <dc:date>2019-09-04T14:31:43Z</dc:date>
    </item>
  </channel>
</rss>

