Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Bootstrapped Paired-Samples (Dependent) T-Test

From   Nick Cox <>
Subject   Re: st: Bootstrapped Paired-Samples (Dependent) T-Test
Date   Thu, 27 Jan 2011 17:11:49 +0000

With this structure you'll have to -reshape wide- to use -ttest- for
the paired case. That's what I'm assuming. I don't know how else you
were thinking of doing the test.


On Thu, Jan 27, 2011 at 4:58 PM, Hartman, Rob <> wrote:

> Right, I think we are on the same page, but just to clarify: The issue here is that since the predictor variable is binary status in the matched pair (e.g., are you the pre or the post score for case 39), the data would be in long format with the two members of each matched pair falling in separate rows with an id variable indicating their shared membership in a common pair.  The data found via sysuse bplong are illustrative. So, I believe this would need to be long format w/ resampling of clusters, but perhaps I'm missing something.
> Pair    Score   PrePost
> 1       .8      0
> 1       .61     1
> 2       .4      1
> 2       .3      0
> ...
> 54      .9      1
> 54      .4      0

Nick Cox

> I don't see a difference or a difficulty. Bootstrapping resamples from
> a set of observations (cases, records, rows in dataset) and paired
> values for two variables remain paired.

> On Thu, Jan 27, 2011 at 3:42 PM, Hartman, Rob <> wrote:

>> I want to apply bootstrapping to a paired samples t-test.  I'm not aware of a straightforward application of this in Stata.  My impulse is to treat the t-test as a special case of regression, and thus use regress with a dummy predictor and bootstrapping of clustered standard errors, where the clustering is on the particular matched pair.
>> Is there a reason why this does not make sense in principle or would not work in practice? Any other workarounds? Am I making it harder than it has to be?

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index