Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: RE: RE: RE: problem with commands


From   "Vassilopoulos Achilleas" <vassilopoulos.statalist@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: RE: RE: problem with commands
Date   Mon, 13 Sep 2010 15:50:50 +0300

Crysa - the only thing that differs between what you are writing and the
commands is the "but they differ in the 3rd digit" in c. I have not
incorporated this part in the commands since I didn't see any sic_mother
being the exact same with sic_sub in the piece of data you've posted in your
very first e-mail. I'm sorry if this was the reason for your trouble. 
Anyway, following is my suggestion but keep in mind that it will make a
difference only if you have any subsidiaries with the same sic as their
mothers (in all three digits):


replace this command :

count if (year_inc_sub<=`y') & (twosic_moth==twosic_sub)

with that one:

count if (year_inc_sub<=`y') & (twosic_moth==twosic_sub) &
(sic_sub!=sic_mother)

and leave everything else unchanged.

If you still get the same results (i.e. 3 for all observations), I would
strongly recommend that you carefully examine your data. Do some
calculations by hand to make sure that it is not indeed 3 for all.

Hope this helps,
_____________ - _______________

Achilleas Vassilopoulos

Agricultural University of Athens,
Dept. of Agricultural Economics and Rural Development,
Lab. of Political Economy and European Integration.
Iera Odos 75, 11855, Athens, Greece

Tel: (+30) 210-5294726
Fax: (+30) 2105294786
e-mail : avassilopoulos.aua@gmail.com  

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of ???s???a
G?a?????p?????
Sent: Monday, September 13, 2010 12:44 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: RE: RE: RE: problem with commands

Dear Statalisters,

Based on my previous e.mails, I would like to thank you for the help.
I let you know that finally, I have the variable 'year'  years from
1990-2005 in a sequence.

Unfortunately, another problem which still remains has to do with the
estimation of diversification variable.

The diversification variable should be created under the following logic:
For observation in year 1990 the value of diversification should be
the sum of a, b, and c below:

a) take the total number of subsidiary companies which were
incorporated in 1990 or earlier whose 1st digit of sic_sub is
different than the 1st digit of sic_mother and multiply them by 3;
divide this number by the total number of companies which where
incorporated in 1990 or earlier (in the example, the total number of
companies existing in 1990 is 4)

b) take the total number of subsidiary companies which were
incorporated in 1990 or earlier for which only the 1st digit of their
sic_sub is the same as the 1st digit of sic_mother and multiply them
by 2; divide this number by the total number of companies which where
incorporated in 1990 or earlier

c) take the total number of subsidiary companies which were
incorporated in 1990 or earlier, whose 1st and 2nd digits of sic_sub
are the same as the 1st and 2nd digits of sic_mother but they differ
in the 3rd digit, and multiply them by 1, divide this number by the
total number of companies which where incorporated in 1990 or earlier

As you see below,  my results look like:

 +-------------------------+
    | id_mot~r   year   diver |
    |-------------------------|
 1. |        X   1990       3 |
 2. |        X   1991       3 |
 3. |        X   1992       3 |
 4. |        X   1993       3 |
 5. |        X   1994       3 |
    |-------------------------|
 6. |        X    1995        3 |
 7. |        X   1996         3 |
 8. |        X    1997        3 |
 9. |        X   1998        3 |
10. |        X   1999       3 |
  . .....
        |-------------------------|
11.. |        X   2005       3 |
    +-------------------------+


The diversification variable has always the value '3'. This is not true,
indeed.
I suppose that there is an error in this part of the command which you
suggested me:

**********************
scalar a=scalar(digit)*3/scalar(total)
count if (year_inc_sub<=`y') & (firstsic_moth==firstsic_sub)
scalar digit2=r(N)
scalar b=scalar(digit2)*2/scalar(total)
count if (year_inc_sub<=`y') & (twosic_moth==twosic_sub)
scalar digit3=r(N)
scalar c=scalar(digit3)*1/scalar(total)

***********************

Especially, I feel that something is wrong in the part "scalar
c=scalar(digit3)*1/scalar(total)" but I cant correct it.

Any suggestions?

Thank you very much ,again, for consideration!

Chrysa






*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index