## proc pls and logarithm

Solved
Frequent Contributor
Posts: 75

# proc pls and logarithm

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.

Accepted Solutions
Solution
‎05-28-2014 08:08 AM
Posts: 3,001

## Re: proc pls and logarithm

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

All Replies
Frequent Contributor
Posts: 75

## Re: proc pls and logarithm

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;

Solution
‎05-28-2014 08:08 AM
Posts: 3,001

## Re: proc pls and logarithm

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
Frequent Contributor
Posts: 75

## Re: proc pls and logarithm

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.

produced.

Do you have any idea why?

Cheers.

Posts: 3,001

## Re: proc pls and logarithm

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
Frequent Contributor
Posts: 75

## Re: proc pls and logarithm

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.

Frequent Contributor
Posts: 75

## Re: proc pls and logarithm

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.

🔒 This topic is solved and locked.