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: comparing means of industry groups


From   Nick Cox <[email protected]>
To   [email protected]
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.

Nick

On Sat, Sep 29, 2012 at 12:43 PM, "Fabian Schönenberger" <[email protected]> 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:
*   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