Bookmark and Share

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: Bootstrapped Paired-Samples (Dependent) T-Test


From   "Hartman, Rob" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: Bootstrapped Paired-Samples (Dependent) T-Test
Date   Thu, 27 Jan 2011 12:28:43 -0500

My original objective was to employ bootstrapping, and as far as I know, you can't employ bootstrapping in a paired t-test context.  If there is a way, and I'm just confused on how to apply the bootstrapping syntax: (1) apologies, (2) I welcome a tip on the syntax.

Beyond that, my plan was to use the third regression approach below (w/ more reps).

set seed 123

sysuse bplong, clear

regress bp when

regress bp when, cluster(patient)

regress bp when, cluster(patient) vce(bootstrap (_b[when]),rep(10) seed(123)) nodots


Rob Hartman, PhD
Applied Psychologist
The MITRE Corporation
Social, Behavioral, and Linguistic Sciences
Office: 614-447-3441 
Cell: 571-327-4714
 


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: Thursday, January 27, 2011 12:12 PM
To: [email protected]
Subject: Re: st: Bootstrapped Paired-Samples (Dependent) T-Test

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.

Nick

On Thu, Jan 27, 2011 at 4:58 PM, Hartman, Rob <[email protected]> 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 <[email protected]> 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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index