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
- /
- SAS Procedures
- /
- How to calculate Modal Number?

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

08-08-2008 02:57 PM

I want to calculate the Modal Number or the highest frequency, but my data is in lines, for example

Cod | Month01 | Month02 | Month03 | Month04 | MODAL

01 | 1 | 3 | 3 | 4 | 3

02 | 1 | 2 | 3 | 4 | .

03 | 1 | 1 | 1 | 2 | 1

The value (variable) that I want to find is the MODAL, but compare the fields are not a good way to solve this problem, because my data is very large.

Someone have done something like this, or have an idea to solve this!

Thanks a lot

Cod | Month01 | Month02 | Month03 | Month04 | MODAL

01 | 1 | 3 | 3 | 4 | 3

02 | 1 | 2 | 3 | 4 | .

03 | 1 | 1 | 1 | 2 | 1

The value (variable) that I want to find is the MODAL, but compare the fields are not a good way to solve this problem, because my data is very large.

Someone have done something like this, or have an idea to solve this!

Thanks a lot

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

08-09-2008 12:30 AM

are there any number greater than 10, since if not , you can set 10 dummy (0 to 9)variable to indicated the count for each number.

another way , transpose first , then use proc freq

another way , transpose first , then use proc freq

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

08-11-2008 08:45 AM

My scores are 420 to 550...

How can I use this dummy? Because my data is very large and the transpose, is a few inviable.

How can I use this dummy? Because my data is very large and the transpose, is a few inviable.

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

08-11-2008 08:53 AM

This thread http://support.sas.com/forums/thread.jspa?messageID=10645⦕ discusses mode computation. There should be some valid ideas in it.

Olivier

Olivier