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

st: Re: qreg and boostrapping


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: Re: qreg and boostrapping
Date   Thu, 17 Oct 2002 19:44:34 -0500

Eva,

bstrap and qreg seem to work fine together.

Scott

. use `"C:\STATA/\auto.dta"', clear
(1978 Automobile Data)

. do "C:\WINDOWS\TEMP\STD020000.tmp"

. capture program drop foo_bs

. program define foo_bs
  1. version 7.0
  2. if "`1'" =="?" {
  3.         global S_1 "b_price b_gear"
  4.         exit
  5. }
  6. qreg mpg price gear for, quant(0.1)
  7.         local b_price = _b[price]
  8.         local b_gear = _b[gear]
  9.         post `1' (`b_price') (`b_gear')
 10.
. end

. bstrap foo_bs
(obs=74)

Bootstrap statistics

Variable |   Reps   Observed       Bias   Std. Err.   [95% Conf. Interval]
---------+-------------------------------------------------------------------
 b_price |     50  -.0008033   .0000844   .0002636   -.0013331 -.0002735  (N)
         |                                           -.0012535 -.0001785  (P)
         |                                           -.0012674 -.0004203 (BC)
---------+-------------------------------------------------------------------
  b_gear |     50   3.261992   1.013495   1.769136   -.2932194  6.817204  (N)
         |                                            1.389935  7.822795  (P)
         |                                            .9517974  6.860576 (BC)
-----------------------------------------------------------------------------
                              N = normal, P = percentile, BC = bias-corrected

.
end of do-file

----- Original Message -----
From: "Eva Rueckert" <[email protected]>
To: <[email protected]>
Sent: Thursday, October 17, 2002 12:16 PM
Subject: st: qreg and boostrapping


> Dear All,
> is it possible that Stata does not allow for the combination of qreg
> and btsrap? And if so, is there a way to obtain these results? The
> beginning of my non-functioning do-file looks as follows:
> ________________________________________________________
> program define Foax1
> version 7.0
> if "`1'" =="?" {
> global S_1 "com1  com2  mean_gap"
> exit
> }
> tempname o
> global list1 "educ_1 educ_2 exp exp_sq ten tensq married indust_2
> indust_3 status_1 status_2"
> qreg ln_hourly_EU_wage97 $list1 if country==2 & gender==1,
> quant(0.1)
> ________________________________________________________
>
> Thanks a lot for any useful replies.
> Eva
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Eva R�ckert
> Centre for Economic Reform and Transformation
> School of Management
> Heriot-Watt University
> Edinburgh EH14 4AS UK
> Tel. +44 (0)131 451 3625
> Fax. +44 (0)131 451 3296
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



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