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, is already up and running.

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

Re: st: comparing means of industry groups

From   Nick Cox <>
Subject   Re: st: comparing means of industry groups
Date   Sat, 29 Sep 2012 13:14:45 +0100

Whenever you are contemplating lots of pairwise t tests like this,
they will be not independent of each other.

There will be a temptation to cherry-pick the comparisons that show
strong differences.

Apart from that, the t-tests work best if there is no dependence
structure in time, which seems unlikely.

Depending on how your variable is distributed within industries, and
on the nature of time dependence,
other techniques should be much more appropriate than what you propose.

How to program it neatly in Stata is thus, in my opinion, not the main
issue confronting you.

You need to talk this through with whoever is advising you. If it is
what they recommend or instruct, you need better advice.


On Sat, Sep 29, 2012 at 12:43 PM, "Fabian Schönenberger" <> wrote:

> I am working with panel data; id=company, different variables for each company, and a time indicator t. Each company is assigned to an industry group (sic12); there are eleven different industries.
> I try to compare the means of one var for the different industries. I am interest in finding out if the means are statistically different among the industries.
> Are there any suggestions how to proceed with this analysis?
> My first approach was something like:
> ttest var if inlist(sic12,1,2),by(sic12)
> For each number of 1 to 12 (eleven is missing) the numbers in inlist(sic12,1,2) should vary:
> ttest var if inlist(sic12,1,3),by(sic12)
> ttest var if inlist(sic12,1,4),by(sic12)
> ...
> ttest var if inlist(sic12,1,12),by(sic12)
> ttest var if inlist(sic12,2,3),by(sic12)
> I have no idea how to program this.

*   For searches and help try:

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