--- [email protected] wrote:
> I have two models the first one is
> y=x1+x2+x3
> the second one
> is
> y=x1+x2+x3+x4
> I need to bootstrap the standard errors of the
> coefficient that I get as the difference (_b(x3)-_b(x3)) that is the
> difference in the coefficient of the same regressor in the two
> different regressions, may you help me how to do that? I need a
> bootstrap of the standard errors I'm not interested in the bootstrap
> of the coefficients.
Is this what you are looking for?
*---------- begin example -------------
sysuse auto, clear
capture program drop boo
program boo, rclass
reg pr mpg
est store a
reg pr mpg for
est store b
suest a b
lincom [a_mean]_b[mpg]-[b_mean]_b[mpg]
return scalar diffse = r(se)
end
bootstrap diffse=r(diffse), reps(100) : boo
*----------- end example --------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* 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/