BookmarkSubscribeRSS Feed
BytheLake
Calcite | Level 5

Okay, we have several factors such as SEX, INCOME, SMOKING, and EDUCATION, and let's say that I am trying to evaluate the bivariate assocation between WEIGHT AS AN *ORDINAL* VARIABLE and mortality. I am supposed to use if/then/else statement and make categories for WEIGHT, but I am supposed to treat it as an ordinal variable, instead of treating as a continuous variable. What does it mean by treating my WEIGHT variable as an ordinal variable and recode it with if/then/else statement?

I understand what continuous (Tenperature, time of day, zero doesn't mean the missing value, weight, height and age)  and ordinal (i.e. grades, levels of agreement (disagree/strongly disagree. etc *interval* not the same)  variables mean. I know how to categorize with IF/THEN/ELSE statement.

Now, How do I order SAS to treat the WEIGHT variable as an ordinal variable?

5 REPLIES 5
RichardinOz
Quartz | Level 8

Treating weight as an ordinal varaible would mean assigning ordered categories of weight that are not (necessarily) linear functions of weight.

My suggestion would be to use Proc Rank to split the population into deciles and assign each one a category number.  Other strategies might give somewhat different results.  I doubt there is one "right " way to do this.

Richard

art297
Opal | Level 21

Bythe,

I'm not a statistician, but I may be able to answer your question anyhow, kindof, sortof.

You mentioned levels of agreement as a comparison and that happens to be an interesting one to compare with.

Many researchers would consider a likert-type scale as being one level above ordinal, namely one with equal appearing intervals and use that logic to allow them to use parametric statistics in analyses where that variable is used as either a dependent measure or a measure in some type of modelling.

You don't (I don't think) have to tell SAS any variable's level of measurement, but you (or more specifically, the analysts) are responsible for insuring that the collection of measures included meet the assumptions of the particular test being used to conduct the analysis.

.

BytheLake
Calcite | Level 5

Another puzzling thing is that the dataset does not have a WEIGHT column, and I am supposed to treat it like an ordinal variable. How do I make SAS to read the variable if the dataset does not have the weight column?

art297
Opal | Level 21

You will have to ask where you are supposed to obtain subjects' weights.  I'd presume they are in another dataset that will have to be merged with the dataset that you currently have.

Rick_SAS
SAS Super FREQ

This process of converting a continuous variable to a discrete variable is known as "discretizing," and there is a big literature about how to do it (and why you might not want to!).  For an introduction, see David Pasta's paper: http://support.sas.com/resources/papers/proceedings09/248-2009.pdf

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 602 views
  • 0 likes
  • 4 in conversation