BookmarkSubscribeRSS Feed
aungpyaemcc0
Calcite | Level 5

How can I indicate each type of attribute in data-set to find nominal, ordinal, interval and ratio values? The data-set is attached as in attachment.

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Sorry, really not following you.  Do you mean hos do you import that data with given formats/informats/lengths etc?  If so start with a simple proc import step, this will guess at your data and write to the log a datastep.  You can take that generated code and then modify it to give correct formats/lengths/informats.  The code will look like:

data want;
  infile "c:/autism-child-data.csv" dlm=",";
  informat ...;
  format ...;
  length ...;
  label ...;
  input ...;
run;

Of course the elipses will be replaced by the lists of variables in your data.

Astounding
PROC Star

Within SAS data sets, there is no such distinction.  SAS variables are either character or numeric ... the only possible choices.

 

You can analyze the data with a SAS program to determine some of those characteristics.  However, you need to set up your own definitions.  For example, you might define that a variable which only takes on integer values, and takes on fewer than 10 different values, is ordinal.  But those definitions are up to you.  Once you have the definitions in place, you might be able to write a program to see which variables fit those definitions.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1498 views
  • 0 likes
  • 3 in conversation