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   "Airey, David C" <david.airey@vanderbilt.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Bootstrapped Paired-Samples (Dependent) T-Test
Date   Thu, 27 Jan 2011 10:59:37 -0600

.

Maybe it is easiest to form the difference variable first as below? I can't get the bootstrap to work on the regression equivalent of a paired t-test (regress mpg i.time i.pair).

clear
webuse fuel
ttest mpg1==mpg2
gen diff=mpg2-mpg1
ttest diff==0
set more off
bootstrap, rep(10000): regress diff
*
*   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