Statalist The Stata Listserver


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

Re: st: ttest equality of means panel data


From   "Stas Kolenikov" <[email protected]>
To   [email protected]
Subject   Re: st: ttest equality of means panel data
Date   Sun, 25 Feb 2007 21:44:32 -0600

First of all how about the normality assumption for t-test? I think
you would rather need to look at the contingency table analysis with
-tabulate/tab2 var1 var2- and then look at the independence test
results. A smarter extension of that would be to set this as a complex
sample design problem, with the units acting as clusters -- I am
pretty sure that what you have is a complex survey, anyway, so you
would want to look into those complex design issues. Otherwise, you
can

svyset id
svy: tab var1 var2

and that should have the correlation accounted for.

(I think I should stop responding to requests coming from U of W since
they have an excellent Center for Statistics in Social Sciences at
their stat department, and I should not be stealing their consulting
business ;))

On 2/25/07, [email protected] <[email protected]> wrote:
Dear Statalist subscribers,

I have an unbalanced quasi-panel data set over several years.  That is, I have
observations on some people for the entire period, but for others, for one or
more periods.  The respondents were not followed, but the sample was refreshed
with new respondents in later years.

I want to test the equality of means of var1 depending on the value of var2.
Both are dummy variables.  This is what I would do:

ttest var1, by(var2);

But, because it's a panel the observations are correlated across time - how can
I perform a ttest to account for that?  I greatly appreciate your help.
--
Stas Kolenikov
http://stas.kolenikov.name
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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