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!!
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!!
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!!
*forehead smack* YES, beautiful. That is exactly what I needed. I feel silly. Thank you!!!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.