BookmarkSubscribeRSS Feed
harmonic
Obsidian | Level 7

Hello community,

 

I would like to know if there is any way to output the tables VIP and Predictors Coeff for these plots using Proc PLS on Viya 4.

harmonic_0-1734429469708.png

harmonic_1-1734429494103.png

 


For the first table I tried ods output VariableImportancePlot=vip but doesn't work, and for the second one I didn't find any comand.

Thank you in advance

8 REPLIES 8
PaigeMiller
Diamond | Level 26

The answer to your first question is here: https://communities.sas.com/t5/Statistical-Procedures/VIP-values-in-PLS/m-p/114388#M6021

 

Since you said you tried that command "but doesn't work", please provide more information about what you did (the full PROC PLS code), what happened and what you saw that indicated it didn't work. Please, in the future, do not ever say "but doesn't work" by itself without more explanation that I just asked for..

 

Regarding your second question, you have to output the regression coefficients to a SAS data set and plot from there. Please use the command

 

ods output parameterestimates=parms;

 

--
Paige Miller
harmonic
Obsidian | Level 7
It means doesn't output anything, I already tried the solution you proposed for the first table as I wrote above.
Patrick
Opal | Level 21

@harmonic wrote:
It means doesn't output anything, I already tried the solution you proposed for the first table as I wrote above.

Help us help you!

There must be a SAS log somewhere that should provide a bit more info. Please share this log and the code you've used. Ideally also share sample data in the form of a SAS data step that works with your code so we can replicate what you describe.

And last but not least also tell us the exact SAS version you're using. 

harmonic
Obsidian | Level 7

@Patrick wrote:

@harmonic wrote:
It means doesn't output anything, I already tried the solution you proposed for the first table as I wrote above.

Help us help you!

There must be a SAS log somewhere that should provide a bit more info. Please share this log and the code you've used. Ideally also share sample data in the form of a SAS data step that works with your code so we can replicate what you describe.

And last but not least also tell us the exact SAS version you're using. 


	proc pls data=campione_full cv=one method=PLS(algorithm=SVD) cvtest(seed=17112003 stat=press nsamp=1000) CENSCALE details plot=(XYScores ParmProfiles VIP);
/* 		class &class_var.; */
		ods output XWeights=outsim.&versione_modello._&versione_simu._XWeights 
Weights=outsim.&versione_modello._&versione_simu._YWeights 
ParameterEstimates=outsim.&versione_modello._&versione_simu._Pest 
VariableImportancePlot=outsim.&versione_modello._&versione_simu._VarImp;
		model tgt_n_interferenze =	&num_var. / solution; 
		output out=outsim.&versione_modello._&versione_simu._pls_factors xscore=pls_factor_  yscore=yscore_  predicted=predict_1-predict_15 
								xresidual=xresid_1-xresid_15 yresidual=yresid_1-yresid_15
								STDX=STDX_1-STDX_15 STDY=STDY_1-STDY_15;
	run;

	ods pdf close;
	ods graphics off;

 

There are the available tables, I can't open pest 

harmonic_4-1734434844760.png

 

 

harmonic_3-1734434823732.png

 

NOTE: The data set OUTSIM.M08F_VS801A1_D01_VARIMP has 71 observations and 2 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_VARIMP increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: The data set OUTSIM.M08F_VS801A1_D01_PEST has 72 observations and 2 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_PEST increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: The data set OUTSIM.M08F_VS801A1_D01_XWEIGHTS has 8 observations and 73 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_XWEIGHTS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.

 

 

 

PaigeMiller
Diamond | Level 26

@harmonic 

Show us the code! Show us the log!

--
Paige Miller
PaigeMiller
Diamond | Level 26

I don't see the log. You have to show us the full log for PROC PLS, from the top where PROC PLS appears in the log, down to the last NOTE after PROC PLS, every line in the log between PROC PLS and the last NOTE. Screen captures are not preferred; copy the log as text and paste it into the window that appears when you click on the </> icon.

--
Paige Miller
harmonic
Obsidian | Level 7

This is the log, It creates the table Pest, but I can't open it. I use just the data. I think I can bypass that but I do not understand why I got that error when I try to open it.

NOTE: The data set OUTSIM.M08F_VS801A1_D01_PEST has 61 observations and 2 variables.
NOTE: Compressing data set OUTSIM.M08F_VS801A1_D01_PEST increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.

PaigeMiller
Diamond | Level 26

The error you posted above looks like you are not trying to open the same data set. PROC PLS created OUTSIM.M08F_VS801A1_D01_PEST but your error message shows you are trying to open _TEMP16.M08F_VS801A1_D01_PEST.

 

We're trying to help you, but you have to help us as well. From now on, when we request the log, we want the log provided as we requested, which is not as a file attachment, but as stated above "copy the log as text and paste it into the window that appears when you click on the </> icon". We don't want hundreds of lines of the log before PROC PLS, we want the log between the line that says PROC PLS and the last line of the log for PROC PLS which is the NOTEs after the PROC PLS code.

--
Paige Miller

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 8 replies
  • 301 views
  • 0 likes
  • 3 in conversation