<?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 Can i draw a plot for multiple linear regression? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577143#M18564</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is that possible to make a graph(plot) for a multiple linear regression model with several covariates? I'd like to make a plot after adjustment several covariates. I saw the plot of model y=x, which adjusted covariates but don't know how to make it by sas.&amp;nbsp; Anyone can provided me some idea or example??&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code. Don't know which option i have to add.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=aa;&lt;/P&gt;&lt;P&gt;model change_weight= sex age region alcohol toe_hg;&lt;/P&gt;&lt;P&gt;run;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to make a plot of model (change_weight=toe_hg) adjusted covariates (sex, age, region).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Jul 2019 10:46:51 GMT</pubDate>
    <dc:creator>jeminjeon</dc:creator>
    <dc:date>2019-07-27T10:46:51Z</dc:date>
    <item>
      <title>Can i draw a plot for multiple linear regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577143#M18564</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is that possible to make a graph(plot) for a multiple linear regression model with several covariates? I'd like to make a plot after adjustment several covariates. I saw the plot of model y=x, which adjusted covariates but don't know how to make it by sas.&amp;nbsp; Anyone can provided me some idea or example??&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code. Don't know which option i have to add.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=aa;&lt;/P&gt;&lt;P&gt;model change_weight= sex age region alcohol toe_hg;&lt;/P&gt;&lt;P&gt;run;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to make a plot of model (change_weight=toe_hg) adjusted covariates (sex, age, region).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 10:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577143#M18564</guid>
      <dc:creator>jeminjeon</dc:creator>
      <dc:date>2019-07-27T10:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can i draw a plot for multiple linear regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577144#M18565</link>
      <description>&lt;P&gt;SAS regression procedures such as PROC REG and PROC GLM create many plots automatically when you use&lt;/P&gt;
&lt;P&gt;ODS GRAPHICS ON;&lt;/P&gt;
&lt;P&gt;to turn on ods graphics. For examples, see &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_reg_examples.htm&amp;amp;locale=en" target="_self"&gt;the Getting Started examples in PROC REG.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can control the type of graphs by using &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_reg_syntax01.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.reg.procplots" target="_self"&gt;the PLOTS= option&lt;/A&gt; on the PROC statement.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 10:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577144#M18565</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-07-27T10:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can i draw a plot for multiple linear regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577145#M18566</link>
      <description>&lt;P&gt;In practicality, you cannot create a plot of your multiple linear regression because such a plot would have to show a surface in six dimensions, and not even SAS can produce such a six-dimensional plot. However, SAS does produce a lot of plots that can help you diagnose if the fit is a good fit or not, and produce other diagnostics as well, as explained by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; by using the PLOTS= option.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 10:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577145#M18566</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-27T10:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can i draw a plot for multiple linear regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577202#M18567</link>
      <description>&lt;P&gt;One idea would be to create a lattice panel of graphs (using proc sgpanel) with sex as columns and regions as rows. On each graph you could show the data for a given sex and region and some fitted lines for a few select ages.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2019 03:42:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577202#M18567</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-07-28T03:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can i draw a plot for multiple linear regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577208#M18568</link>
      <description>&lt;P&gt;Here is an example using the sashelp.heart dataset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* (Poor) model for predicting cholesterol */
proc glm data=sashelp.heart;
class sex smoking_status;
model cholesterol = sex ageAtStart smoking_status|weight;
store test;
run;

/* Values at which to get predictions */
data cholValues;
do sex = "Female", "Male";
    do smoking_status = "Very Heavy (&amp;gt; 25)", "Non-smoker", "Light (1-5)", "Moderate (6-15)", 
        "Heavy (16-25)";
        do ageAtStart = 30 to 75 by 15;
            do weight = 120 to 240 by 20;
                output;
                end;
            end;
        end;
    end;
run;
            
/* Generate the predictions */
proc plm restore=test;
score data=cholValues out=cholPred predicted=predCholesterol;
run;

/* Assemble observations and predictions in single dataset */
data cholGraph;
set sashelp.heart cholPred(rename=ageAtStart=age);
run;

proc sort data=cholGraph; by sex smoking_status age weight; run;

/* Create graph */
ods graphics / width=600 height = 1000;
proc sgpanel data=cholGraph ;
panelby sex smoking_status / layout=lattice onepanel novarname;
scatter x=weight y=cholesterol;
series x=weight y=predCholesterol / group=age  nomissinggroup 
    lineattrs=(pattern=solid);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel11.png" style="width: 360px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31343i9425C6EC804BC553/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel11.png" alt="SGPanel11.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2019 04:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577208#M18568</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-07-28T04:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can i draw a plot for multiple linear regression?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577220#M18569</link>
      <description>&lt;P&gt;You can also &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.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The article shows how to use the EFFECTPLOT statement directly in regression procedures and how to use the STORE statement and PROC PLM to visualize the model in a post-fit analysis.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2019 10:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-i-draw-a-plot-for-multiple-linear-regression/m-p/577220#M18569</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-07-28T10:39:55Z</dc:date>
    </item>
  </channel>
</rss>

