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
- /
- Optimize the classification of data into binomial ...

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

11-28-2012 06:18 PM

Hello,

I am hoping someone might be able give me some advice on how to write some code to solve my problem.

I have a set of data that I want to reclassify into 3 categories.

The data is a list of estimated flow of traffic for different road segments.

I want to classify this data into 3 binomial categories: low traffic, med traffic, high traffic.

Then I will use these 3 dummy variables in a regression model to predict locations of known flow.

so it will be set up as follows:

knownflow= low traffic + med traffic + high traffic

What I am trying to do is figure out a way to optimize the classification of the estimated flow data (that match up with the known flow data) to maximize the predictability of the model.

I an using this regression model as a way to validate the classification of the data into the three groups.

I was hoping someone might have a suggestion how to set up a macro to run numerous regression models using different classifications of the estimated flow data

OR

A way to optimize the classification of the data first and then run a model.

Thank you for the help!

Scott

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

Posted in reply to sbennet

11-29-2012 11:10 AM

First note: three categories is not binomial. By definition binomial is 2.

What will your rule be for considering the classifications "optimized"?

My first cut at this problem would be to look at the 1st and 3rd quartiles with values below the first as low and above third as high. Proc means or summary will give you these by asking for Q1 and Q3.

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

Posted in reply to ballardw

11-29-2012 01:40 PM

Sorry about the confusion. I will set each of the variables up as a dummy variable.

I have already run a proc means as you suggested and used the 1st and 3rd quartiles.

I think the best way to determine an optimized classification is to set up a macro that will use different quartiles (systematically) to adjust the classification of the data into the different variables and then use those variables as the independent variables in a regression.

The resulting adjusted r squared values for each model will be used to determine what classification of the variables works best for matching up the categorized estimated flow data to the actual flow data.