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: Table with more than 2 differant variables as columns variables


From   "Jean-Marie Meier" <[email protected]>
To   [email protected]
Subject   Re: st: Table with more than 2 differant variables as columns variables
Date   Sat, 7 May 2011 19:16:39 +0200 (CEST)

Thanks a lot for your help Nick!

I solved it with

collapse (sum) variables, by(year)

Kind regards,

Jean-Marie

-----Ursprüngliche Nachricht-----
Von: "Nick Cox" <[email protected]>
Gesendet: 07.05.2011 18:33:22
An: "[email protected]" <[email protected]>
Betreff: Re: st: Table with more than 2 differant variables as columns variables

>Consider -collapse- of your data over variables and by years. Then -
>list- the data.
>
>Nick
>
>On 7 May 2011, at 17:26, "Jean-Marie Meier" <[email protected]>
>wrote:
>
>> Hi,
>>
>> for my current project I want to create a table which gives an
>> impression of my data set (I am working on an M&A topic in Corporate
>> Finance).
>>
>> The table shall look the following:
>>
>> in the rows are the different years
>>
>> in the culumns are dummy or categorical variables (like friendly/
>> hostile takveover, tender, cash as payment, stock as payment)
>>
>> e.g.
>>
>>
>> Year Total Observations Friendly hostile
>> tender cash .... further variables
>>
>> 1980 204 160
>> 44 50 123
>> 1981 352 251
>> 101 43 243
>> 1982 ...
>>
>> I spent 2 hours reviewing the table functions in stata, but somehow
>> I do not get the desired result. I am only able to get something
>> with one row and column variable each or with one row variable and
>> two dummy variables in the form
>>
>> tenderoffer and hostile
>> ---- 0 --- ---- 1 ---
>> 0 1 0 1
>>
>> It would be great if someone has an approach to tackle
>*
>* 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/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index