turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Questions on basic SAS coding for dealing with an ...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-19-2014 10:34 PM

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BytheLake

01-19-2014 11:37 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BytheLake

01-19-2014 11:46 PM

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.

.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BytheLake

01-20-2014 12:19 AM

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BytheLake

01-20-2014 12:32 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BytheLake

01-21-2014 10:04 AM

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