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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1111 views
  • 0 likes
  • 3 in conversation