Programming the statistical procedures from SAS

Proc Logistic Predictor Variables

Occasional Contributor
Posts: 6

Proc Logistic Predictor Variables

Guys, I am trrying to do a logistic regression similar to:

proc logistic data="c:\data\binary" descending;
  class rank / param=ref ;
  model admit = gre gpa rank;

Problem is, I have hundreds of variables in my dataset.  Is there a way to not have to type them all out?

Valued Guide
Posts: 2,108

Proc Logistic Predictor Variables

On possibility is to use the "--" notation to get a number of variables that are adjacent in the dataset (do a PROC CONTENTS with the POSITION option to see the order).  If you have variables

a b c ...x y z

then you can reference all 26 as a--z

Doc Muhlbaier


Occasional Contributor
Posts: 6

Re: Proc Logistic Predictor Variables

Thanks Doc, but no such luck here...all are differently named..but I will see what the positions are..

Frequent Contributor
Posts: 75

Proc Logistic Predictor Variables

- ritam, just to clear things up

the names of the variables actually dont matter. by using the "--" notation you are including everything from the var_1-var_n

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation