DATA Step, Macro, Functions and more

repeat same logistic model for many variables from same datafile

Reply
Occasional Contributor
Posts: 14

repeat same logistic model for many variables from same datafile

My genius folks,

 

I am trying to run the same PROC LOGISTIC for 25 variables separately. I am sure there are ways to do this by not writing 25 separate models for each variable.

 

I would appreciate if someone could help me to find a way to run a single PROC LOGISTIC for all variable.

Super User
Posts: 19,780

Re: repeat same logistic model for many variables from same datafile

Posted in reply to khalidamin

Please see this article

https://communities.sas.com/t5/SAS-Communities-Library/How-do-I-write-a-macro-to-run-multiple-regres...

 

Are all your variable the same type, ie continuous or categorical?

Occasional Contributor
Posts: 14

Re: repeat same logistic model for many variables from same datafile

mixed of both types of variable.

Super User
Posts: 19,780

Re: repeat same logistic model for many variables from same datafile

Posted in reply to khalidamin

Well, you'll have to deal with them separately, since categorical variables also need to be included in the CLASS statement. 

 

Super User
Posts: 10,023

Re: repeat same logistic model for many variables from same datafile

Posted in reply to khalidamin

CALL EXECUTE I guess.

 

data _null_;

 set sashelp.vcolumn(where=(libname='WORK' and memname='HAVE')) ;

 call execute(...........)

Ask a Question
Discussion stats
  • 4 replies
  • 230 views
  • 0 likes
  • 3 in conversation