[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Bootstrapping confidence interval of mean difference

From   "Matt Spittal" <[email protected]>
To   <[email protected]>
Subject   st: RE: Bootstrapping confidence interval of mean difference
Date   Mon, 18 Aug 2008 11:06:52 +1000

Hi Susan,

An equivalent method would be to use linear regression with dummy coding for the treatment groups.  Ignoring the issue of bootstrapping, in Stata this would be:

	sysuse auto, clear
	xi: regress weight i.foreign

where -xi- expands terms containing categorical variables into indicator variables, and -i.foreign- is the indicator of treatment assignment.  If you type

	ttest weight, by(foreign)

you can see the estimate of the mean difference is the same as the beta for _Iforeign_1 from the regression.

To bootstrap the standard errors type

	xi: bootstrap, seed(12345) reps(100): regress weight i.foreign

which will give the confidence intervals you desire. Setting the seed ensures that you can reproduce the results later. The -reps- command sets the number of repetitions.

-- Matt
[email protected]

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Susan Maree Cotton
Sent: Monday, 18 August 2008 10:48 AM
To: [email protected]
Subject: st: Bootstrapping confidence interval of mean difference
Importance: High

Hi All,
I have data from a randomized clinical trial with intervention and treatment as usual groups. The outcome data is cost-effectiveness data. Reviewers of a manuscript pertaining to data from this trial have requested that the bootstrapped confidence interval of the mean difference between groups be reported.   
I am a new user to STATA and have been having difficulties determining the correct commands to generate these confidence intervals.  I have worked out how to bootstrapping for the confidence intervals of the means for the two groups separately and to bootstrap the t-distribution pertaining to difference between groups but cannot work out the confidence interval for mean difference.  Please help!!
Thanks in advance.
Dr Sue Cotton 
Senior Research Fellow 
ORYGEN Research Centre
Department of Psychiatry
University of Melbourne
Locked Bag 10 (35 Poplar Road) 
Parkville Victoria 
Australia 3052
Phone: +61 3 9342-2859
Fax:      +61 3 9342-2941
Mobile:  0407-340-115
[email protected] 

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index