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: significance of differences


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: significance of differences
Date   Fri, 1 Jun 2012 07:48:01 +0100

I presume that -varquintile- is a quintile-classed division of one
variable, say x, and -var- is another variable, say y.

Without knowing any details, I wonder if this is a particularly good
test to use.

(I certainly hope that -varquintile- is _not_ a division of the same
variable, as printed significance levels surely won't apply, for
several good reasons.)

That said, Stata will do what I think you want with

ttest var if inlist(varquintile, 1, 5), by(varquintile)

Note that

ttest var if varquintile==1 == var if varquintile==5

can't be legal because no Stata command allows more than one -if- condition.

Nick

On Fri, Jun 1, 2012 at 7:26 AM, "Fabian Schönenberger" <sch.f@gmx.ch> wrote:

> I want to compare if the difference of a specific variable between the first and fifth quintile is significant.
> I tried ttest with if; ttest var if varquintile==1 == var if varquintile==5
> However, this does not work. Any suggestions?

*
*   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