Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: calculation 'cross differences'


From   Mario Jose <[email protected]>
To   [email protected]
Subject   st: calculation 'cross differences'
Date   Thu, 18 Apr 2013 11:59:08 +0100

Dear all,


I have a sample of companies that are subject to different tax rates,
they are owned by different parent companies. I would like to compute
differences of tax rates within each group and in the perspective of
each company. Below is an example of the database and a view of what I
would like to compute:

group company  taxrate
1                 A              15
1                 B              10
1                 C              20
2                 D              20
2                 E              15
2                 F              14
2                 G              30

The task I need to do is calculate the following regarding for
instance companies A, B and C of group 1:

A=> (15-10) + (15-20)
B=> (10-15) + (10-20)
C=> (20-15) + (20-10)

As I have thousands of companies it is a hard to do this manually, is
there any suggestion on how to handle with this calculations?

I would appreciate any help.

Best regards,
MJ
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index