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]

Re: st: Create tables in stata


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Create tables in stata
Date   Tue, 21 Jan 2014 11:15:13 +0000

Same advice plus

http://www.stata-journal.com/article.html?article=dm0042 (link leads
to downloadable .pdf).

Nick
[email protected]


On 21 January 2014 10:00, Torsten Häberle <[email protected]> wrote:
> Sorry Nick! Again:
>
>     Date        Firms        Firm value      Industry Code
> 1 Jan 85
> 2 Jan 85
> 3 Jan 85      FirmX            2                  9304
> 4 Jan 85
> 5 Jan 85      FirmY            4                  2342
> ...
>
> I wanna create the following table:
>
> year    NF     AFV     TFV   NDI    NSI
>
> 1985    2         3           6       2         0
> 1986
> 1987
> 1988
> 1989
>
> NF = Number of Firms in year 1985 (count the "names").
> AFV = Average firm value in 1985 (4+2/2 = 3)
> TFV = Total firm value in 1985 (4+2=6)
> NDI = Number of different Industry Codes (two different industry codes
> in '85 = 2)
> NSI = Number of same Industry Codes in '85 = 0, because they are not the same
>
> 2014/1/21 Nick Cox <[email protected]>:

>> I think you're assuming some knowledge of business definitions here.
>> This list cuts across people of all disciplines (and of none).
>>
>> Also, if your data value really is "2 Mio." that can only be a string
>> value, and you will have a hard time summarizing the corresponding
>> variable numerically.
>>
>> Broadly, the easiest way to approach this by thinking that you will
>> get some of the way by a -collapse, by(year)-. But some of the columns
>> in your table will have to be created before you -collapse-.

>> Nick
>> [email protected]
>>
>>
>> On 21 January 2014 09:35, Torsten Häberle <[email protected]> wrote:
>>> Sorry, the table is bad. Again:
>>>
>>> DailyDate     IPO            Offering value      SIC Code
>>> 1 Jan 85
>>> 2 Jan 85
>>> 3 Jan 85      Firm X          2 Mio.                   9304
>>> 4 Jan 85
>>> 5 Jan 85      Firm Y          4 Mio.                    2342
>>> ...
>>>
>>> I wanna create the following table:
>>>
>>> year  No. of IPOs     Average           Total           No. of diff.   No. of
>>>                               offering value offering value    SIC
>>>     same SIC
>>> 1985    2 (X&Y)           3 Mio.            6 Mio.              2
>>>           0
>>> 1986
>>> 1987
>>> 1988
>>> 1989
>>>         Count firm names
>>>        (One name=One IPO)
>>>
>>>
>>> 2014/1/21 Torsten Häberle <[email protected]>:
>>>> Hey guys,
>>>>
>>>> I am about to create my first table in Stata. Would appreciate some
>>>> starting help!
>>>> I have daily data and want to create a table that kind of summarizes
>>>> the data by year. It looks like this:
>>>>
>>>> DailyDate     IPO            Offering value      SIC Code
>>>> 1 Jan 85
>>>> 2 Jan 85
>>>> 3 Jan 85      Firm X          2 Mio.                   9304
>>>> 4 Jan 85
>>>> 5 Jan 85      Firm Y          4 Mio.                    2342
>>>> ...
>>>>
>>>> I wanna create the following table:
>>>>
>>>> year          Number of IPOs          Average             Total
>>>>          No. of different     No. of
>>>>                                                   offering value
>>>> offering value            SIC                same SIC
>>>> 1985                  2 (X&Y)                   3 Mio.              6
>>>> Mio.                        2                   0
>>>> 1986
>>>> 1987
>>>> 1988
>>>> 1989
>>>>                   Count firm names
>>>>                   (One name=One IPO)
>>>>
>>>> Can someone give me some input?

*
*   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