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!!!

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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