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

st: Shuffling of data in ttest bootstrapping


From   "Michael Malette" <[email protected]>
To   <[email protected]>
Subject   st: Shuffling of data in ttest bootstrapping
Date   Thu, 15 Jul 2004 10:20:46 -0400

Dear Statalisters:

I have a question about the bootstrapping command.  I'm trying to
compare 2 means from populations with different sample sizes (n=400,
n=3000) using a t-test.  The bootstrapping command should shuffle data
and generate t-values after each shuffle.  This leads me to my question,
how does stata shuffle the data.  

Does it take an equal subsample from each population (n=200 of the 400
and n=200 of the 3000) and calculate t or does it take an overall
subsample with an unequal number from each population (n=100 of 400 and
n=300 of 3000)? 

This is the syntax that we are using: 
program define TTestBoot      
version 8.2      
args AHI FWIN      
ttest AHI == FWIN, unpaired
end      

use "H:\ahifwin.dta", clear 
bootstrap "TTestBoot AHI FWIN" T=r(t), reps(1000) saving
("H:\work\test.dta")  

Any help would be appreciated. 

Thanks. 

Michael Malette
*
*   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