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
- /
- Code for test of proportion

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

05-02-2012 01:01 PM

Hello Everyone,

I have a set of firms which I divided into three categories- 1, 2, and 3- based on their special characteristics. For each category, I have some information like sales, profit, and so on. I want to test the difference in proportion for this sample. In other words, I want to test whether the total sales in Group 1 is significantly different from Group 2 and 3. The data I have is as follows:

Group sales profit

1 100 20

2 150 10

3 120 40

I would appreciate if someone shares the code that will help me do the desired analysis.

Thank you.

Accepted Solutions

Solution

05-03-2012
12:29 AM

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

05-03-2012 12:29 AM

Are you calling some statistical method ?

If you want multi-comparion , Check out proc glm + lsmeans .

Note: these all is based on Normal Data.

Ksharp

All Replies

Solution

05-03-2012
12:29 AM

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

05-03-2012 12:29 AM

Are you calling some statistical method ?

If you want multi-comparion , Check out proc glm + lsmeans .

Note: these all is based on Normal Data.

Ksharp

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

05-03-2012 07:22 AM

It looks like you have removed all the variability in each group by summing within the group. With only three groups and no replication within group, an analysis of variance approach (say PROC GLM) will not work, as there are no degrees of freedom left for error--they are all used up in the numerator.

Rather than summing, what about just classifying the individual firms into groups? Working backwards from your summary data, what if you had something like:

data one;

input firmid firmclass sales profit;

datalines;

1 1 30 10

2 1 50 30

3 1 20 -20

4 2 60 0

5 2 90 10

6 3 50 10

7 3 40 20

8 3 30 10

;

proc glm data=one;

class firmclass;

model sales profit=firmclass;

lsmeans firmclass/pdiff stderr cl;

quit;

run;

This would implement Ksharp's suggestion, and provide tests about the marginal means of sales and profits. Unfortunately, if you are truly interested in testing for differences in the totals of these variables, you need to have some sort of replication that is not readily apparent in your summary dataset.

Steve Denham