Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Variable in bootstrap program not found


From   "Nelson, Carl" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Variable in bootstrap program not found
Date   Thu, 3 Mar 2011 07:01:18 -0600

I am writing a bootstrap to obtain standard errors after two-step estimation with a generated regressor. When I try to execute the program I receive the following error.

 use full_inv, replace
. capture program drop twostepseboot
. program define twostepseboot, rclass
  1. version 10
  2. 
. quietly: reg cdmunicipio proprietrioa  posseiroa arrendatrioa assentadoapelo
> pnra larea cooperativa associacao  ///
> malet1 nmembrosdafamilia nempregadospermanentes literate secondary primary t
> echnical superior
  3. quietly: predict mun_res
  4. quietly: poisson rendaactivities proprietrioa  posseiroa arrendatrioa ass
> entadoapelopnra larea cooperativa  ///
> associacao malet1 nmembrosdafamilia nempregadospermanentes literate secondar
> y primary technical superior mun_res
  5. quietly: local coeff  proprietrioa  posseiroa arrendatrioa assentadoapelo
> pnra larea cooperativa  ///
> associacao malet1 nmembrosdafamilia nempregadospermanentes literate secondar
> y primary technical superior mun_res ///
> _cons
  6. foreach c of local coeff {
  7.         scalar b`c' = _b[`c']
  8.         return scalar bs`c' = b`c'
  9. }
 10. drop mun_res
 11. end

. 
. twostepseboot
[technical] not found
r(111);
When I run the code through line 8 as a do file and add scalar list I see all the b`c' and bs`c' variables have been created, thus I am puzzled by the error message.
And insight would be appreciated.

Carl Nelson
University of Illinois

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index