Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ttest var1==var2 for clustered data

From   Christian Hunkler <>
Subject   Re: st: ttest var1==var2 for clustered data
Date   Tue, 22 Mar 2005 14:49:13 +0100

Dear Rich,

The problem is, we want to perform a mean comparison between two variables
(paired t-test) and not between two subgroups. The syntax without adjusting
for the clustering is  "ttest var1=var2", thus using inflated degrees of
freedom, 'cause no adjustment for the clustering of the data is possible.
In contrast performing the test with a disaggregated file would result in
deflated degrees of freedom...
For our group comparisons we exactly use your proposition.


At 22:02 21.03.2005, you wrote:
>a t-test is a simple regression where the only predictor is the dummy
>variable identifying the groups -- so, put the two variables into one long
>variable; add a group identifier and use regression with the cluster option
>Christian Hunkler wrote:
>>we have network data clustered around egos. Now we want to test for mean
>>differences in variables that contain proxy information provided by ego
>>about their alteri. In short a t-test comparison of two variables, but the
>>observations are not independent but clustered.
>>I already checked the clttest ado, but it does not yet support comparison
>>of two variables.
>>Any ideas, suggestions?
>*   For searches and help try:

0049-621-1664642   (tagsüber)
0049-176-24543728 (mobil)

*   For searches and help try:

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