<?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 in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471803#M16293</link>
    <description>&lt;P&gt;So, I'm scrolling up in the code and found the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output ParameterEstimates=est FitStatistics=fit anova=anova;&lt;BR /&gt;proc reg data =pk;&lt;BR /&gt;model y=x/clb alpha=.1;&lt;BR /&gt;output out=reg p=pred;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;ods output close;&lt;BR /&gt;data fit1(keep=ord label2 cvalue2);&lt;BR /&gt;set fit;&lt;BR /&gt;where label2='R-Square';&lt;BR /&gt;ord=2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data cl1(keep=ord estimate lowercl uppercl rename=(estimate=b))&lt;BR /&gt;cl2(keep=ord estimate rename=(estimate=a));&lt;BR /&gt;set est;&lt;BR /&gt;&lt;BR /&gt;if upcase(variable)='X' then do;&lt;BR /&gt;ord=1;&lt;BR /&gt;output cl1;&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;ord=1;&lt;BR /&gt;output cl2;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data cl;&lt;BR /&gt;merge cl1 cl2;&lt;BR /&gt;by ord;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data stat;&lt;BR /&gt;set cl fit1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=reg;&lt;BR /&gt;by cpevent1 subjid;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the proc reg, creating the regression data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset reg is merged in with the other stats to create the pk1.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jun 2018 17:09:49 GMT</pubDate>
    <dc:creator>cjkim1030</dc:creator>
    <dc:date>2018-06-20T17:09:49Z</dc:date>
    <item>
      <title>Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471783#M16286</link>
      <description>&lt;P&gt;I've been asked to re-post my question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all, thank you to all of community who helped me on my last post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current Question:&lt;/P&gt;
&lt;P&gt;I've asked to work with proc gplot in an existing program.&amp;nbsp; Once I have made the necessary changes and run my code I get a plot with a regression line that is not one continuous line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;symbol1 v=circle i=none c=BLACK h=2;
symbol2 v=none l=1 i=join c=BLACK h=3;
symbol3 v=square i = none c=BLACK h=3;
symbol4 v=star i = none c=BLACK h=3;

*goptions ftext=ARIAL;
axis1 logbase=10 logstyle=expand minor=(h=0.5) label=(h=2.5 "Cycle");
axis2 logbase=10 logstyle=expand minor=(h=0.5) label=(h=2.5 angle=90 "&amp;amp;l_pparm");
legend1 value=('Individual' 'Linear Regression' 'Geometric Mean' 'Median') label=(' ');

proc gplot data=pk1 annotate=anno;
	plot pkpraw*cpevent1=1
		yp*cpevent1=2
		_geomean*cpevent1=3
		z_median*cpevent1=4
		/overlay skipmiss vaxis=axis2 haxis=axis1 hzero vzero legend=legend1 noframe;
	format pkpraw pred _geomean z_median 8.;
run;

quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Used:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data SAMPLE;
	infile datalines dsd truncover;
	input PKPRAW:32. cpevent1:$200. cpevent2:32. pred:32. z_median:32. _geomean:32. yp:32.;
	label PKPRAW="PK Parameter Value" pred="Predicted Value of y" z_median="PK Parameter Value";
	datalines4;
11,C2D1,2,3.655622292,61.2,58.272469199,38.691591091
25.2,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
27.1,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
27.3,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
29.8,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
30.5,C2D1,2,3.655622292,61.2,58.272469199,38.691591091
34.9,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
39,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
39.2,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
42.4,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
44.3,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
45.8,C2D1,2,3.655622292,61.2,58.272469199,38.691591091
47.6,C2D1,2,3.655622292,61.2,58.272469199,38.691591091
47.7,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
48,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
49,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
53.6,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
56,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
58.3,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
59.6,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
60.6,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
61.8,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
62.5,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
65,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
66.2,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
67.2,C2D1,2,3.655622292,61.2,58.272469199,38.691591091
72.8,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
74.3,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
76.6,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
79.6,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
81.4,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
81.8,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
81.9,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
84.4,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
89.2,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
93,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
94.9,C2D1,2,3.655622292,61.2,58.272469199,38.691591091
114,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
117,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
121,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
135,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
168,C2D1,2,4.12454122,61.2,58.272469199,61.839432047
5.93,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
14.3,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
24.2,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
29.9,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
39.6,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
43.9,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
44.7,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
44.8,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
47.4,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
47.5,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
51,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
52.4,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
52.9,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
55.3,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
55.5,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
58.1,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
61.7,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
63.1,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
64.8,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
67.9,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
69.4,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
71.6,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
79.2,C3D1,3,3.655622292,58.1,53.458339518,38.691591091
80.1,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
80.7,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
81.3,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
82,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
83.2,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
87.3,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
108,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
134,C3D1,3,4.12454122,58.1,53.458339518,61.839432047
6.91,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
11.8,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
19.4,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
27.4,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
28.6,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
32.8,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
34.7,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
38.2,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
41.9,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
43.1,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
44.7,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
45.9,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
49.5,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
59.2,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
60.5,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
61.7,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
62.1,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
65.3,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
66.7,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
67.2,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
68.4,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
70,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
70.5,C4D1,4,3.655622292,61.9,53.37077009,38.691591091
72.6,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
75.8,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
83,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
95.6,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
98.3,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
103,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
113,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
165,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
170,C4D1,4,4.12454122,61.9,53.37077009,61.839432047
;;;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output is attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 16:30:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471783#M16286</guid>
      <dc:creator>cjkim1030</dc:creator>
      <dc:date>2018-06-20T16:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471785#M16287</link>
      <description>&lt;P&gt;Your X variable is a character variable, yet you're trying to create a regression plot with it. Was that your intent?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 16:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471785#M16287</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-06-20T16:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471793#M16289</link>
      <description>&lt;P&gt;I wasn't the one to write the original code and I have little experience with figures.&amp;nbsp; Could this be a reason for the odd regression line?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 16:42:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471793#M16289</guid>
      <dc:creator>cjkim1030</dc:creator>
      <dc:date>2018-06-20T16:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471802#M16292</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215429"&gt;@cjkim1030&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I wasn't the one to write the original code and I have little experience with figures.&amp;nbsp; Could this be a reason for the odd regression line?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is the example "data" the output from a regression procedure?&lt;/P&gt;
