Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: grouping data

From   "Clive Nicholas" <>
Subject   Re: st: Re: grouping data
Date   Thu, 19 Jan 2006 22:33:17 -0000 (GMT)

Mindy Nitkin wrote:

> I am using a database that gives information about the characteristics
> of individual directors on boards of directors. (ie experience, age,
> gender, etc).
> I would like to create a firm level metric of board characteristics by
> combining the data for individual directors. For example, total number
> of directors by firm, total number of independent directors by firm,
> total number of women directors by firm.

I can't see how your data is arrayed, but what I think you're looking for
is something like this:

. egen totdirs = total(directors), by(firm)

from which you can take it from there. Note also the -egen, group()-
option if you want to summarize values by firm _plus_ something else.

See -whelp egen- for more. For an additional arsenal of -egen- functions,
look at Nick Cox's -egenmore-, downloadable from SSC.

Hope that helps.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e:
Newcastle University  |

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index