I am not sure if this is a bug, but I would consider it one (or two)
I define locals at the top of my .do file, and generate variables or run regressions based on those locals.
However, something inside Stata seems to have changed, but the problem already happens right after loading the dataset.
I run the following code
If I do not run the line cap drop __000000, the line -esttab diff*- produces the the error "type mismatch".
However, macro list that diff1 is stored in eststo. -cap drop __000000- removes this eststo, and then the code runs again.
This solution seems very patchy though. What is the root cause of this issue? I tried reinstalling the package estout, but that did not solve the issue.
I do not think it is a Stata installation issue, since other files run as before. The problem must have to do with esttab or local macros.
Edit: The problem is solved throughout the whole file when I put -cap drop __000000- right after my global directory paths, but I do not use any globals after this, only locals.
I define locals at the top of my .do file, and generate variables or run regressions based on those locals.
However, something inside Stata seems to have changed, but the problem already happens right after loading the dataset.
HTML Code:
log close _all macro drop _all cap drop __000000 clear all eststo clear
HTML Code:
reg cesd10a4std i.q, robust eststo diff1 *esttab diff* macro list cap drop __000000 esttab diff*
However, macro list that diff1 is stored in eststo. -cap drop __000000- removes this eststo, and then the code runs again.
HTML Code:
. macro list eststo_counter: 1 eststo: diff1 S_E_depv: cesd10a4std S_E_cmd: regress S_E_vce: Robust outpath: G:\Shared drives\sharedStefan\---CHARLS\1-NRPS\outFiles myFolder: C:\Users\User\Documents\RUG\---CHARLS myGoogle: G:\Shared drives\sharedStefan\---CHARLS S_level: 95 S_ADO: BASE;SITE;.;PERSONAL;PLUS;OLDPLACE S_StataSE: SE S_OS: Windows S_OSDTL: 64-bit S_MACH: PC (64-bit x86-64) _rolloutyr: rolloutyr S_FN: C:\Users\User\Documents\RUG\---CHARLS\CHARLSdata\H_CHARLS_D_DataPanelreg.dta S_FNDATE: 3 Jul 2023 18:30
I do not think it is a Stata installation issue, since other files run as before. The problem must have to do with esttab or local macros.
Edit: The problem is solved throughout the whole file when I put -cap drop __000000- right after my global directory paths, but I do not use any globals after this, only locals.
Comment