05-02-2012 01:01 PM
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.
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:
input firmid firmclass sales profit;
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;
model sales profit=firmclass;
lsmeans firmclass/pdiff stderr cl;
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.
Need further help from the community? Please ask a new question.