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


From   "Jean-Marie Meier" <jean-marie.meier@web.de>
To   statalist@hsphsun2.harvard.edu
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" <njcoxstata@gmail.com>
Gesendet: 07.05.2011 18:33:22
An: "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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" <jean-marie.meier@web.de>
>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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index