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

Greetings SAS Community!

 

I think I know the answer to this question, but I am sincerely hoping I am wrong. I am creating plots for my ridge traces and variance inflation factors using Proc Reg. However, the output needs to be in grayscale for printing. Therefore, I need to change the symbols on the lines associated with the different variables. Is this possible? If so, how do I do it?

 

PS: I am using SAS 9.4

 

I am using a SAS sample dataset. Here is my code:

 

/* Example of Multicollinearity Findings */
libname health "C:\Program Files\SASHome\SASEnterpriseGuide\7.1\Sample\Data";

data health;
set health.lipid;
run;

 

/* Assess Pairwise Correlations of Continuous Variables */
proc corr data=health;
var age weight cholesterol triglycerides hdl ldl height;
title 'Health Predictors - Examination of Correlation Matrix';
run;

 

proc reg data=health;
model cholesterolloss = age weight cholesterol triglycerides hdl ldl height / vif tol collin;
title 'Health Predictors - Multicollinearity Investigation of VIF and Tol';
run;

 

/* Ridge Regression Example */
proc reg data=health outvif plots(only)=ridge(unpack VIFaxis=log)
outest=rrhealth ridge=0 to 0.10 by .002;
model cholesterolloss = age weight cholesterol triglycerides hdl ldl height;
plot / ridgeplot nomodel nostat;
title 'Health - Ridge Regression Calculation';
run;

 

Any help/guidance is sincerely appreciated!!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Are you using the HTML output? If so, changing your style will modify the colours. 

 

Try 

 

ODS HTML style = journal;

You can put that at the top of your program and check the results. There’s also JOURNAL2/3 which are slightly different. 

 


@DeannaGregory wrote:

Greetings SAS Community!

 

I think I know the answer to this question, but I am sincerely hoping I am wrong. I am creating plots for my ridge traces and variance inflation factors using Proc Reg. However, the output needs to be in grayscale for printing. Therefore, I need to change the symbols on the lines associated with the different variables. Is this possible? If so, how do I do it?

 

PS: I am using SAS 9.4

 

I am using a SAS sample dataset. Here is my code:

 

/* Example of Multicollinearity Findings */
libname health "C:\Program Files\SASHome\SASEnterpriseGuide\7.1\Sample\Data";

data health;
set health.lipid;
run;

 

/* Assess Pairwise Correlations of Continuous Variables */
proc corr data=health;
var age weight cholesterol triglycerides hdl ldl height;
title 'Health Predictors - Examination of Correlation Matrix';
run;

 

proc reg data=health;
model cholesterolloss = age weight cholesterol triglycerides hdl ldl height / vif tol collin;
title 'Health Predictors - Multicollinearity Investigation of VIF and Tol';
run;

 

/* Ridge Regression Example */
proc reg data=health outvif plots(only)=ridge(unpack VIFaxis=log)
outest=rrhealth ridge=0 to 0.10 by .002;
model cholesterolloss = age weight cholesterol triglycerides hdl ldl height;
plot / ridgeplot nomodel nostat;
title 'Health - Ridge Regression Calculation';
run;

 

Any help/guidance is sincerely appreciated!!


 

View solution in original post

2 REPLIES 2
Reeza
Super User

Are you using the HTML output? If so, changing your style will modify the colours. 

 

Try 

 

ODS HTML style = journal;

You can put that at the top of your program and check the results. There’s also JOURNAL2/3 which are slightly different. 

 


@DeannaGregory wrote:

Greetings SAS Community!

 

I think I know the answer to this question, but I am sincerely hoping I am wrong. I am creating plots for my ridge traces and variance inflation factors using Proc Reg. However, the output needs to be in grayscale for printing. Therefore, I need to change the symbols on the lines associated with the different variables. Is this possible? If so, how do I do it?

 

PS: I am using SAS 9.4

 

I am using a SAS sample dataset. Here is my code:

 

/* Example of Multicollinearity Findings */
libname health "C:\Program Files\SASHome\SASEnterpriseGuide\7.1\Sample\Data";

data health;
set health.lipid;
run;

 

/* Assess Pairwise Correlations of Continuous Variables */
proc corr data=health;
var age weight cholesterol triglycerides hdl ldl height;
title 'Health Predictors - Examination of Correlation Matrix';
run;

 

proc reg data=health;
model cholesterolloss = age weight cholesterol triglycerides hdl ldl height / vif tol collin;
title 'Health Predictors - Multicollinearity Investigation of VIF and Tol';
run;

 

/* Ridge Regression Example */
proc reg data=health outvif plots(only)=ridge(unpack VIFaxis=log)
outest=rrhealth ridge=0 to 0.10 by .002;
model cholesterolloss = age weight cholesterol triglycerides hdl ldl height;
plot / ridgeplot nomodel nostat;
title 'Health - Ridge Regression Calculation';
run;

 

Any help/guidance is sincerely appreciated!!


 

DeannaGregory
Obsidian | Level 7

*forehead smack* YES, beautiful. That is exactly what I needed. I feel silly. Thank you!!!

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
  • 1069 views
  • 1 like
  • 2 in conversation