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

st: RE: RE: RE: RE: RE: Bootstrapping and t-tests


From   "Siyam,AA (pgr)" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: RE: RE: Bootstrapping and t-tests
Date   Wed, 12 Jun 2002 19:09:11 +0100

My thanks to Nick Winter, and pardon me for mis-typing your name.   I have no missing values at all, I felt with such a small size sample (Obs=26) I could do  better by presenting the conventional 95% C.I. for the mean-difference and a bootstrapped (bias-corrected) one.

You are absolutely right, I could have used "summarize" or  "ci"  for that matter. 

Many thanks for your help.
Amani


-----Original Message-----
From: Nick Winter [mailto:[email protected]]
Sent: 12 June 2002 18:59
To: [email protected]
Subject: st: RE: RE: RE: RE: Bootstrapping and t-tests


> Ok, thanks to Nick Winters, I have learned something new 

By the way, it is "Winter" -- no "s" -- a pet peeve of mine.

> Warning:  Since ttest is not an estimation command or does 
> not set e(sample), bs has no way to determine
>           which observations are used in calculating the 
> statistics and so assumes that all observations
>           are used.  This means no observations will be 
> excluded from the resampling due to missing values
>           or other reasons.
>           If the assumption is not true, press Break, save 
> the data, and drop the observations that are to
>           be excluded.  Be sure the dataset in memory 
> contains only the relevant data.

On the substance, the warning means that you must ensure there are no
missing observations on your diff variable.  You can do this by typing 

	. count if diff==.

If there are any, you should drop those observations before running your
bootstrap:

	. preserve
	. drop if diff==.
	<<run bootstrap>>
	. restore

By the way, you could just use the -summarize- command, rather than the
-ttest-, if all you want is the mean.

Nick Winter

*
*   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/
*
*   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