&lt;P&gt;If not, what do you think is creating a "regression" line.&lt;/P&gt;
&lt;P&gt;A symbol statement with the INTERPOL=R or I=R option will create regressions. The value of R can be modified with L Q or C to do linear, quadratic or cubic regressions with options to display confidence limits of mean or individual predicted values&amp;nbsp;with confidence levels from 50% to 99% (defaults to 95%). So a symbol statement might look like Symbol2 I=RLCLM95;&lt;/P&gt;
&lt;P&gt;HOWEVER the x-axis variable would have to be numeric to work at all. Since your x variable is character GPLOT can't do a "regression" with the value.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 17:06:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471802#M16292</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-20T17:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471803#M16293</link>
      <description>&lt;P&gt;So, I'm scrolling up in the code and found the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output ParameterEstimates=est FitStatistics=fit anova=anova;&lt;BR /&gt;proc reg data =pk;&lt;BR /&gt;model y=x/clb alpha=.1;&lt;BR /&gt;output out=reg p=pred;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;ods output close;&lt;BR /&gt;data fit1(keep=ord label2 cvalue2);&lt;BR /&gt;set fit;&lt;BR /&gt;where label2='R-Square';&lt;BR /&gt;ord=2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data cl1(keep=ord estimate lowercl uppercl rename=(estimate=b))&lt;BR /&gt;cl2(keep=ord estimate rename=(estimate=a));&lt;BR /&gt;set est;&lt;BR /&gt;&lt;BR /&gt;if upcase(variable)='X' then do;&lt;BR /&gt;ord=1;&lt;BR /&gt;output cl1;&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;ord=1;&lt;BR /&gt;output cl2;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data cl;&lt;BR /&gt;merge cl1 cl2;&lt;BR /&gt;by ord;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data stat;&lt;BR /&gt;set cl fit1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=reg;&lt;BR /&gt;by cpevent1 subjid;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the proc reg, creating the regression data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset reg is merged in with the other stats to create the pk1.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 17:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471803#M16293</guid>
      <dc:creator>cjkim1030</dc:creator>
      <dc:date>2018-06-20T17:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471818#M16294</link>
      <description>Is this a homework question? Seems quite related to this post: &lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Exporting-to-Multiple-PDF-Files-in-a-Loop-by-Appending/m-p/471794" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/Exporting-to-Multiple-PDF-Files-in-a-Loop-by-Appending/m-p/471794&lt;/A&gt;</description>
      <pubDate>Wed, 20 Jun 2018 17:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471818#M16294</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-20T17:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471824#M16295</link>
      <description>&lt;P&gt;I wish that was the case, but it's for work.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 18:05:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471824#M16295</guid>
      <dc:creator>cjkim1030</dc:creator>
      <dc:date>2018-06-20T18:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471882#M16296</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215429"&gt;@cjkim1030&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So, I'm scrolling up in the code and found the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Does the proc reg, creating the regression data?&lt;/P&gt;
