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

Hi,

My man-a told me recently there is a way to have a PLS with logarithm.

However , I checked on the proc pls documentation and I found nothing relevant. I looked on the internet and I found nothing relevant as well.

Does anyone of you have any ideas?

Best.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

This is not mentioned in the help documentation for PROC PLS, and doesn't work for me in SAS 9.4.

You need to create the logarithm of the variable in a data step prior to PROC PLS, and then you can use that logarithm as the Y variable in PROC PLS.

--
Paige Miller

View solution in original post

6 REPLIES 6
andy_wk
Calcite | Level 5

After talking with my colleague, it seems I have the beginnning of a hint:

proc pls data=dataset ;

model log(Y) = x1 ... xn;

output out=datasetname predicted=var_name;

run;

Thank you all for reading.

PaigeMiller
Diamond | Level 26

This is not mentioned in the help documentation for PROC PLS, and doesn't work for me in SAS 9.4.

You need to create the logarithm of the variable in a data step prior to PROC PLS, and then you can use that logarithm as the Y variable in PROC PLS.

--
Paige Miller
andy_wk
Calcite | Level 5

Paige,

I've got a quick one. I took the following option : not Log Y = Log X

I got that error message

NOTE: Maximum number of factors to extract set to 15.  This may be too high; you should consider using either NFAC= or

      the CV= to set the number of factors.

WARNING: Data scaling prevents scores and loadings from being represented as correlations; Correlation Loading Plot not

         produced.

Do you have any idea why?

Cheers.

PaigeMiller
Diamond | Level 26

I have no idea what this means

I took the following option : not Log Y = Log X

but if you want someone to explain your error message, then we would need to see the relevant parts of the SASLOG, including the actual code that produced the error messages.

--
Paige Miller
andy_wk
Calcite | Level 5

Hi Paige,

You are right.

I double checked with my colleague and we need to have the dataset transformed to log , prior to the PLS.

I did the 3 following combinations :

Log Y = not log X

not Log Y = Log X

Log Y = Log X

Then with my need, I'm using one of the transformed dataset for the proc PLS. Y has only one variable.

Thanks for the feedback.

andy_wk
Calcite | Level 5

I meant I chose Y has not been changed to log and all the Xs have been changed to log.

Thanks for your help. I will do my homework thoroughly before putting my code and my log.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 6 replies
  • 1151 views
  • 3 likes
  • 2 in conversation