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: significance of differences
From
Nick Cox <[email protected]>
To
[email protected]
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" <[email protected]> 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/