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

Re: st: bsample


From   uctpmtd <[email protected]>
To   [email protected]
Subject   Re: st: bsample
Date   Tue, 24 Jun 2003 18:19:06 +0100 (BST)

I have as well a problem relating to -bsample- . I am using Stata 7.

Given that -clogit- doesn't have the option of clustered standard errors, I
performed bootstrap to correct them.

This is the code:

#delimit;
set more 1;
set matsize 800;
set seed 1;

bs "clogit choice private public time cost distpri distpub incpri incpub, 
 group(id)" "_b[time] _b[cost] _b[distpri] _b[distpub] _b[incpri] _b[incpub]", 
 cluster(area) reps(0) saving(bsclog) replace;

I got my results, but it took Stata 2 hours to compute the se with 0
replications, and 6 hours with 200 replications. -clogit- on the same data
(456399 obs when arranged in the long format) takes 1mn to run and I'm running 
it on the University network. When I included the controls, it took Stata 1
month to compute the se, for a model it takes 13mn to run with clogit!!!!!

I went a that point to try and check what was making it so slow, and decided to
draw the random sample manually, then do -clogit-. 

This is the code for 1 draw only: (I'm planning to do a loop for the number of
replications required once I solve the problem below)

set seed 1
set matsize 800
set more 1

bsample, cluster(area)
clogit choice private public time cost distpri distpub incpri incpub, group(id)

I got mixed results in the sense that the speed at which I obtained the
results was as expected, but -bsample- is mixing up the data as I should have
1:2 matching (McFadden choice model), and I get 4:8.

So summing-up, my problem with -bsample- is how to incorporate the id so I
could have the appropiate matching.

Any help will be appreciated,


Teresa Delgado
Departments of Economics
University College London

PS time and cost are variables that vary with choice; private and public are
dummies, and inc* and dist* are variables that do not vary across alternatives
and that had been interacted by the dummies so they don't drop out of the
estimation.


 
> I am trying to learn how to using * bsample *.
> 
> The manual (release 8) has a section for * bootstrap * and * bsample * but all the examples that are worked out are for * bootstrap. *
> 
> Has anyone written out any notes on how to use bsample?  Thanks.
> 
> Richard Boylan
> Associate Professor of Economics 
> University of Alabama
> Culverhouse College of Commerce & Business Administration
> Tuscaloosa, AL 35487-0224 
> 205-348-8967, fax 205-348-0590
> 

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