BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
PaigeMiller
Diamond | Level 26

In my pre-Viya career, I have used PROC LOGISTIC a lot. Now, I have access to SAS Viya, and I note that there are (at least) two ways to do logistic regression in Viya, specifically PROC LOGSELECT and the regression.logistic action.

 

So, the obvious question is: when should I use PROC LOGSELECT, and when should I use the regression.logistic action. I point out that I'm not worried about the numerical accuracy of the results, I'm sure SAS has done the proper testing and so if I run it both ways (selecting equivalent options in each) I will get the same answer. My question is really when do I use one versus the other? And: what are the advantages and disadvantages of each?

--
Paige Miller
1 ACCEPTED SOLUTION

Accepted Solutions
StaceySyphus
SAS Employee

The first key concept to be aware of is that SAS Viya includes 2 servers - the Compute server and SAS Cloud Analytics Services or CAS.  The Compute server is just like the SAS 9 workspace server. The same code you ran in SAS 9 will run in Viya on the Compute server. CAS is the high-performance server that allows you to do parallel processing in-memory data. To run things in CAS, you can either use CAS-enabled Procs or CASL, which is the native language of the CAS server. CAS-Enabled Procs are translated behind the scenes into CASL before submitting to CAS for execution. 

 

Regarding your specific question about logistic regression, you can still run your familiar PROC LOGISTIC in Viya, and it will execute on the Compute server. If processing speed is an issue for large data or complex models, then you may want to run your analysis in CAS.  In that case, you could either use PROC LOGSELECT or write the native CASL code, which would include the regression.logistic CAS action. The advantage of using PROC LOGSELECT is primarily that the syntax is very familiar to experienced SAS programmers. Advantages of writing CASL is that the syntax is more familiar to Python programmers, and CASL may be slightly faster than the CAS proc because you skip the behind-the-scenes conversion to the corresponding CAS action(s). But ultimately you should get the same results. 

View solution in original post

2 REPLIES 2
yabwon
Onyx | Level 15

As far as I understood last BASUG webinar about migrating from SAS 9 to Viya ( @StaceySyphus  ) the "Viya 4GL code" is translated under the hood to CAS actions (video: https://www.basug.org/videos?wix-vod-video-id=1f66ce41bddf49768bdb2cfb5b638b04&wix-vod-comp-id=comp-... ) I think Stacey would be the person to ask/confirm.

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



StaceySyphus
SAS Employee

The first key concept to be aware of is that SAS Viya includes 2 servers - the Compute server and SAS Cloud Analytics Services or CAS.  The Compute server is just like the SAS 9 workspace server. The same code you ran in SAS 9 will run in Viya on the Compute server. CAS is the high-performance server that allows you to do parallel processing in-memory data. To run things in CAS, you can either use CAS-enabled Procs or CASL, which is the native language of the CAS server. CAS-Enabled Procs are translated behind the scenes into CASL before submitting to CAS for execution. 

 

Regarding your specific question about logistic regression, you can still run your familiar PROC LOGISTIC in Viya, and it will execute on the Compute server. If processing speed is an issue for large data or complex models, then you may want to run your analysis in CAS.  In that case, you could either use PROC LOGSELECT or write the native CASL code, which would include the regression.logistic CAS action. The advantage of using PROC LOGSELECT is primarily that the syntax is very familiar to experienced SAS programmers. Advantages of writing CASL is that the syntax is more familiar to Python programmers, and CASL may be slightly faster than the CAS proc because you skip the behind-the-scenes conversion to the corresponding CAS action(s). But ultimately you should get the same results. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Discussion stats
  • 2 replies
  • 1015 views
  • 6 likes
  • 3 in conversation