Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

If you want to convert continuous data into categorical data in SAS, can you just use formats? Or does formats not change the actual variable?

share|improve this question
1  
Look at the 'put' and 'input' functions. – ocram Apr 18 '12 at 15:20
2  
Others on CV are more expert in SAS than I, so I'll let them field your question. But I want to note here that it is almost always a bad idea to categorize continuous data. If that isn't obvious at first glance, you may want to read an answer I wrote to a different question where I discussed some of those issues. – gung Apr 18 '12 at 15:20
@ocram: But isn't creating your own formats enough? – sas user Apr 18 '12 at 15:26
2  
A format only alters the appearance of the variable, not its class. What kind of data do you have that you are trying to take from continuous to categorical? Are you binning it? What's the range and spread of the continuous data? – TARehman Apr 18 '12 at 16:00

closed as not a real question by Andy W, whuber May 10 '12 at 17:55

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

How exactly do you want to convert the data? Are you trying to categorize it as @TARehman mentioned?

As far as I know, you should only convert your continuous data to categorical data with caution if it's really necessary (e.g. chi-square test). If you are indeed trying to categorize (bin) your continuous variable into categorical variable, a careful preliminary analysis should be conducted because the range and spread may alter and be sensitive to test statistics.

Back to your question, as @TARehman mentioned, SAS format function will only change the attribute of the variable.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.