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

st: RE: boostrapping


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: boostrapping
Date   Wed, 20 Nov 2002 19:56:18 -0000

Eva Rueckert
> 
> I am trying to bootstrap a decomposition using the syntax outlined 
> in the stata manual. I want to bootstrap the whole decomposition 
> procedure which includes the running of some regressions. The 
> beginning of my file looks as follows:
> 
> program define jmp
> 	version 7.0
> 	if "`1'"=="?" {
> 		global S_1 "com1 com2 com3 com4"
> 		exit
> }
> 
> tempname jmp
> 
> global list1 "educb educc educd educe educf marr childreny 
> childreno ten tensq exp expsq occupa occupb occupc occupd 
> occupe occupf occupg occuph indc indd indef indg indh indi indj 
> indk indl indm indn indo  Harjumaa West Sothcntl Nrthcntl South 
> ethnic" 
> local year "94 99"
> foreach yr of local year {
> 	reg lnwge $list1 if year==`yr' & gender==1
> 	gen fesample_`yr'=e(sample)==1
> 	/*and so on*/
> 
> post `1' `topost'
> end
> 
> the file does not run and the return message is:
> 
>  use "P:\panel.dta", clear
> . set seed 10001
> . bstrap jmp, reps(1)
> (obs=19210)
> 
> too many variables specified
> r(103);
> 
> now my question: does the r(103) refer to the variables I have 
> specified in my global list1? And if so, is there something 
> i can do 
> to extend the number of variables?
> 

This is a bit difficult to debug in the absence 
of part of the program. You could 

. set trace on 

and see where it all blows up. 

Nick 
[email protected] 

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