&lt;P&gt;The dataset reg is merged in with the other stats to create the pk1.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Proc Reg is creating&amp;nbsp;4 separate output data sets, EST which contains parameter estimates: the intercept and slope of X, FIT which has parameter estimates; Anova which contains analysis of variance bits and Reg which has the X and Y values plus the predicted Y values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the proc gplot code you have shown I am not sure what the intent was as your code references&amp;nbsp;several variables without indicating where they came from or represent: cpevent1&amp;nbsp;, yp (I might guess is a predicted Y but that isn't the name it would have from Proc reg shown), _geomean and z_median.&lt;/P&gt;
&lt;P&gt;This code:&lt;/P&gt;
&lt;PRE&gt;proc sort data=reg;
by cpevent1 subjid;
run;&lt;/PRE&gt;
&lt;P&gt;implies the cpevent1 and subjid are in the REG data set but as created by the Proc reg code shown it should only have x, y and pred variables.&lt;/P&gt;
&lt;PRE&gt;proc reg data =pk;
model y=x/clb alpha=.1;
output out=reg p=pred;
run;
quit;
&lt;/PRE&gt;
&lt;P&gt;the output data set has only 1) model variables ( Y and X) and 2)requested values, in this case PRED for the predicted Y value. So that data set REG appears not to be the one from the proc reg output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would expect to see a plot of Pred*X as the regression values plot. With no idea where or why the cpeven1 variable comes from it is extremely hard to guess why anything related to it is important.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are learning why there is a programming feature called COMMENTS. To place text in a program to describe what is going on or in many cases more important &lt;STRONG&gt;why&lt;/STRONG&gt; a step is done.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 20:05:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/471882#M16296</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-20T20:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/472073#M16300</link>
      <description>&lt;P&gt;In your symbol2 statement, you'll need to use&lt;STRONG&gt; i=rl&lt;/STRONG&gt; (interpol = regression line) rather than i=join (simple line).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And in order for the rl interpolation to work, I believe your &lt;STRONG&gt;x-axis has to be numeric&lt;/STRONG&gt;, rather than character. Therefore I create a cpevent1_num variable in a data step...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data pk1; set pk1;&lt;BR /&gt;if cpevent1='C2D1' then cpevent1_num=1;&lt;BR /&gt;if cpevent1='C3D1' then cpevent1_num=2;&lt;BR /&gt;if cpevent1='C4D1' then cpevent1_num=3;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;symbol1 v=circle i=none c=BLACK h=2;&lt;BR /&gt;symbol2 v=none l=1 &lt;STRONG&gt;i=rl&lt;/STRONG&gt; c=black;&lt;BR /&gt;symbol3 v=square i = none c=BLACK h=3;&lt;BR /&gt;symbol4 v=star i = none c=BLACK h=3;&lt;/P&gt;
&lt;P&gt;axis1 minor=none label=(h=2.5 "Cycle");&lt;BR /&gt;axis2 logbase=10 logstyle=expand minor=(h=0.5) label=(h=2.5 angle=90 "&amp;amp;l_pparm");&lt;BR /&gt;legend1 value=('Individual' 'Linear Regression' 'Geometric Mean' 'Median') label=(' ');&lt;/P&gt;
&lt;P&gt;proc gplot data=pk1 /*annotate=anno*/;&lt;BR /&gt; plot pkpraw*cpevent1_num=1&lt;BR /&gt; yp*cpevent1_num=2&lt;BR /&gt; _geomean*cpevent1_num=3&lt;BR /&gt; z_median*cpevent1_num=4&lt;BR /&gt; /overlay &lt;BR /&gt;skipmiss vaxis=axis2 haxis=axis1 hzero vzero legend=legend1 noframe;&lt;BR /&gt; format pkpraw pred _geomean z_median 8.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This produces a graph with a straight regression line:&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="reg1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21310iCBCEE01DF930FF38/image-size/large?v=v2&amp;amp;px=999" role="button" title="reg1.png" alt="reg1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the numeric 1, 2, and 3 to show up as text values, you can use a user-defined-format, such as ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format;&lt;BR /&gt; value cpfmt&lt;BR /&gt; 1 = 'C2D1'&lt;BR /&gt; 2 = 'C3D1'&lt;BR /&gt; 3 = 'C4D1'&lt;BR /&gt; ;&lt;BR /&gt;run;&lt;BR /&gt;data pk1; set pk1;&lt;BR /&gt;format cpevent1_num cpfmt.;&lt;BR /&gt;if cpevent1='C2D1' then cpevent1_num=1;&lt;BR /&gt;if cpevent1='C3D1' then cpevent1_num=2;&lt;BR /&gt;if cpevent1='C4D1' then cpevent1_num=3;&lt;BR /&gt;run;&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="reg2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21311i723BF90D5C62387C/image-size/large?v=v2&amp;amp;px=999" role="button" title="reg2.png" alt="reg2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 12:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/472073#M16300</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2018-06-21T12:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Regression</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/472076#M16301</link>
      <description>&lt;P&gt;I was able to figure this out based on other comments and yours verifies it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 12:51:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Regression/m-p/472076#M16301</guid>
      <dc:creator>cjkim1030</dc:creator>
      <dc:date>2018-06-21T12:51:48Z</dc:date>
    </item>
  </channel>
</rss>

