BookmarkSubscribeRSS Feed
ritam2011
Calcite | Level 5

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;
run;

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

3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12

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

Duke

ritam2011
Calcite | Level 5

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

trekvana
Calcite | Level 5

- 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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1265 views
  • 0 likes
  • 3 in conversation