BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KentaMURANAKA
Pyrite | Level 9

Hi, All:

 

I want to make a figure, which expresses linear regression analysis.

By submitting the following code, we can see one legend in the output, which includes "regression" & "95% confidence interval".

data test;
    input x y @@;
    datalines;
    10 10 4 5 2 5 2 4 8 4 9 6 7 6 5 2
    1 1 3 2 4 7 6 7 8 9 11 8 6 4
    ;
run;
proc sgplot data=test;
    reg x=x y=y / clm;
    keylegend / noborder location=outside position=top;
run;

By using LEGENDLABEL= option, I succeeded to change one value "regression" to "Mean predicted".

But I want to change both legend values ("regression" & "95% confidence interval").

Please give me some advice.

 

Thank you for your kind cooperation.

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

How about

 

proc sgplot data=test;
reg x=x y=y / clm="clm" legendlabel="legendlabel" ;
/* keylegend / noborder location=outside position=top;*/
run;

View solution in original post

2 REPLIES 2
BrunoMueller
SAS Super FREQ

How about

 

proc sgplot data=test;
reg x=x y=y / clm="clm" legendlabel="legendlabel" ;
/* keylegend / noborder location=outside position=top;*/
run;
KentaMURANAKA
Pyrite | Level 9

Dear Bruno:

 

Thank you so much.

I accomplished it!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 5278 views
  • 1 like
  • 2 in conversation