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

st: bootstrapping


From   [email protected]
To   [email protected]
Subject   st: bootstrapping
Date   Wed, 07 May 2003 12:09:56 +0100

Dear statalists,

I would like to get confindence interval of my estimates via bootstrapping method. I want to run a nested logit model and my dataset has 3 alternatives such as C:keeping current policy (baseline group), A:protection policy (1), B:protection policy (2). I run nested logit model and get the results. Then, I would like to bootstrap my estimates of coefficients. I set up bootstrapping using bs command as follows. However, it did not appear any result. Please check my command and tell me how to correct this for bootstrapping. Thanks in advance.


Hanseung Kum


use "F:\Ph.d\fulldatafinal.dta", clear

. gen grp = group(2560)

. sort grp

. by grp: gen policy=_n-1

. label define plab 0 "A" 1 "B" 2 "C"

. label value policy plab

. nlogitgen type = policy(current: 2, protection: 0| 1|)
new variable type is generated with 2 groups
lb_type:
1 current
2 protection

. nlogittree policy type

tree structure specified for the nested logit model

top-->bottom

type policy
------------------------
current C
protection A
B

. nlogit choice (policy = asc_a self pop field flood tax) (type = asc_ab sexd imp1d factord imp0d fpd marriagd edud rurald logincd), gro

up(grp) ivc(current=1)
tree structure specified for the nested logit model

top-->bottom

type policy
------------------------
current C
protection A
B

User defined constraint(s):
1000: [current]_cons = 1

initial: log likelihood = -2268.5689
rescale: log likelihood = -2268.5689
rescale eq: log likelihood = -2255.7081
Iteration 0: log likelihood = -2334.7989 (not concave)
Iteration 1: log likelihood = -2238.8638
Iteration 2: log likelihood = -2209.5625
Iteration 3: log likelihood = -2208.357
Iteration 4: log likelihood = -2207.7547
Iteration 5: log likelihood = -2207.5934
Iteration 6: log likelihood = -2207.5902
Iteration 7: log likelihood = -2207.5902

Nested logit
Levels = 2 Number of obs = 7680
Dependent variable = choice LR chi2(17) = 1209.715
Log likelihood = -2207.5902 Prob > chi2 = 0.0000

---------------------------------------------------------------------------
---
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+-------------------------------------------------------------
---
policy |
asc_a | -.3044942 .0648184 -4.70 0.000 -.431536 -.1774525
self | .0037827 .0037277 1.01 0.310 -.0035234 .0110889
pop | -.1091335 .0218872 -4.99 0.000 -.1520316 -.0662354
field | -.0086041 .0011962 -7.19 0.000 -.0109487 -.0062595
flood | .0023443 .0088254 0.27 0.791 -.0149532 .0196418
tax | -.207383 .0101394 -20.45 0.000 -.2272558 -.1875103
-------------+-------------------------------------------------------------
---
type |
asc_ab | 1.234788 .7000819 1.76 0.078 -.1373474 2.606923
sexd | .1977326 .0925133 2.14 0.033 .0164098 .3790554
imp1d | -.5137414 .0623688 -8.24 0.000 -.6359819 -.3915009
factord | .3668055 .1024791 3.58 0.000 .1659502 .5676608
imp0d | .3175041 .1090377 2.91 0.004 .1037942 .531214
fpd | .7241194 .1021852 7.09 0.000 .5238402 .9243986
marriagd | -.6216249 .1189533 -5.23 0.000 -.854769 -.3884807
edud | .0849357 .0200909 4.23 0.000 .0455581 .1243132
rurald | .0168562 .0051821 3.25 0.001 .0066995 .0270129
logincd | -.5669557 .2322811 -2.44 0.015 -1.022218 -.1116931
-------------+-------------------------------------------------------------
---
(IV params) |
|
type |
/current | 1 . . . . .
/protect | .6517235 .0615388 10.59 0.000 .5311097 .7723374
---------------------------------------------------------------------------
---
LR test of homoskedasticity (iv = 1): chi2(1)= 24.04 Prob > chi2 = 0.0000
---------------------------------------------------------------------------
---

. gen grid = grp

. bs "nlogit choice (policy = asc_a self pop field flood tax) (type = asc_ab sexd imp1d factord imp0d fpd marriagd edud rurald logincd),

group(grid) ivc(current=1)" "_b[self] _b[pop] _b[field] _b[flood]
_b[tax]", reps(200) cluster(grp) idcluster(grid)

command: nlogit choice (policy = asc_a self pop field flood tax) (type = asc_ab sexd imp1d factord imp0d fpd marriagd edud rurald lo

gincd), group(grid) ivc(current=1)
statistics:  _b[self] _b[pop] _b[field] _b[flood] _b[tax]



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