Hi!
I have multiple imputed datasets and try to variable selection by using the user-written cvlasso command ( Ahrens, A., Hansen, C.B., Schaffer, M.E. 2018. cvlasso: Program for cross-validation using lasso, square-root lasso, elastic net, adaptive lasso and post-OLS estimators). I use postfile, taking random samples of each of the imputed datasets with bsample, do the cvlasso on the samples, and post some of the estimates to a file. My question is, why do I get the error message below (_0000000 not found)?

Best,
Kjell (Stata 15)

Code:
postfile tir29 AsCd AsHg AsMn AsPb AsSe CdHg CdMn CdPb CdSe HgMn HgPb HgSe MnPb MnSe PbSe KJONN_As KJONN_Cd KJONN_Hg KJONN_Mn KJONN_Pb KJONN_Se jod_As jod_Cd jod_Hg jod_Mn jod_Pb jod_Se using t29, replace
tempname allbetas
levelsof _mi_m
foreach lev in `r(levels)' {
 preserve
 bsample 319 if PCT_5mC!=.
 cvlasso PCT_5mC logAs logHg logCd logMn logPb Se_std MORS_ALDER i.Maternal_edu i.Parity i.KJONN i.SMOKING_X logJod logFOLAT AsCd AsHg AsMn AsPb AsSe CdHg CdMn CdPb CdSe HgMn HgPb HgSe MnPb MnSe PbSe KJONN_As KJONN_Cd KJONN_Hg KJONN_Mn KJONN_Pb KJONN_Se jod_As jod_Cd jod_Hg jod_Mn jod_Pb jod_Se, alpha(0.5) lopt postest maxiter(30000) /*adaptive*/ notpen(logAs logHg logCd logMn logPb Se_std /*MORS_ALDER*/ i.Maternal_edu /*i.Parity*/ i.KJONN /*i.SMOKING_X*/ logJod /*logFOLAT*/)                   
      if `allbetas'[1,14]!=0 local b_AsCd=1
      else local b_AsCd=0
      if `allbetas'[1,15]!=0 local b_AsHg =1
      else local b_AsHg =0
      if `allbetas'[1,16]!=0 local b_AsMn =1
      else local b_AsMn =0
      if `allbetas'[1,17]!=0 local b_AsPb =1
      else local b_AsPb =0
      if `allbetas'[1,18]!=0 local b_AsSe =1
      else local b_AsSe =0
      if `allbetas'[1,19]!=0 local b_CdHg =1
      else local b_CdHg =0
      if `allbetas'[1,20]!=0 local b_CdMn =1
      else local b_CdMn =0
      if `allbetas'[1,21]!=0 local b_CdPb =1
      else local b_CdPb =0
      if `allbetas'[1,22]!=0 local b_CdSe =1
      else local b_CdSe =0
      if `allbetas'[1,23]!=0 local b_HgMn =1
      else local b_HgMn =0
      if `allbetas'[1,24]!=0 local b_HgPb =1
      else local b_HgPb =0
      if `allbetas'[1,25]!=0 local b_HgSe =1
      else local b_HgSe =0
     if `allbetas'[1,26]!=0 local b_MnPb =1
     else local b_MnPb =0
      if `allbetas'[1,27]!=0 local b_MnSe =1
      else local b_MnSe =0
      if `allbetas'[1,28]!=0 local b_PbSe =1
      else local b_PbSe =0
      if `allbetas'[1,29]!=0 local b_KJONN_As =1
      else local b_KJONN_As =0
      if `allbetas'[1,30]!=0 local b_KJONN_Cd =1
      else local b_KJONN_Cd =0
      if `allbetas'[1,31]!=0 local b_KJONN_Hg =1
      else local b_KJONN_Hg =0
      if `allbetas'[1,32]!=0 local b_KJONN_Mn =1
      else local b_KJONN_Mn =0
      if `allbetas'[1,33]!=0 local b_KJONN_Pb =1
      else local b_KJONN_Pb =0
     if `allbetas'[1,34]!=0 local b_KJONN_Se=1
     else local b_KJONN_Se=0
      if `allbetas'[1,35]!=0 local b_jod_As =1
      else local b_jod_As =0
      if `allbetas'[1,36]!=0 local b_jod_Cd =1
      else local b_jod_Cd =0
      if `allbetas'[1,37]!=0 local b_jod_Hg =1
      else local b_jod_Hg =0
     if `allbetas'[1,38]!=0 local b_jod_Mn =1
     else local b_jod_Mn =0
     if `allbetas'[1,39]!=0 local b_jod_Pb =1
     else local b_jod_Pb =0
      if `allbetas'[1,40]!=0 local b_jod_Se=1
      else local b_jod_Se=0
                  post tir29 (`b_AsCd') (`b_AsHg') (`b_AsMn') (`b_AsPb') (`b_AsSe') (`b_CdHg') (`b_CdMn') (`b_CdPb') (`b_CdSe') (`b_HgMn') (`b_HgPb') (`b_HgSe') (`b_MnPb') (`b_MnSe') (`b_PbSe') (`b_KJONN_As') (`b_KJONN_Cd') (`b_KJONN_Hg') (`b_KJONN_Mn') (`b_KJONN_Pb') (`b_KJONN_Se') (`b_jod_As') (`b_jod_Cd') (`b_jod_Hg') (`b_jod_Mn') (`b_jod_Pb') (`b_jod_Se')
    restore
    }
postclose tir29
Code:
---------------------------------------------------
         Selected |     Elastic net   Post-est OLS
                  |   (alpha=0.500)
------------------+--------------------------------
            logAs |*      0.0182179      0.0464643
            logHg |*      0.0457825      0.0953625
            logCd |*     -0.0410005     -0.0710285
            logMn |*     -0.0083288     -0.0114757
            logPb |*     -0.0266549     -0.0349002
           Se_std |*      0.0129655      0.0128030
       MORS_ALDER |*      0.0001672     -0.0000412
                  |
     Maternal_edu |
   13 - 16 years  |*      0.0156455      0.0190909
       17+ years  |*      0.0270241      0.0317491
                  |
           Parity |
               1  |*      0.0049516      0.0026429
               2  |*      0.0369425      0.0368173
                  |
            KJONN |
            Girl  |*     -0.1431582     -0.2036675
                  |
        SMOKING_X |
           Daily  |*     -0.0604993     -0.0634316
           logJod |*     -0.0069532     -0.0073593
         logFOLAT |*      0.0027134      0.0033524
             AsCd |       0.0062129      0.0095980
             AsHg |       0.0247453      0.0302716
             AsPb |      -0.0043529     -0.0152545
             CdHg |       0.0030844      0.0051212
             CdPb |       0.0193753      0.0331995
             HgPb |      -0.0219080     -0.0367756
         KJONN_Hg |      -0.0218326     -0.0359652
         KJONN_Pb |       0.0552831      0.0849166
------------------+--------------------------------
   Partialled-out*|
------------------+--------------------------------
            _cons |       3.6213083      3.5839122
---------------------------------------------------
*Not penalized
__000000 not found
r(111);

end of do-file