Learning SAS? Welcome to the exclusive online community for all SAS learners.

how to include all the dataset variables into model in PROC LOGISTIC

Reply
Learner
Posts: 1

how to include all the dataset variables into model in PROC LOGISTIC

In R, we can simply perform a logistic regression for one categorical variable to all other availables as below:

model <- glm(y ~ ., data = d)

But I am stuck on how to do the same logistic regression in SAS. Simply do

Proc logistic data=d;
model y=_all_;
run;

is not right, since _all_ also includes y. It would be really appreciated if anyone have a better idea.

 

Regular Contributor
Posts: 212

Re: how to include all the dataset variables into model in PROC LOGISTIC

http://www.ats.ucla.edu/stat/sas/seminars/sas_logistic/logistic1.htm

 

Found this out of SAS Website.

See if this works.

Ask a Question
Discussion stats
  • 1 reply
  • 307 views
  • 0 likes
  • 2 in conversation